Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

what is a DWORD_PTR?

Hi,

I'm running MS Visual C++ 6.0 and I've just downloaded the DirectX 9 SDK from microsoft.com. Now, whenever I try and compile some programs I get the error message from all of the newly installed ".h" files that contains references to a type called DWORD_PTR. For example, the following code
[code]typedef DWORD_PTR HSEMAPHORE;[/code]generates the error
[code]missing ';' before identifier 'HSEMAPHORE'[/code]
I can solve the problem by adding the following line before all my "#include" statements:[code]typedef unsigned long;[/code]but I still get the same for other types (e.g. LONG_PTR). Is there a header file I can include which will define all these new types that are used by the WinAPI?

Thanks in advance,
Dan :-)

Comments

  • tom_swtom_sw Posts: 828Member
    : Hi,
    :
    : I'm running MS Visual C++ 6.0 and I've just downloaded the DirectX 9 SDK from microsoft.com. Now, whenever I try and compile some programs I get the error message from all of the newly installed ".h" files that contains references to a type called DWORD_PTR. For example, the following code
    : [code]typedef DWORD_PTR HSEMAPHORE;[/code]generates the error
    : [code]missing ';' before identifier 'HSEMAPHORE'[/code]
    : I can solve the problem by adding the following line before all my "#include" statements:[code]typedef unsigned long;[/code]but I still get the same for other types (e.g. LONG_PTR). Is there a header file I can include which will define all these new types that are used by the WinAPI?
    :
    : Thanks in advance,
    : Dan :-)
    :
    I found an article in MSDN that state this is defined in publicsdkincasetsd.h
    Try adding that to your include path

  • zeolitezeolite Posts: 78Member
    Thanks for your help. VC++ 6.0 does come with an older version of basetsd.h (which is in fact where these types are now declared :-)) I just downloaded the latest version of basetsd.h and now my code compiles just fine. Thank you!
Sign In or Register to comment.