HRESULT EnumDevicesBySemantics( LPCTSTR ptszUserName, LPDIACTIONFORMAT lpdiActionFormat, LPDIENUMDEVICESBYSEMANTICSCB lpCallback, LPVOID pvRef, DWORD dwFlags )
- String identifying the current user, or NULL to specify the user logged onto the system. The user name is taken into account when enumerating devices. A device with user mappings is preferred to a device without any user mappings. By default, devices in use by other users are not enumerated for this user.
- Address of a DIACTIONFORMAT structure that specifies the action map for which suitable devices are enumerated.
- Address of a callback function to be called once for each device enumerated. See DIEnumDevicesBySemanticsCallback.
- Application-defined 32-bit value to pass to the enumeration callback each time it is called.
Flag value that specifies the scope of the enumeration. This parameter can be one or more of the following values.
- Only attached and installed devices are enumerated.
- Only unowned, installed devices are enumerated.
- Only devices that support force feedback are enumerated.
- Only secondary (non-system) keyboard and mouse devices.
- Only HID-compliant devices whose primary purpose is not as a gaming device. Devices such as USB speakers and multimedia buttons on some keyboards would fall within this value.
- All installed devices for the user identified by ptszUserName, and all unowned devices, are enumerated.
- DIEDBSFL_VALID is also defined in Dinput.h, but is not used by applications.
If the method succeeds, the return value is DI_OK. If the method fails, the return value can be one of the following error values: DIERR_INVALIDPARAM, DIERR_NOTINITIALIZED.