• 12
• 12
• 9
• 10
• 13

# DirectInput8Create fails : E_INVALIDARG

This topic is 2571 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi, I'm using DirectInput with Direct3D 11, and compiling for x64 and I get an E_INVALIDARG from this line:

 HRESULT hr = DirectInput8Create(hInstance, DIRECTINPUT_VERSION, IID_IDirectInput8, reinterpret_cast<void **>(&this->_d8Input), 0); 

When I set a break point to look at what is going on I get no sign of any invalid arguments. My hInstance is valid, so is the _d8Input pointer and the DIRECTINPUT_VERSION is set to 0x0800.

I've used direct input with D3D9 before, in the exact same way and didn't have any problems.
What am I missing ?

Thanks.

##### Share on other sites
Mate, I think because ur using DX8 where on X64, u can use DX11 instead.

cheers.

##### Share on other sites
I am using DX11.
It turns out I was compiling with /SUBSYSTEM:CONSOLE and the hInstance passed in from WinMain when using a console subsystem doesn't please DirectInput8Create at all.