#### Archived

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

# F*****g DX 8.1

This topic is 6098 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Please somebody help me. My code used to work perfectly with DX 8.0 . Then on a bright day I decided to install DX 8.1 and now all I have is darkness. I am using Borland C++ Builder 5, and my code works fine until I set the buffer size (see below). Then DX returns an error code number 2 (HRESULT: ERROR_FILE_NOT_FOUND Description: The system cannot find the file specified.) Does anyone have any idea of what the hell is going on?
  HRESULT hr; DIPROPDWORD dipdw; dipdw.diph.dwSize = sizeof(DIPROPDWORD); dipdw.diph.dwHeaderSize = sizeof(DIPROPHEADER); dipdw.diph.dwObj = 0; dipdw.diph.dwHow = DIPH_DEVICE; dipdw.dwData = BUFFER_SIZE; hr = device->SetProperty(DIPROP_BUFFERSIZE, &dipdw.diph); 
"- To begin with, said the Cat, a dog''s not mad. You grant that? - I suppose so, said Alice. - Well, then, - the Cat went on - you see, a dog growls when it''s angry, and wags its tail when it''s pleased. Now I growl when I''m pleased, and wag my tail when I''m angry. Therefore I''m mad."

##### Share on other sites
Try memsetting - DIPROPDWORD dipdw;

This is what I do and it works fine.

  DIPROPDWORD dipdw;  memset(&dipdw, 0, sizeof(dipdw));  dipdw.diph.dwSize = sizeof(DIPROPDWORD);  dipdw.diph.dwHeaderSize = sizeof(DIPROPHEADER);  dipdw.diph.dwObj = 0;  dipdw.diph.dwHow = DIPH_DEVICE;  dipdw.dwData = p_dSubBufferSize;  p_Dik->SetProperty(DIPROP_BUFFERSIZE, &dipdw.diph);

Which looks the same as yours except I have the memset.

##### Share on other sites
I am memsetting. I just skipped this line. I''ve tried with and without the memset...

"- To begin with, said the Cat, a dog''s not mad. You grant that?
- I suppose so, said Alice.
- Well, then, - the Cat went on - you see, a dog growls when it''s angry, and wags its tail when it''s pleased. Now I growl when I''m pleased, and wag my tail when I''m angry. Therefore I''m mad."

##### Share on other sites
Could it be the OS.

Requirements
Windows NT/2000/XP: Requires Windows® 2000.
Windows 98/Me: Requires Windows 98 or later. Available as a redistributable for Windows 98.

##### Share on other sites
What does the debug output tell you (I mean, you''re using a debug version of the DX runtime and have increased the debug output level of DInput, haven''t you)?

##### Share on other sites
oto76mm:
I''m using Windows 98.

VolkerG:
using the DX Error Lookup tool from DirectX 8.1, it says that, for the joystick, the erros is a FILE NOT FOUND. For the keyboard I get ACCESS DENIED when I try to Acquire it. The problem is that none of its erros are described in the list of possible return values.

I''ve tried using DirectX Erradicator, and I have installed DirectX 8.0, but it haven''t worked.

I really don''t want to reinstall windows and all applications again. It''s really boring, but I can''t find a solution...

Thank you guys...

"- To begin with, said the Cat, a dog''s not mad. You grant that?
- I suppose so, said Alice.
- Well, then, - the Cat went on - you see, a dog growls when it''s angry, and wags its tail when it''s pleased. Now I growl when I''m pleased, and wag my tail when I''m angry. Therefore I''m mad."

##### Share on other sites
oto76mm:
I''m using Windows 98.

VolkerG:
using the DX Error Lookup tool from DirectX 8.1, it says that, for the joystick, the erros is a FILE NOT FOUND. For the keyboard I get ACCESS DENIED when I try to Acquire it. The problem is that none of its erros are described in the list of possible return values.

I''ve tried using DirectX Erradicator, and I have installed DirectX 8.0, but it haven''t worked.

I really don''t want to reinstall windows and all applications again. It''s really boring, but I can''t find a solution...

Thank you guys...

"- To begin with, said the Cat, a dog''s not mad. You grant that?
- I suppose so, said Alice.
- Well, then, - the Cat went on - you see, a dog growls when it''s angry, and wags its tail when it''s pleased. Now I growl when I''m pleased, and wag my tail when I''m angry. Therefore I''m mad."

##### Share on other sites
I think the access denied message is because your app doesn''t have the focus, so it doesn''t own the keyboard.
As for the joystick - this may sound obvious - are you sure its plugged in?

HTH, Steve

##### Share on other sites
Yes, reading about the acquire return errors, I discovered that the DIERR_OTHERAPPHASPRIO is the same as the COM error E_ACCESSDENIED that is problably the one I receive.

As for the joystick:

- I can create the device, set the dataformat, the coop level. But when I try to use SetProperty to set the BUFFERSIZE. I get the HRESULT error 2. Strangely enough is that the joystick still works. But how can I be sure it''ll work everywhere?

"- To begin with, said the Cat, a dog''s not mad. You grant that?
- I suppose so, said Alice.
- Well, then, - the Cat went on - you see, a dog growls when it''s angry, and wags its tail when it''s pleased. Now I growl when I''m pleased, and wag my tail when I''m angry. Therefore I''m mad."

1. 1
2. 2
3. 3
Rutin
22
4. 4
5. 5

• 13
• 19
• 14
• 9
• 9
• ### Forum Statistics

• Total Topics
632936
• Total Posts
3009312
• ### Who's Online (See full list)

There are no registered users currently online

×