Sign in to follow this  
SilverKnight

DirectInput8 Error SOLVED!

Recommended Posts

SilverKnight    122
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

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