Jump to content
  • Advertisement
Sign in to follow this  
Skute

Convert HRESULT into error string?

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

Hi, im using some COM functions (mainly directshow) and i want to know how i can convert a FAILED() HRESULT into an error string? Would prefer a Windows API / COM function instead of relying on a DirectX function though because its for an Exception class. Cheers

Share this post


Link to post
Share on other sites
Advertisement
Hi,

You can't use a Win32 function to get the error string from a DirectShow HRESULT. You'll have to use whatever DShow gives you to get the corresponding error string. (and it seems they don't provide much information about this). I guess you'll have to write them by yourself :/

Regards,

Share this post


Link to post
Share on other sites
There's a handy utility that comes with MSVC called Visual C++ Error Lookup, and you can look up HRESULT return codes there. I don't know if it also includes DX codes, butsupposedly you can add modules for it to search for error strings. I haven't played with it that much.

Share this post


Link to post
Share on other sites
Hmm, was trying to get away from requiring a specific DirectX version to be bundled with the software. Oh well, think ill have to go with the DXGetErrorString9.

Cheers

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!