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 ?
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.
ok, try this DirectInputCreateEx(), and check this thread http://msdn.microsoft.com/en-us/library/microsoft.directx_sdk.reference.directinput8create%28v=vs.85%29.aspx