Convert HRESULT into error string?
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
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,
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,
Nah.. Just use the dxerr9.h/lib and use the funcs in there i guess.
DXGetErrorString9
DXGetErrorDescription9
DXGetErrorString9
DXGetErrorDescription9
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.
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
Cheers
I never looked into that, but as there is a .lib to include i'd say you don't need directx installed for it to work. All it does is map numbers to strings anyway.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement