Skip to main content
gamedev.net
🔒 Locked

DirectInput8Create() problem

Started by r 2 replies 500+ views
Original Post
r
r
what is wrong here DirectInput8Create(m_hinstance, DIRECTINPUT_VERSION,IID_IDirectInput8, (void**)&m_lpdi, NULL); m_lpdi->CreateDevice(GUID_SysKeyboard, &m_lpdidevice, NULL); m_lpdidevice->SetDataFormat(&c_dfDIKeyboard); because it makes this Unhandled exception at 0x004139ee in fuckinframewerk.exe: 0xC0000005: Access violation reading location 0x00000000. exactly at calling m_lpdi->CreateDevice() i assume the problem is at directinput8create () that it doesnt return me the right m_lpdi i ''ll appreciate any help thanx for ur time
rad
alnite
alnite
It looked correct for me. Are you sure the exception is exactly at CreateDevice() ?


Current project: A puzzle game.
% completed: ~0%
Status: Active.
Dave Hunt
Dave Hunt
Try checking the return value from the DirectInput8Create call. It''s a very bad idea to assume that every DirectX call will succeed.

One reason it might fail is if m_hinstance isn''t set.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.