CreateWaitableTimer is not creating
-
I run VS6(SP5) on Win2000(SR2). I have a one line program which will not compile. #include windows.h int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nCmdShow ) { CreateWaitableTimer( NULL, TRUE, "JOE" ); return 0; } c:\develop\test\test.cpp(8) : error C2065: 'CreateWaitableTimer' : undeclared identifier To clarify the situation, I have no precompiled headers. The call definition is seen by VS because a mouse hover over the source shows the call prototype correctly. If I change windows.h to afxwin.h I get a good compile. QUESTION: Why can't I compile with windows.h? What has a Win32 API call got to do with MFC - or rather what does afxwin.h do that I don't? Thanks for any advice :rose: !
-
I run VS6(SP5) on Win2000(SR2). I have a one line program which will not compile. #include windows.h int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nCmdShow ) { CreateWaitableTimer( NULL, TRUE, "JOE" ); return 0; } c:\develop\test\test.cpp(8) : error C2065: 'CreateWaitableTimer' : undeclared identifier To clarify the situation, I have no precompiled headers. The call definition is seen by VS because a mouse hover over the source shows the call prototype correctly. If I change windows.h to afxwin.h I get a good compile. QUESTION: Why can't I compile with windows.h? What has a Win32 API call got to do with MFC - or rather what does afxwin.h do that I don't? Thanks for any advice :rose: !
Forgot to mention: The MSDN example fails to compile also.
-
I run VS6(SP5) on Win2000(SR2). I have a one line program which will not compile. #include windows.h int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nCmdShow ) { CreateWaitableTimer( NULL, TRUE, "JOE" ); return 0; } c:\develop\test\test.cpp(8) : error C2065: 'CreateWaitableTimer' : undeclared identifier To clarify the situation, I have no precompiled headers. The call definition is seen by VS because a mouse hover over the source shows the call prototype correctly. If I change windows.h to afxwin.h I get a good compile. QUESTION: Why can't I compile with windows.h? What has a Win32 API call got to do with MFC - or rather what does afxwin.h do that I don't? Thanks for any advice :rose: !
Your question is answered in the VC forum FAQ. --Mike-- http://home.inreach.com/mdunn/ "....." -- Silent Bob :love: your :bob: with :vegemite: and :beer:
-
Your question is answered in the VC forum FAQ. --Mike-- http://home.inreach.com/mdunn/ "....." -- Silent Bob :love: your :bob: with :vegemite: and :beer:
Thanks Michael!!! Saved me again as usual. I also found the answer in MSDN Q184796 together with an example.