1
votes

I get error TryEnterCriticalSection undeclared identifier during compilation. Visual studio knows about the function but the compiler does not. Other Critical Section functions are defined. I have included #define _WIN32_WINNT 0x0400 in stdafx.h per msdn. Definition in winbase.h is surrounded by #if(_WIN32_WINNT >= 0x0400) #endif /* _WIN32_WINNT >= 0x0400 */ straight c++, XP, Visual Studio 6

What's going on?

1

1 Answers

1
votes

Where have you defined the _WIN32_WINNT symbol in the stdafx.h file? Is it before the #include <windows.h> line? If not then the symbol will be undefined in winbase.h.