Direct Input weird error

Started by
2 comments, last by ynoTWhit 21 years, 5 months ago
can anyone take a guess at why I''m getting this error? Its directx 8.1, and DIRECTINPUT_VERSION is 0x0800 error C2039: ''CreateDevice'' : is not a member of ''IDirectInputDevice8A'' I''ve been stumped for about an hour, I was hoping that maybe someone here had come across it before. Thanks in advance.
Advertisement
You create the device by IDirectInput8::CreateDevice(); and not
IDirectInputDevice8::CreateDevice() <-- that one dont even excist )

Well gl hf and read the tutorial in the directx docs )
geez, I can''t believe I missed that. Thanks
Speaking of DirectInput, I also have a strange error I''ve been struggling with for some time now.
I use DirectInput for both mouse and keyboard. My problem is with the line:

Mouse.GetDeviceData(DevData, DIGDD_DEFAULT)

This line kept me from running my game so I tried to place an ''on error resume next'' line over the GetDeviceData line and that made it possible to even run the app.

Anyone know why this line would fail? The DevData is defined as following: Dim DevData(1 To 10) As DIDEVICEOBJECTDATA
It wont help to increse to buffer.

The cooperative levels of the mouse and keyboard is set like this:
keyboard: DISCL_FOREGROUND Or DISCL_NONEXCLUSIVE Or DISCL_NOWINKEY
mouse: DISCL_FOREGROUND Or DISCL_EXCLUSIVE

Also, like half of the times I run the app I cant access nither mouse nor keyboard and I get this error:
The system cannot read from the specified device.

Thanks for any help!
_________________________ www.leXor.net

This topic is closed to new replies.

Advertisement