UsbQueryVersion: Difference between revisions
Appearance
mNo edit summary |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
==Syntax== | ==Syntax== | ||
<pre> | <pre> | ||
ulrc=UsbQueryVersion( | ulrc = UsbQueryVersion(pUsbVersion,pulBufLen) | ||
</pre> | </pre> | ||
==Parameters== | ==Parameters== | ||
; | ; pUsbVersion : the address of the buffer to receive the version numbers. | ||
; | ; pulBufLen : the address of the variable containing the buffer length. | ||
==Return Code== | ==Return Code== | ||
<pre> | |||
0x0000 - NO_ERROR | |||
</pre> | |||
===Errors=== | ===Errors=== | ||
<pre> | |||
0x0057 - ERROR_INVALID_PARAMETER | |||
0x1B58 - USB_NOT_INIT | |||
0xFF13 - ERROR_I24_INVALID_PARAMETER | |||
0xFF1F - ERROR_GEN_FAILURE | |||
0xFF57 - ERROR_INVALID_PARAMETER | |||
</pre> | |||
==Remarks== | ==Remarks== | ||
==Example Code== | ==Example Code== | ||
<pre> | <pre> | ||
//Code Snippet - UsbQueryVersion | |||
{ | |||
APIRET ulrc; | |||
PULONG pulBufLen; | |||
PUSBVERSION pUsbVersion; | |||
ULONG ulBufLen = sizeof(USBVERSION); | |||
USBVERSION UsbVersion; | |||
pulBufLen = &ulBufLen; | |||
pUsbVersion = &UsbVersion; | |||
ulrc = UsbQueryVersion(pUsbVersion,pulBufLen); | |||
printf("\nUsbQueryVersion - ulrc: 0x%04X (%hu)",ulrc,ulrc); | |||
if (!ulrc) //success | |||
{ | |||
printf(" - USBCALLS: %hu.%hu",pUsbVersion->DllMajor,pUsbVersion->DllMinor); | |||
printf(" - USBRESMG: %hu.%hu",pUsbVersion->UsbMajor,pUsbVersion->UsbMinor); | |||
} | |||
} | |||
</pre> | </pre> | ||
==Related Functions== | ==Related Functions== | ||
* [[UsbQueryNumberDevices]] | |||
* [[UsbRegisterChangeNotification]] | |||
* [[UsbRegisterDeviceNotification]] | |||
* [[UsbOpen]] | |||
[[Category:USBCalls]] | [[Category:USBCalls]] |
Latest revision as of 17:24, 15 August 2017
Description
Obtains the version numbers of the USB Resource Manager components.
Syntax
ulrc = UsbQueryVersion(pUsbVersion,pulBufLen)
Parameters
- pUsbVersion
- 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; PUSBVERSION pUsbVersion; ULONG ulBufLen = sizeof(USBVERSION); USBVERSION UsbVersion; pulBufLen = &ulBufLen; pUsbVersion = &UsbVersion; ulrc = UsbQueryVersion(pUsbVersion,pulBufLen); printf("\nUsbQueryVersion - ulrc: 0x%04X (%hu)",ulrc,ulrc); if (!ulrc) //success { printf(" - USBCALLS: %hu.%hu",pUsbVersion->DllMajor,pUsbVersion->DllMinor); printf(" - USBRESMG: %hu.%hu",pUsbVersion->UsbMajor,pUsbVersion->UsbMinor); } }