Direct Input DDK Annotations
Last Updated Nov 21, 2000
Direct Input DDK |
VJOYD_DeviceUpdateNotify_Service
This service seems to need eax to be set to 0 in order for it to function. So,
if you implement your driver in C, the call should look like this:
VJDEVICEDESC
You may be confused on several fronts if you look at the help file for VJDEVICEDESC.
According to the help file, the lpHWCaps structure is reserved. Well, it isn't.
Direct Input expects that structure to be filled with valid information.
To get around that,
Windows 95 allowed the pointer to VJDEVICEDESC(lpDeviceDesc)in VJREGDRVINFO to be
null. If the pointer to the structure was null, it took
all its information from the registry. This worked fine until Windows 98
was given to beta testers. Some versions of Windows 98
(pre RC 4.0) failed when the pointer was null. The device may show up having
buttons on the control panel, but games will not be able to access them.
(Checking the device caps will have the device listed as 0 buttons)
Even though this should be fixed by the final version, the safest method is
to fill that structure.
Poll
Poll is different than the DX1-3 PollRoutine.
Make sure to return VJ_ERRFAIL if the device is not connected. Also, if the
data isn't fresh, return S_FALSE. Normally, return VJ_OK.
If you hit the property button and it immediately crashes, or does nothing, there are two possible reasons.
Once the sample is tested, you will probably modify the example code to use in your own control panel. Make sure that you create your own GUID. If you have Visual C++, you should have a program named "guidgen.exe". This program can create GUIDs. This number should be placed in your .inf file (registry format), and the cplsvr1.h file (static const format).