Jump to content

UsbQueryNumberDevices: Difference between revisions

From EDM2
Ak120 (talk | contribs)
m sections with no content
Ak120 (talk | contribs)
mNo edit summary
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
Obtains the total number of USB devices currently attached.
==Description==
Obtains the total number of currently attached USB devices.


==Syntax==
==Syntax==
ulrc = UsbQueryNumberDevices(pulNumDev)
==Parameters==
; pulNumDev : the address of the variable to receive the Total Number.
==Return Code==
0x0000 - NO_ERROR
===Errors===
<pre>
<pre>
ulrc=UsbQueryNumberDevices(*pulNumDev)
0x0057 - ERROR_INVALID_PARAMETER
0x1B58 - USB_NOT_INIT
0xFF13 - ERROR_I24_INVALID_PARAMETER
0xFF1F - ERROR_GEN_FAILURE
0xFF57 - ERROR_INVALID_PARAMETER
</pre>
</pre>


==Parameters==
==Remarks==
; pulNumDev :  
 
==Example Code==
<pre>
//Code Snippet - UsbQueryNumberDevices
{
  APIRET ulrc;
  PULONG pulNumDev;
  ULONG ulNumDev;
 
  pulNumDev = &ulNumDev;
  ulrc = UsbQueryNumberDevices(pulNumDev);
  printf("\nUsbQueryNumberDevices - ulrc: 0x%04X (%hu)",ulrc,ulrc);
  if (!ulrc) //success
  {
    printf(" - NumberDevices: %hu",ulNumDev);
  }
}
</pre>


==Return Code==
==Related Functions==
Errors
* [[UsbQueryDeviceReport]]
[0000] - NO_ERROR
* [[UsbQueryDeviceInfo]]
[0057] - ERROR_INVALID_PARAMETER
* [[UsbOpen]]
[1B58] - USB_NOT_INIT (7000)
[FF13] - ERROR_I24_INVALID_PARAMETER
[FF1F] - ERROR_GEN_FAILURE
[FF57] - ERROR_INVALID_PARAMETER


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

Latest revision as of 20:47, 13 September 2021

Description

Obtains the total number of currently attached USB devices.

Syntax

ulrc = UsbQueryNumberDevices(pulNumDev)

Parameters

pulNumDev
the address of the variable to receive the Total Number.

Return Code

0x0000 - NO_ERROR

Errors

0x0057 - ERROR_INVALID_PARAMETER
0x1B58 - USB_NOT_INIT
0xFF13 - ERROR_I24_INVALID_PARAMETER
0xFF1F - ERROR_GEN_FAILURE
0xFF57 - ERROR_INVALID_PARAMETER

Remarks

Example Code

//Code Snippet - UsbQueryNumberDevices
{
  APIRET ulrc;
  PULONG pulNumDev;
  ULONG ulNumDev;

  pulNumDev = &ulNumDev;
  ulrc = UsbQueryNumberDevices(pulNumDev);
  printf("\nUsbQueryNumberDevices - ulrc: 0x%04X (%hu)",ulrc,ulrc);
  if (!ulrc) //success
  {
    printf(" - NumberDevices: %hu",ulNumDev);
  }
}

Related Functions