| Online Development Notebook > Index > ODN > USBm DLL Programming > DLL Commands > DevicePID |
DevicePID
Description:
This is a USBm.dll function that returns the Product ID from a USB device.
Command Syntax:
number USBm_DevicePID(device)
The USBm_DevicePID function syntax has these parts:
| Part | Description |
| device | Valid device from 0 to the maximum number of devices found (minus 1) . Any other number results in a FALSE return. |
Remarks:
Note: USBm_DevicePID returns FALSE for an invalid device, otherwise the return value is the device PID
VB Declaration (USBmAPI.bas)
| Public Declare Function USBm_DevicePID _ Lib "USBm.dll" _ (ByVal device As Byte) _ As Integer |
VB Example
| Dim result As Integer result = USBm_DevicePID |
This code fragment shows that result is loaded with the PID of the device, or with FALSE if the device does not exist.
C Example
-TBD-
| Hardware: U401 USB Interface U421 USB Interface |
| Programming: USBm DLL Programming Download Files |
| Application Notes: U4x1 Application Notes Misc Applications and Information FAQ |