开发者

error C2065: 'AfxBeginThread' : undeclared identifier

开发者 https://www.devze.com 2022-12-21 14:15 出处:网络
I have a simple ATL Service in which I have included the following statement. AfxBeginThread(WorkerThread, this, THREAD_PRIORITY_NORMAL, 0, 0);

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().

0

精彩评论

暂无评论...
验证码 换一张
取 消