Sign in to follow this  
bower12345

Direct Input Problem

Recommended Posts

Hey folks, When trying to initialize Direct Input, I get an error which translates into an invalid parameter being passed. I'm trying to initialize DirectInput 7 and I current have DirectX 9.0b installed on my test machine so I don't believe there should be any problems. This is the code I'm using:
HRESULT hResult = DirectInputCreateEx( WindowInstance, DIRECTINPUT_VERSION, IID_IDirectInput7, ( void ** )&lpdi, NULL );

WindowInstance is a global application instance handle. DIRECTINPUT_VERSION is defined in theheader file as 0x700. Please advise. Thanks, Mike

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
- Are you sure the instance is valid?
- Try using GetModuleHandle(0) instead
- Enable debug output and look for interesting messages


That's what happened to me just recently. I just made a custom windows message that sent to my window after i was sure that my instance was valid and initialized DirectInput (actually, winsock and D3D too) then. Worked fine after that.

[Edited by - Coder on September 22, 2004 5:19:18 PM]

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