hansw77041
asked on
error C2039: 'TryEnterCriticalSection' : is not a member of '`global namespace''
In one project I used ::TryEnterCriticalSection( &g_DataAcc ess) and it works just fine, on the next very similar project ther compiler issues this error.
error C2039: 'TryEnterCriticalSection' : is not a member of '`global namespace''
In VC6 when I type ::TryEnterCriticalSection the IDE pops up the help box and it allows me to select TryEnterCriticalSection...
So the IDE know about the function but the compiler does not.
What do I need to do to get rid of this error ?
error C2039: 'TryEnterCriticalSection' : is not a member of '`global namespace''
In VC6 when I type ::TryEnterCriticalSection the IDE pops up the help box and it allows me to select TryEnterCriticalSection...
So the IDE know about the function but the compiler does not.
What do I need to do to get rid of this error ?
Change the Project Setting to Nomal Debug or release
It will work only for NT and above and does not work on 98, 95.
Check
http://www.codeproject.com/threads/9xtryentercs.asp for 95/98 options
It will work only for NT and above and does not work on 98, 95.
Check
http://www.codeproject.com/threads/9xtryentercs.asp for 95/98 options
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Remove #define VC_EXTRALEAN
#define _WIN32_WINNT 0x0400