| Online Development Notebook > Index > ODN > USBm DLL Programming > DLL Commands > ReadDevice |
ReadDevice
Description:
This is a USBm.dll function that reads raw bytes from a device.
Command Syntax:
true⁄false USBm_ReadDevice(device, array)
The USBm_ReadDevice 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. |
| array | Series of eight bytes read from device. |
Remarks:
Note: USBm_ReadDevice returns TRUE if the device is successfully read.
VB Declaration (USBmAPI.bas)
| Public Declare Function USBm_ReadDevice _ Lib "USBm.dll" _ (ByVal device As Byte, _ ByRef data As Byte) _ As Integer |
VB Example
| Dim InBuffer(10) As Byte USBm_ReadDevice 2, InBuffer(0) |
This code fragment shows reading a series of bytes from device two. The bytes would follow the "raw" command format.
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 |