"All DirectX functions return an HRESULT - which is the return code. Also the docs tell you which return codes to expect from which functions."
I searched for everything I could think of in the direct x docs and couldn''t find anything releveant.
"You just have your program print out return codes so you can use the DirectX Error Lookup utility which is in the SDK."
How do I turn HRESULT into something readable?
Need help with loading palettes
Oh boy.
An HRESULT can be treated as a 32 bit integer. Feed it into printf or cout. Every reference page for every DirectX function and method gives a list of every HRESULT you can expect that function or method to return. An example:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dx8_c/directx_cpp/Graphics/Reference/CPP/D3D/Interfaces/IDirect3D8/CreateDevice.asp
Look at the Return Values section.
The DirectX error lookup utility is in the DirectX SDK. You do have the SDK right? Remember that the SDK is more than docs.
Oh boy.
Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
An HRESULT can be treated as a 32 bit integer. Feed it into printf or cout. Every reference page for every DirectX function and method gives a list of every HRESULT you can expect that function or method to return. An example:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dx8_c/directx_cpp/Graphics/Reference/CPP/D3D/Interfaces/IDirect3D8/CreateDevice.asp
Look at the Return Values section.
The DirectX error lookup utility is in the DirectX SDK. You do have the SDK right? Remember that the SDK is more than docs.
Oh boy.
Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
"An HRESULT can be treated as a 32 bit integer. Feed it into printf or cout"
How do I do that from a win32/DX app? As far a I know Message boxes are the only output I can give at the moment.
"http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dx8_c/directx_cpp/Graphics/Reference/CPP/D3D/Interfaces/IDirect3D8/ CreateDevice.asp"
Everytime I try navigating MSDN (including when I follow that link) I end up at a page that just has:
Welcome to the MSDN Library
Welcome to the MSDN Library
Component Development
Data Access
Development (General)
Enterprise Development
Graphics and Multimedia
etc.
How do I do that from a win32/DX app? As far a I know Message boxes are the only output I can give at the moment.
"http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dx8_c/directx_cpp/Graphics/Reference/CPP/D3D/Interfaces/IDirect3D8/ CreateDevice.asp"
Everytime I try navigating MSDN (including when I follow that link) I end up at a page that just has:
Welcome to the MSDN Library
Welcome to the MSDN Library
Component Development
Data Access
Development (General)
Enterprise Development
Graphics and Multimedia
etc.
The link works for me, but it looks like you''ve got an accidental space in your version. I''ll copy and paste a little bit...
In a Windows app you can use sprintf (or one of the C++ string classes) to make up a string that tells you the number, then use MessageBox. You can also use OutputDebugString to print to Visual C++''s Debug window. Or you can write a few logging functions so you can output to a text file.
Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
Return ValuesIf the method succeeds, the return value is D3D_OK.If the method fails, the return value can be one of the following values.D3DERR_INVALIDCALL D3DERR_NOTAVAILABLE D3DERR_OUTOFVIDEOMEMORY
In a Windows app you can use sprintf (or one of the C++ string classes) to make up a string that tells you the number, then use MessageBox. You can also use OutputDebugString to print to Visual C++''s Debug window. Or you can write a few logging functions so you can output to a text file.
Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
Thanks alot!!! It turns out that the problem was "DDERR_NOCOOPERATIVELEVELSET " I don''t know what the problem was yet but at least now I know how to find out.
And the problem that I was having with MSDN is that it doesn''t work in Opera (surprise surprise).
Once again, thanks heaps!
And the problem that I was having with MSDN is that it doesn''t work in Opera (surprise surprise).
Once again, thanks heaps!
Cool, good luck fixing the problem.
Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement