Jump to content

UsbRegisterDeviceNotification: Difference between revisions

From EDM2
Created page with "==Description== Registers semaphores for attach/detach notification of a specific USB device. ==Syntax== <pre> ulrc=UsbRegisterDeviceNotification(pNotifyID,hDeviceAdded,hDevi..."
 
W.m.brul (talk | contribs)
added parameter descriptions
Line 1: Line 1:
==Description==
==Description==
Registers semaphores for attach/detach notification of a specific USB device.
Registers semaphores for attach/detach notification of specific USB devices.


==Syntax==
==Syntax==
<pre>
<pre>
ulrc=UsbRegisterDeviceNotification(pNotifyID,hDeviceAdded,hDeviceRemoved,usVendor,usProduct,usBCDVersion)
ulrc = UsbRegisterDeviceNotification(pNotifyID,hDeviceAdded,hDeviceRemoved,usVendor,usProduct,usBCDVersion)
</pre>
</pre>


==Parameters==
==Parameters==
; pNotifyID :  
; pNotifyID : the address of the variable to receive the Notification Identifier.


; hDeviceAdded :  
; hDeviceAdded : the handle of the event semaphore to be posted on device attach.


; hDeviceRemoved
; hDeviceRemoved : the handle of the event semaphore to be posted on device detach.


; usVendor :  
; usVendor : the Vendor Identifier (VendorID) from the device descriptor.


; usProduct :  
; usProduct : the Product Identifier (ProductID) from the device descriptor.


; usBCDVersion :
; usBCDVersion : the Device Release Number from the device descriptor.


==Return Code==
==Return Code==
 
<pre>
0x0000 - NO_ERROR
</pre>
===Errors===
===Errors===
 
<pre>
  [0000] - NO_ERROR
0x0000 - NO_ERROR
  [0006] - ERROR_INVALID_HANDLE
0x0006 - ERROR_INVALID_HANDLE
  [0057] - ERROR_INVALID_PARAMETER
0x0057 - ERROR_INVALID_PARAMETER
  [005F] - ERROR_INTERRUPT (95)
0x005F - ERROR_INTERRUPT
  [0064] - ERROR_TOO_MANY_SEMAPHORES
0x0064 - ERROR_TOO_MANY_SEMAPHORES
  [0067] - ERROR_TOO_MANY_SEM_REQUESTS (103)
0x0067 - ERROR_TOO_MANY_SEM_REQUESTS
  [0069] - ERROR_SEM_OWNER_DIED (105)
0x0069 - ERROR_SEM_OWNER_DIED
  [1B58] - USB_NOT_INIT (7000)
0x1B58 - USB_NOT_INIT
  [1B59] - USB_ERROR_NO_MORE_NOTIFICATTIONS (7001)
0x1B59 - USB_ERROR_NO_MORE_NOTIFICATTIONS
 
</pre>
==Remarks==
==Remarks==



Revision as of 11:57, 27 January 2017

Description

Registers semaphores for attach/detach notification of specific USB devices.

Syntax

ulrc = UsbRegisterDeviceNotification(pNotifyID,hDeviceAdded,hDeviceRemoved,usVendor,usProduct,usBCDVersion)

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.
usVendor
the Vendor Identifier (VendorID) from the device descriptor.
usProduct
the Product Identifier (ProductID) from the device descriptor.
usBCDVersion
the Device Release Number from the device descriptor.

Return Code

0x0000 - NO_ERROR

Errors

0x0000 - NO_ERROR
0x0006 - ERROR_INVALID_HANDLE
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
0x1B59 - USB_ERROR_NO_MORE_NOTIFICATTIONS

Remarks

Example Code


Related Functions