
PCI-1680U/1682U User Manual 36
4.3.4 ReadFile
Users can use this interface to read data from CAN port which was opened. One or
more frames can be selected each time.
Syntax
BOOL ReadFile(
HANDLE hDevice,
LPVOID lpBuffer,
DWORD nNumberOfFramesToRead,
LPDWORD lpNumberOfFramesRead,
LPOVERLAPPED lpOverlapped
);
Parameters
Note! The third and fourth parameters of ReadFile are defined as byte length
in MSDN, but stand for the number of frames in Advantech CAN Win-
dows WDM&CE Driver.
Name Direction Description
hDevice Input Handle of the device which was opened.
lpBuffer Output Start address of receive buffer.
nNmberOf-
FramesToRead
Input
Number of frames to be received from drivers. The defini-
tion here is different from that in MSDN.
lpNumberOf-
FramesRead
Output
Real number of frames received from driver. The definition
here is different from that in MSDN.
lpOverlapped Input
If CreateFile uses asynchronous open, asynchronous oper-
ation must be supported here. Please refer to MSDN for
detailed instruction to asynchronous open.
*Note In WINDOWS CE,set to NULL.
Comentarios a estos manuales