Jump to content
  • Advertisement


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


SetProperty() returns -21704276(something like that)

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

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

Share this post

Link to post
Share on other sites
Take a look at DXGetErrorString8 fonction and DXTrace.

PS: Not sure this function is avaible in DX7.

Why English rules?? C pas très malin tout ça!

Edited by - JesterLeCodeur on November 15, 2001 6:25:59 AM

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:


(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.)

- saving pigs from untimely fates

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!