UsbDeregisterNotification: Difference between revisions
Appearance
added parameter descriptions |
added example code |
||
Line 32: | Line 32: | ||
==Example Code== | ==Example Code== | ||
<pre> | <pre> | ||
//Code Snippet - UsbDeregisterNotification | |||
{ | |||
ulrc = UsbDeregisterNotification(NotifyID); | |||
printf("\nUsbDeregisterNotification - ulrc: [%04X] (%hu)",ulrc,ulrc); | |||
//release semaphores | |||
ulrc = DosCloseEventSem(hDeviceAdded); | |||
printf("\nDosCloseEventSem - ulrc: [%04X] (%hu)",ulrc,ulrc); | |||
ulrc = DosCloseEventSem(hDeviceRemoved); | |||
printf("\nDosCloseEventSem - ulrc: [%04X] (%hu)",ulrc,ulrc); | |||
} | |||
</pre> | </pre> | ||
Revision as of 18:52, 29 January 2017
Description
Removes the registration of attach/detach notification semaphores.
Syntax
ulrc = UsbDeregisterNotification(NotifyID)
Parameters
- NotifyID
- the NotifyID received from UsbChangeNotification or UsbDeviceNotification.
Return Code
0x0000 - NO_ERROR
Errors
0x0006 - ERROR_INVALID_HANDLE 0x001F - ERROR_GEN_FAILURE 0x0057 - ERROR_INVALID_PARAMETER 0x005F - ERROR_INTERRUPT 0x0064 - ERROR_TOO_MANY_SEMAPHORES 0x0067 - ERROR_TOO_MANY_SEM_REQUESTS 0x0069 - ERROR_SEM_OWNER_DIED 0x1B58 - USB_NOT_INIT 0xFF1F - ERROR_GEN_FAILURE 0xFF57 - ERROR_INVALID_PARAMETER 0xFFBB - ERROR_SEM_NOT_FOUND
Remarks
Example Code
//Code Snippet - UsbDeregisterNotification { ulrc = UsbDeregisterNotification(NotifyID); printf("\nUsbDeregisterNotification - ulrc: [%04X] (%hu)",ulrc,ulrc); //release semaphores ulrc = DosCloseEventSem(hDeviceAdded); printf("\nDosCloseEventSem - ulrc: [%04X] (%hu)",ulrc,ulrc); ulrc = DosCloseEventSem(hDeviceRemoved); printf("\nDosCloseEventSem - ulrc: [%04X] (%hu)",ulrc,ulrc); }