PDA

View Full Version : DirectInputCreate fails



Carsten
13-04-2003, 08:53 PM
var m_pDI:IDirectInput;

DirectInputCreate(HInstance, DIRECTINPUT_VERSION, m_pDI, nil);

fails with
DIRECTINPUT_VERSION = $0800;

while it succeeds with
DIRECTINPUT_VERSION = $0500;
(or $0700)


I am using Clooties latest Headers with DX9. What's going wrong...?

Carsten

Useless Hacker
21-04-2003, 09:12 PM
Use DirectInputCreate or DirectInputCreateEx only for <=DirectInput7. For DirectInput8/9, use DirectInput8Create.

Gadget
06-07-2003, 08:47 AM
I hit exactly the same problem???

I recompiled an emulator I wrote 2 years ago that used DirectX 7 and now it won't run after compile??

The only differences are that I am using the DX9 headers and have DX9 installed on XP. Can I not use DX7 interfaces with DX9? Or is there a problem with the headers?

Useless Hacker
07-07-2003, 08:25 PM
If you are using Clootie's DirectX 9 headers, you need add:
{$DEFINE DIRECTX7}
to the top of the DirectInput.pas file to make it use DirectX 7 definitions.