Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

r

DirectInput8Create() problem

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

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

Share this post


Link to post
Share on other sites
Advertisement
It looked correct for me. Are you sure the exception is exactly at CreateDevice() ?


Current project: A puzzle game.
% completed: ~0%
Status: Active.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!