Sign in to follow this  
Geminox

direct input help!!!

Recommended Posts

i got the following error " Unhandled exception at 0x00421dc4 in test.exe: 0xC0000005: Access violation reading location 0x00000004. " with the following code.

bool CInput::Update(void)
{
	Keyboard->GetDeviceState(sizeof(UCHAR[256]),(LPVOID)&KeyBuffer);

	return true;
}

/

anyone know how i can fix this error?

Share this post


Link to post
Share on other sites
Debug

-&KeyBuffer 0x0000008 <Bad Ptr> char *
-this 0x0000000 {InputObject=??? Keyboard=??? KeyBuffer=0x0000008 CInput*const
---InputObject CXX0030: Error: expression cannot be evaluated
etc..


LPDIRECTINPUT8 InputObject;
LPDIRECTINPUTDEVICE8 Keyboard;

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this