This topic is now archived and is closed to further replies.


Using DXGetErrorString8...............

Recommended Posts

Hey I used to use this error function to write my errors.. I''d write some text and the HRESULT from all my functions and then it''d tell me whats wrong exactly.... I upped to dx8 and now have to use the new func DXGetErrorString8. I know below is wrong and I just can''t seem to see why.. its very late, well early and I just can''t figure it out.. anyone see what I''m doing wrong? Thanks for any help, Chris void write_errorex(char *text, HRESULT hResult) { const char errormsg[80] = DXGetErrorString8(hResult);"errorlog.log", ios::out | ios::app); error_file << text << '' '' << errormsg << ''\n''; error_file.close(); }

Share this post

Link to post
Share on other sites
I''m just guessing:

void write_errorex(char *text, HRESULT hResult)
char *errormsg = (char*)DXGetErrorString8(hResult);

char f_errormsg[256]; // error string that will be written to file

strcpy(f_errormsg,errormsg);"errorlog.log", ios::out | ios::app);
error_file << text << '' '' << f_errormsg << ''\n'';

- Goblineye Entertainment
The road to success is always under construction

Share this post

Link to post
Share on other sites