WinDriver calls this function when a new device, matching the given criteria, is
attached, provided it is not yet controlled by another driver.
This callback is called once for each matching interface.
typedef BOOL (DLLCALLCONV *WDU_ATTACH_CALLBACK)(
WDU_DEVICE_HANDLE hDevice,
WDU_DEVICE *pDeviceInfo,
PVOID pUserData);
| Name | Type | Input/Output |
|---|---|---|
| hDevice | WDU_DEVICE_HANDLE | Input |
| pDeviceInfo | WDU_DEVICE* | Input |
| pUserData | PVOID | Input |
| Name | Description |
|---|---|
| hDevice | A unique identifier for the device/interface |
| pDeviceInfo |
Pointer to a USB device information structure |
| pUserData |
Pointer to user-mode data for the callback, as passed to
WDU_Init()pEventTable->pUserData)
|
If the WD_ACKNOWLEDGE flag was set in the call to
WDU_Init()dwOptions parameter), the
callback function should check if it wants to control the device, and if so
return TRUE (otherwise — return FALSE).
If the WD_ACKNOWLEDGE flag was not set in the call to
WDU_Init(), then the return value of the callback function is
insignificant.
WinDriver calls this function when a controlled device has been detached from the system.
typedef void (DLLCALLCONV *WDU_DETACH_CALLBACK)(
WDU_DEVICE_HANDLE hDevice,
PVOID pUserData);
| Name | Type | Input/Output |
|---|---|---|
| hDevice | WDU_DEVICE_HANDLE | Input |
| pUserData | PVOID | Input |
| Name | Description |
|---|---|
| hDevice | A unique identifier for the device/interface |
| pUserData |
Pointer to user-mode data for the callback, as passed to
WDU_Init()pEventTable->pUserData)
|
None
WinDriver calls this function when a controlled device has changed its power settings.
typedef BOOL (DLLCALLCONV *WDU_POWER_CHANGE_CALLBACK)(
WDU_DEVICE_HANDLE hDevice,
DWORD dwPowerState,
PVOID pUserData);
| Name | Type | Input/Output |
|---|---|---|
| dwPowerState | DWORD | Input |
| pUserData | PVOID | Input |
| Name | Description |
|---|---|
| hDevice | A unique identifier for the device/interface |
| dwPowerState | Number of the power state selected |
| pUserData |
Pointer to user-mode data for the callback, as passed to
WDU_Init()pEventTable->pUserData)
|
TRUE/FALSE. Currently there is no significance to the return
value.
This callback is supported only on Windows.