Are DirectX return values (HRESULT) unique?

Started by
1 comment, last by Ridcully 23 years, 6 months ago
i.e., could it be that a DDRAWERRxxx is defined as the same value as a D3DERRxxx? i am asking because i want to write a generic function that converts all directx errors into strings. btw: are there any complete lists of all directx error values, so i don''t have to type them in manually? preferrably in form: case errorvalue: return "errorstring"; (for example) case DDRAWERR_UNINTIALIZED: return "DDRAWERR_UNINTIALIZED"; thanks rid
Advertisement
Yes, some error values of DD and 3D have the same value.

But before you bother to write your own function take a look at the D3DXGetErrorString() function that comes with the DirectX7 SDK. It saves a lot of work even if you don''t want to use any other of the D3DX helper functions.
They are not unique. You will have to have separate functions for interpreting error messages from each API.

------------------------------
#pragma twice


sharewaregames.20m.com

This topic is closed to new replies.

Advertisement