Archived

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

Looking up DirectX errorcodes

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

Where can I find DirectDraw::blt errorcodes? The function returns 42 when try to blit offscreen surface to primary buffer. I''ve seen some stuff about dxerr.* but I can''t find that. What is the best way to look up errors. I''m using DirectDraw 6 now. Sand Hawk ---------------- -Earth is 98% full. Please delete anybody you can.
My Site

Share this post


Link to post
Share on other sites
For what do I need to search? I use the DirectX 7 SDK and already tried searching on 42, errorcodes. Any ideas?

Sand Hawk

----------------
-Earth is 98% full. Please delete anybody you can.


My Site

Share this post


Link to post
Share on other sites
The DX APIs return an HRESULT. Negative values (i.e. values with the upper bit set) denote errors. A value of 42 doesn''t make sense. Are you sure you are retrieving the correct HRESULT value?

Share this post


Link to post
Share on other sites
You can use the DirectX Error Lookup Utility, which is in the SDK. Also check the return code against the ones on the Blt doc page.

You won''t find 42, but you''ll find some name that it matches against.


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

Share this post


Link to post
Share on other sites
Greetings,

Another small tip you can try is open a watch window, and put your hresult in the window. After that just put ",hr" next to it in the watch window and it sometimes has an error code explaination.

(Ie) HRESULT hrErrorCode = -Some Function-.

1.) Add "hrErrorCode" to your watch window.
2.) Double click the "hrErrorCode" found under "Name" column in the watch window.
3.) Add ",hr" to be next to the name
(ie) hrErrorCode,hr

This may show you what the error code means. It doesn't always show ever error code, but some of the more common ones.

[edited by - Bart-Man on August 16, 2002 11:21:25 AM]

[edited by - Bart-Man on August 16, 2002 11:22:10 AM]

Share this post


Link to post
Share on other sites
Recentely I was using the D3DX8Font class and for a successful call to the function DrawTextA, it returned an error code for 16 as a HRESULT. It took me ages trying to find the reason for this, in which I was unsuccesful, but seemingly so some directX functions can produce positive numbers as directX error codes.

Share this post


Link to post
Share on other sites