HRESULT hResult = DirectInputCreateEx( WindowInstance, DIRECTINPUT_VERSION, IID_IDirectInput7, ( void ** )&lpdi, NULL );
Direct Input Problem
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:
WindowInstance is a global application instance handle.
DIRECTINPUT_VERSION is defined in theheader file as 0x700. Please advise.
Thanks,
Mike
- Are you sure the instance is valid?
- Try using GetModuleHandle(0) instead
- Enable debug output and look for interesting messages
- Try using GetModuleHandle(0) instead
- Enable debug output and look for interesting messages
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]
Well,
Using GetModuleHandle( NULL ) works fine although I'm confused as to why this instance would not be valid. But everything seems to work fine now. Thanks very much!
Using GetModuleHandle( NULL ) works fine although I'm confused as to why this instance would not be valid. But everything seems to work fine now. Thanks very much!
Microsoft made tings this way to confude you. You get frusterated then guy buy more products to better understand them.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement