UsbRegisterChangeNotification
Appearance
Description
Registers semaphores for generic attach/detach notification of USB devices.
Syntax
ulrc = UsbRegisterChangeNotification(pNotifyID,hDeviceAdded,hDeviceRemoved)
Parameters
- pNotifyID
- the address of the variable to receive the Notification Identifier.
- hDeviceAdded
- the handle of the event semaphore to be posted on device attach.
- hDeviceRemoved
- the handle of the event semaphore to be posted on device detach.
Return Code
0x0000 - NO_ERROR
Errors
0x0006 - ERROR_INVALID_HANDLE 0x0057 - ERROR_INVALID_PARAMETER 0x005F - ERROR_INTERRUPT 0x0067 - ERROR_TOO_MANY_SEM_REQUESTS 0x0069 - ERROR_SEM_OWNER_DIED 0x1B58 - USB_NOT_INIT 0x1B59 - USB_ERROR_NO_MORE_NOTIFICATTIONS 0xFF06 - ERROR_INVALID_HANDLE 0xFF1F - ERROR_GEN_FAILURE 0xFF57 - ERROR_INVALID_PARAMETER 0xFF64 - ERROR_TOO_MANY_SEMAPHORES