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."
F*****g DX 8.1
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?
Try memsetting - DIPROPDWORD dipdw;
This is what I do and it works fine.
Which looks the same as yours except I have the memset.
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.
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."
"- 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."
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.
Requirements
Windows NT/2000/XP: Requires Windows® 2000.
Windows 98/Me: Requires Windows 98 or later. Available as a redistributable for Windows 98.
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)?
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."
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."
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."
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."
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
As for the joystick - this may sound obvious - are you sure its plugged in?
HTH, Steve
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."
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."
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement