Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CreateWaitableTimer is not creating

CreateWaitableTimer is not creating

Scheduled Pinned Locked Moved C / C++ / MFC
c++questionvisual-studiojsonhelp
4 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Joe Moldovan
    wrote on last edited by
    #1

    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: !

    J M 2 Replies Last reply
    0
    • J Joe Moldovan

      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: !

      J Offline
      J Offline
      Joe Moldovan
      wrote on last edited by
      #2

      Forgot to mention: The MSDN example fails to compile also.

      1 Reply Last reply
      0
      • J Joe Moldovan

        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: !

        M Offline
        M Offline
        Michael Dunn
        wrote on last edited by
        #3

        Your question is answered in the VC forum FAQ. --Mike-- http://home.inreach.com/mdunn/ "....." -- Silent Bob :love: your :bob: with :vegemite: and :beer:

        J 1 Reply Last reply
        0
        • M Michael Dunn

          Your question is answered in the VC forum FAQ. --Mike-- http://home.inreach.com/mdunn/ "....." -- Silent Bob :love: your :bob: with :vegemite: and :beer:

          J Offline
          J Offline
          Joe Moldovan
          wrote on last edited by
          #4

          Thanks Michael!!! Saved me again as usual. I also found the answer in MSDN Q184796 together with an example.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups