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

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

  • 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.

Howdy, Stranger!

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

Categories