Jump to content
  • Advertisement
Sign in to follow this  
InsaneBoarder234

Confusing errors with dxerr9.h

This topic is 4814 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm using Visual C++ .net 2003 and just tried to use the DXGetErrorString9() function from dxerr9.h/dxerr9.lib and the compiler spat out 100 error messages followed by "c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinNT.h(8262): fatal error C1003: error count exceeds 100; stopping compilation ". My program compiled fine until I added two lines to it to include and link the dxerr9 files (#include <dxerr9.h>, #pragma comment(lib, "dxerr9.lib")). The first two errors I get are from the file dxerr9.h:
HRESULT WINAPI DXTraceA( const char* strFile, DWORD dwLine, HRESULT hr, const char* strMsg, BOOL bPopMsgBox );
HRESULT WINAPI DXTraceW( const char* strFile, DWORD dwLine, HRESULT hr, const WCHAR* strMsg, BOOL bPopMsgBox );

Game error C2040: 'WINAPI' : 'int' differs in levels of indirection from 'const char *'
Game error C2040: 'WINAPI' : 'int' differs in levels of indirection from 'const char *'

My best guess from that and skimming through some of the other errors is that theres a problem with 'WCHAR'. Anyone have any ideas? Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Argh! Ok stupid mistake really.. I believe the problem was caused by including dxerr9.h before windows.h or before some other file. I was trying to keep my code looking tidy ;-)

Sorry about that! :-)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!