Jump to content

UsbDeregisterNotification: Difference between revisions

From EDM2
Created page with "==Description== Removes the registration of attach/detach notification semaphores. ==Syntax== <pre> ulrc=UsbDeregisterNotification(NotifyID) </pre> ==Parameters== ; NotifyID..."
 
W.m.brul (talk | contribs)
 
(4 intermediate revisions by the same user not shown)
Line 4: Line 4:
==Syntax==
==Syntax==
<pre>
<pre>
ulrc=UsbDeregisterNotification(NotifyID)
ulrc = UsbDeregisterNotification(NotifyID)
</pre>
</pre>


==Parameters==
==Parameters==
; NotifyID :  
; NotifyID : the NotifyID received from UsbChangeNotification or UsbDeviceNotification.


==Return Code==
==Return Code==
 
<pre>
0x0000 - NO_ERROR
</pre>
===Errors===
===Errors===
 
<pre>
  [0000] - NO_ERROR
0x0006 - ERROR_INVALID_HANDLE
  [0006] - ERROR_INVALID_HANDLE
0x001F - ERROR_GEN_FAILURE
  [001F] - ERROR_GEN_FAILURE
0x0057 - ERROR_INVALID_PARAMETER
  [0057] - ERROR_INVALID_PARAMETER
0x005F - ERROR_INTERRUPT
  [005F] - ERROR_INTERRUPT (95)
0x0064 - ERROR_TOO_MANY_SEMAPHORES
  [0064] - ERROR_TOO_MANY_SEMAPHORES
0x0067 - ERROR_TOO_MANY_SEM_REQUESTS
  [0067] - ERROR_TOO_MANY_SEM_REQUESTS (103)
0x0069 - ERROR_SEM_OWNER_DIED
  [0069] - ERROR_SEM_OWNER_DIED (105)
0x1B58 - USB_NOT_INIT
  [1B58] - USB_NOT_INIT (7000)
0xFF1F - ERROR_GEN_FAILURE
  [FF1F] - ERROR_GEN_FAILURE
0xFF57 - ERROR_INVALID_PARAMETER
  [FF57] - ERROR_INVALID_PARAMETER
0xFFBB - ERROR_SEM_NOT_FOUND
  [FFBB] - ERROR_SEM_NOT_FOUND
</pre>
 
==Remarks==
==Remarks==


==Example Code==
==Example Code==
<pre>
<pre>
//Code Snippet - UsbDeregisterNotification
{
  ulrc = UsbDeregisterNotification(NotifyID);
  printf("\nUsbDeregisterNotification - ulrc: 0x%04X (%hu)",ulrc,ulrc);
  //release semaphores
  ulrc = DosCloseEventSem(hDeviceAdded);
  printf("\nDosCloseEventSem - ulrc: 0x%04X (%hu)",ulrc,ulrc);
  ulrc = DosCloseEventSem(hDeviceRemoved);
  printf("\nDosCloseEventSem - ulrc: 0x%04X (%hu)",ulrc,ulrc);
}
</pre>
</pre>


==Related Functions==
==Related Functions==
* [[UsbRegisterChangeNotification]]
* [[UsbRegisterDeviceNotification]]


[[Category:USBCalls]]
[[Category:USBCalls]]

Latest revision as of 17:25, 12 February 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: 0x%04X (%hu)",ulrc,ulrc);

  //release semaphores
  ulrc = DosCloseEventSem(hDeviceAdded);
  printf("\nDosCloseEventSem - ulrc: 0x%04X (%hu)",ulrc,ulrc);
  ulrc = DosCloseEventSem(hDeviceRemoved);
  printf("\nDosCloseEventSem - ulrc: 0x%04X (%hu)",ulrc,ulrc);
}

Related Functions