I have a program which uses an API from dinput.dll (Direct Input), I have monitored it and the result is this:
API Name: DirectInputCreateEx Module Name: C:\Windows\system32\DINPUT.dll
And about another program which uses Direct Input:
API Name: DirectInputCreateA Module Name: C:\Windows\system32\DINPUT.dll
This API will update this registry key:
HKEY_CURRENT_USER\System\CurrentControlSet\Control\MediaProperties\PrivateProperties\DirectInput
I want to know How can I use Delphi to write a code which ONLY call this API for DirectInput dll?
Any Help is really appreciated...
In order to call Direct Input you will need a Delphi translation of the header file. The best such translation, to my knowledge, is available from the Clootie graphics pages.
You need to use the
DirectInput.pas
header translation.As for writing a program that does not show a Window, here's the simplest template:
You state in a comment that the only function you wish to call is
DirectInputCreateEx
. To call that function you need the following import declaration: