?/TD>
Microsoft DirectX 9.0

DIEnumDevicesBySemanticsCallback Function


Application-defined callback function that receives Microsoft?DirectInput?devices as a result of a call to the IDirectInput8::EnumDevicesBySemantics method.

Syntax

BOOL CALLBACK DIEnumDevicesBySemanticsCallback(      

    LPCDIDEVICEINSTANCE lpddi,     LPDIRECTINPUTDEVICE8 lpdid,     DWORD dwFlags,     DWORD dwRemaining,     LPVOID pvRef );

Parameters

lpddi
Address of a DIDEVICEINSTANCE structure that describes the device instance.
lpdid
Pointer to the IDirectInputDevice8 interface for the device.
dwFlags
Flags that provide information about why the device is being enumerated. This can be a combination of action-mapping flags and one usage flag. At least one action-mapping flag is always present.

The DIEDBS_MAPPEDPRI1 and DIEDBS_MAPPEDPRI2 action-mapping flags and the DIEDBS_RECENTDEVICE and DIEDBS_NEWDEVICE usage flags are defined below.

DIEDBS_MAPPEDPRI1
The device is being enumerated because priority 1 actions can be mapped to the device.
DIEDBS_MAPPEDPRI2
The device is being enumerated because priority 2 actions can be mapped to the device.
DIEDBS_RECENTDEVICE
The device is being enumerated because the commands described by the action-mapping flags were recently used.
DIEDBS_NEWDEVICE
The device is being enumerated because the device was installed recently. Devices described by this flag have not been used with this game before.
dwRemaining
Number of devices, after this one, remaining to be enumerated.
pvRef
The application-defined value passed to IDirectInput8::EnumDevicesBySemantics as the pvRef parameter.

Return Value

Returns DIENUM_CONTINUE to continue the enumeration or DIENUM_STOP to stop the enumeration.



Remarks

If a single hardware device can function as more than one DirectInput device type, it is enumerated as each device type that it supports. For example, a keyboard with a built-in mouse is enumerated twice: once as a keyboard and once as a mouse. The product globally unique identifier (GUID) is the same for each device, however.

Function Information

Headerdinput.h
Import libraryNone
Minimum operating systems Windows 98

See Also

DIEnumDevicesCallback


© 2002 Microsoft Corporation. All rights reserved.