error C2065: 'AfxBeginThread' : undeclared identifier
I have a simple ATL Service in which I have included the following statement.
AfxBeginThread(WorkerThread, this, THREAD_PRIORITY_NORMAL, 0, 0);
But the compiler complains that
error C2065: 'AfxBeginThread' : undeclared identifier
But in MSDN i found that AfxBeginThread is found in AFXWIN.H
If I include AFXWIN.H, the compiler complains that
fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
What am I missing here? Thanks.
PS: I am usin开发者_C百科g Visual Studio 6.0 Enterprise Edition in Windows XP SP2.
An ATL project is NOT a MFC project using ATL. Use _beginthreadex().
精彩评论