• Advertisement

Archived

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

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

This topic is 6098 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

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); error_file.open("errorlog.log", ios::out | ios::app); error_file << text << '' '' << errormsg << ''\n''; error_file.close(); }

Share this post


Link to post
Share on other sites
Advertisement
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);

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


- Goblineye Entertainment
The road to success is always under construction

Share this post


Link to post
Share on other sites

  • Advertisement