Skip to main content
gamedev.net
🔒 Locked

Confusing errors with dxerr9.h

Started by InsaneBoarder234 Sep 10, 2005 at 9:32 AM 0 replies 900+ views
Original Post
InsaneBoarder234
InsaneBoarder234
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 , #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!
Progress is born from the opportunity to make mistakes.

My prize winning Connect 4 AI looks one move ahead, can you beat it? @nickstadb
InsaneBoarder234
InsaneBoarder234
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! :-)
Progress is born from the opportunity to make mistakes.

My prize winning Connect 4 AI looks one move ahead, can you beat it? @nickstadb

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.