locked
error C2065: 'DEV_BROADCAST_HANDLE' : undeclared identifier RRS feed

  • Question

  •  

    Hi, all:

    Seriously have no idea where to put this question, but I am using Visual Studio 2008 C++ 9.0 .

    I installed WinDDK 7600.16385.0 at C:\WinDDK\7600.16385.0 , and put the include directory C:\WinDDK\7600.16385.0\inc\api down to my project settings. I clearly include Windows.h on top of my .cpp file, but still, I failed to compile my file and the error messages are like:

     

    error C2065: 'DEV_BROADCAST_HANDLE' : undeclared identifier
    error C2065: 'HDEVNOTIFY' : undeclared identifier
    error C2065: 'DBT_DEVTYP_HANDLE' : undeclared identifier
    ...
    etc...

     

    I noticed that several posts are talking about _WIN32_WINNT 0x0400 or 0x0500 issue. My current header file is:

    #if _WIN32_WINNT < 0x0400
    #define _WIN32_WINNT 0x0400
    #endif
    
    #include "windows.h"

    How can I just make everything successfully compiled under my environment?

     

    Rgds

    Pei

     


    Welcome to Vision Open http://www.visionopen.com
    Friday, April 29, 2011 9:02 PM

Answers

  •  

     

    Problem solved. changed

    0x0400 to 0x0600 ...

    Thanks...


    Welcome to Vision Open <url>http://www.visionopen.com</url>
    • Marked as answer by lucy-liu Tuesday, May 3, 2011 7:59 AM
    Friday, April 29, 2011 9:39 PM

All replies

  •  

     

    Problem solved. changed

    0x0400 to 0x0600 ...

    Thanks...


    Welcome to Vision Open <url>http://www.visionopen.com</url>
    • Marked as answer by lucy-liu Tuesday, May 3, 2011 7:59 AM
    Friday, April 29, 2011 9:39 PM
  • Hi jiapei101,

    I’m glad to hear that you got it working.

    Thank you for sharing your solutions & experience here. It will be very beneficial for other community members who have similar questions.

    Best regards,

    Lucy


    Lucy Liu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, May 3, 2011 8:03 AM