• Advertisement
Sign in to follow this  

DirectInput8 Error SOLVED!

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

so.... After many hours of sitting in front of my LCD Screen... staring at the debugger in MSVC++ i figured it out... thanks to evil steve and DXnut and whoever else posted in reply to my last two shouts for help... it wasnt a problem with the directinput objects it was with HINSTANCE... it couldent get a handle on the instance of the window... so in CreateDInput() I changed it from this:
	if(FAILED(DirectInput8Create(cSys1.m_hWnd, DIRECTINPUT_VERSION,
							IID_IDirectInput8, (void**)&m_pInput, NULL)))
	{
		return FALSE;
	}

to...
	if(FAILED(DirectInput8Create(GetModuleHandle(NULL), DIRECTINPUT_VERSION,
							IID_IDirectInput8, (void**)&m_pInput, NULL)))
	{
		return FALSE;
	}

everything is up and running now... THANKS SO MUCH GUYS!!! This forum Rocks! Long live Gamedev.net! woot! SilverKnight

Share this post


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

  • Advertisement