Jump to content

UsbQueryVersion

From EDM2
Revision as of 18:34, 26 January 2017 by W.m.brul (talk | contribs) (updated whole page)

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