Jump to content
  • Advertisement
Sign in to follow this  
BrandonisMaster

Some DirectInput Help Please!

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

Can some one please help me, I've just started directinput and here's my debug problem:
Unhandled exception at 0x00412e5a in paddlegame.exe: 0xC0000005: Access violation reading location 0x00000000.
I honestly have no idea what that means :/ and it says this:
'paddlegame.exe': Loaded 'C:\WINDOWS\system32\serwvdrv.dll'
'paddlegame.exe': Unloaded 'C:\WINDOWS\system32\serwvdrv.dll'
'paddlegame.exe': Loaded 'C:\WINDOWS\system32\serwvdrv.dll'
'paddlegame.exe': Unloaded 'C:\WINDOWS\system32\serwvdrv.dll'
'paddlegame.exe': Loaded 'C:\WINDOWS\system32\AntexWAV.dll', Binary was not built with debug information.
'paddlegame.exe': Unloaded 'C:\WINDOWS\system32\AntexWAV.dll'
'paddlegame.exe': Loaded 'C:\WINDOWS\system32\AntexWAV.dll', Binary was not built with debug information.
'paddlegame.exe': Unloaded 'C:\WINDOWS\system32\AntexWAV.dll'
'paddlegame.exe': Loaded 'C:\WINDOWS\system32\AntexWAV.dll', Binary was not built with debug information.
'paddlegame.exe': Unloaded 'C:\WINDOWS\system32\AntexWAV.dll'
'paddlegame.exe': Loaded 'C:\WINDOWS\system32\AntexWAV.dll', Binary was not built with debug information.
'paddlegame.exe': Unloaded 'C:\WINDOWS\system32\AntexWAV.dll'
'paddlegame.exe': Loaded 'C:\WINDOWS\system32\AntexWAV.dll', Binary was not built with debug information.
'paddlegame.exe': Unloaded 'C:\WINDOWS\system32\AntexWAV.dll'
'paddlegame.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll'
Please help me :)

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by BrandonisMaster

Unhandled exception at 0x00412e5a in paddlegame.exe: 0xC0000005: Access violation reading location 0x00000000.



dereferencing a NULL pointer... that's as much as I can say with the given information...

Share this post


Link to post
Share on other sites
Quote:
Original post by BrandonisMaster
Heres the line in debug where it messes up:

HRESULT result = dimouse->SetDataFormat(&c_dfDIMouse);


looks like dimouse is NULL...

Share this post


Link to post
Share on other sites
Quote:
Original post by BrandonisMaster
Heres the line in debug where it messes up:

HRESULT result = dimouse->SetDataFormat(&c_dfDIMouse);
As larvyde said, your mouse pointer is null. You should be checking the return values of ALL DirectX functions that return an interface (Using the SUCCEEDED or FAILED macros).

However, you really shouldn't be using DirectInput for keyboard or mouse input in any case.

Share this post


Link to post
Share on other sites
Quote:
Original post by Evil Steve
Quote:
Original post by BrandonisMaster
Heres the line in debug where it messes up:

HRESULT result = dimouse->SetDataFormat(&c_dfDIMouse);
As larvyde said, your mouse pointer is null. You should be checking the return values of ALL DirectX functions that return an interface (Using the SUCCEEDED or FAILED macros).

However, you really shouldn't be using DirectInput for keyboard or mouse input in any case.


So what should I be using?

Share this post


Link to post
Share on other sites
Quote:
Original post by BrandonisMaster
Quote:
Original post by Evil Steve
Quote:
Original post by BrandonisMaster
Heres the line in debug where it messes up:

HRESULT result = dimouse->SetDataFormat(&c_dfDIMouse);
As larvyde said, your mouse pointer is null. You should be checking the return values of ALL DirectX functions that return an interface (Using the SUCCEEDED or FAILED macros).

However, you really shouldn't be using DirectInput for keyboard or mouse input in any case.


So what should I be using?
Window messages for most things, or if you really need high DPI input, then raw input.

Share this post


Link to post
Share on other sites
from: http://msdn.microsoft.com/en-us/library/bb206183(VS.85).aspx

Overall, using DirectInput offers no advantages when reading data from mouse or keyboard devices, and the use of DirectInput in these scenarios is discouraged.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!