Archived

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

pointguard1

SetProperty() returns -21704276(something like that)

Recommended Posts

What''s the deal? I''m trying to change the keyboard buffersize and the SetProperty function returns something like -21704276. I tested the HRESULT against all the DIERR codes that SetProperty can return(ie _INVALIDPARAM, _NOTINITIALIZED, etc.) I am using the DX 7 SDK with DX 5 SDK help (I think). ...help... *)(* ---- I''m dying here...

Share this post


Link to post
Share on other sites
1. Could you try posting the exact return code you got. (Preferably in hexadecimal, but it can always be converted).

2. Install the debug version of the SDK and put the DirectInput debug level slider to a high value (in the DirectX part of the Control Panel). Run the application and see what DirectInput says in your debug output. If it fails a call it''ll tell you _why_ in the debug output.

--
Simon O''''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites
The Step-by-Step guide to deciphering those cryptic HRESULT''s

Before you start, you should be viewing the number in hex.

A HRESULT is made up of three parts (left over from the old SCODEs, for anyone that cares).

1) A Severity code - 0=no error, 1=error
2) A Facility code (a program ID number, effectively)
3) An Error code.

Open dinput.h, and find where the error codes are defined. At the top of the list, you should be able to find the facility code - M$ use a macro something like:

MAKEDIERR(arg) MAKEHRESULT(1,0x877,arg)

(I think that''s the one from DDraw). The 0x877 is the facility code.

So, now, eliminate the severity and facility codes from your hex error value. Convert the chunk that''s left back to decimal, and check it in the list...

Or of course, you could do this all the easy way, and pass the value to D3DXGetErrorString()

( I think this should work but I''m not actually at my machine right now and as such am working from memory. I''ll check later.)

Superpig
- saving pigs from untimely fates

Share this post


Link to post
Share on other sites