Jump to content

UsbQueryVersion: Difference between revisions

From EDM2
W.m.brul (talk | contribs)
updated whole page
Line 4: Line 4:
==Syntax==
==Syntax==
<pre>
<pre>
ulrc=UsbQueryVersion(*pUsbQueryVersion,*pulBufLen)
ulrc = UsbQueryVersion(pUsbQueryVersion,pulBufLen)
</pre>
</pre>


==Parameters==
==Parameters==
; *pUsbQueryVersion :  
; pUsbQueryVersion : the address of the buffer to receive the version numbers.


; *pulBufLen :
; pulBufLen : the address of the variable containing the buffer length.


==Return Code==
==Return Code==
 
<pre>
0x0000 - NO_ERROR
</pre>
===Errors===
===Errors===
  [0000] - NO_ERROR
<pre>
  [0057] - ERROR_INVALID_PARAMETER
0x0057 - ERROR_INVALID_PARAMETER
  [1B58] - USB_NOT_INIT (7000)
0x1B58 - USB_NOT_INIT
  [FF13] - ERROR_I24_INVALID_PARAMETER
0xFF13 - ERROR_I24_INVALID_PARAMETER
  [FF1F] - ERROR_GEN_FAILURE
0xFF1F - ERROR_GEN_FAILURE
  [FF57] - ERROR_INVALID_PARAMETER
0xFF57 - ERROR_INVALID_PARAMETER
 
</pre>
==Remarks==
==Remarks==


==Example Code==
==Example Code==
<pre>
<pre>
//Code Snippet - UsbQueryVersion
{
  APIRET ulrc;
  PULONG pulBufLen;
  PUSBQUERYVERSION pUsbQueryVersion;
  ULONG ulBufLen = sizeof(USBQUERYVERSION);
  USBQUERYVERSION QueryVersion;
  pulBufLen = &ulBufLen;
  pUsbQueryVersion = &QueryVersion;
  ulrc = UsbQueryVersion(pUsbQueryVersion,pulBufLen);
  printf("\nUsbQueryVersion - ulrc: 0x%04X (%hu)",ulrc,ulrc);
  if (!ulrc) //success
  {
    printf(" - USBCALLS: %hu.%hu",pUsbQueryVersion->DllMajor,pUsbQueryVersion->DllMinor);
    printf(" - USBRESMG: %hu.%hu",pUsbQueryVersion->UsbMajor,pUsbQueryVersion->UsbMinor);
  }
}
</pre>
</pre>



Revision as of 18:34, 26 January 2017

Description

Obtains the version numbers of the USB Resource Manager components.

Syntax

ulrc = UsbQueryVersion(pUsbQueryVersion,pulBufLen)

Parameters

pUsbQueryVersion
the address of the buffer to receive the version numbers.
pulBufLen
the address of the variable containing the buffer length.

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 - UsbQueryVersion
{
  APIRET ulrc;
  PULONG pulBufLen;
  PUSBQUERYVERSION pUsbQueryVersion;
  ULONG ulBufLen = sizeof(USBQUERYVERSION);
  USBQUERYVERSION QueryVersion;

  pulBufLen = &ulBufLen;
  pUsbQueryVersion = &QueryVersion;
  ulrc = UsbQueryVersion(pUsbQueryVersion,pulBufLen);
  printf("\nUsbQueryVersion - ulrc: 0x%04X (%hu)",ulrc,ulrc);
  if (!ulrc) //success
  {
    printf(" - USBCALLS: %hu.%hu",pUsbQueryVersion->DllMajor,pUsbQueryVersion->DllMinor);
    printf(" - USBRESMG: %hu.%hu",pUsbQueryVersion->UsbMajor,pUsbQueryVersion->UsbMinor);
  }
}

Related Functions