Skip to main content
gamedev.net
🔒 Locked

DirectInput8 Error SOLVED!

Started by SilverKnight Mar 26, 2006 at 9:19 AM 0 replies 450+ views
Original Post
SilverKnight
SilverKnight
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
-Raja HargreavesLead Designer - Janma StudiosCompany E-Mail: JanmaStudios@Hotmail.comPersonal E-Mail: Karate_Master000@yahoo.co.uk

Topic Locked

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

Sign in to reply to this topic.