PCI-1680U/1682U User Manual
46
4.3.10
GetOverlappedResult
When user's operation cannot be finished immediately in asynchronous mode, this
function should be called to wait operation to be completed.
Syntax
BOOL GetOverlappedResult(
HANDLE
hDevice
,
LPOVERLAPPED
lpOverlapped
,
LPDWORD
lpNumberOfFramesTransferred
,
BOOL
bWait
);
Parameters
Return Value
Successful: return non-zero values. Unsuccessful: return zero value. Please call Get-
LastError function.
Example
#include <windows.h>
#include <stdio.h>
void main( )
{
HANDLE hDevice;
OVERLAPPED ov;
BOOL bSuccess;
DWORD dwEvtMask;
DWORD dwLength;
hDevice = CreateFile( "\\\\.\\CAN1",
GENERIC_READ | GENERIC_WRITE,
0, // exclusive access
NULL, // default security attributes
OPEN_EXISTING,
FILE_FLAG_OVERLAPPED,
NULL
);
Name Direction
Description
hDevice
Input
Handle of the device which was opened.
lpOverlapped Input
Events need to be waited are included. Refer to MSDN
for more information.
lpNumberOf-
FramesTransferred
Output
ReadFile and WriteFile are real numbers of data written
and read; WaitCommEvent is not defined.
bWait Input
TRUE, will not return until read/write operation is fin-
ished. FALSE, return immediately no matter the opera-
tion is finished or not. Call GetLastError to return
ERROR_IO_INCOMPLETE. Refer to MSDN for
detailed information.
Summary of Contents for PCI-1680U
Page 10: ...PCI 1680U 1682U User Manual 4 ...
Page 16: ...PCI 1680U 1682U User Manual 10 5 Click Next as the following 6 Click Next as the following ...
Page 22: ...PCI 1680U 1682U User Manual 16 ...
Page 26: ...PCI 1680U 1682U User Manual 20 Figure 3 2 PCI 1682U Silk Screen ...
Page 85: ...79 PCI 1680U 1682U User Manual Chapter 4 Software Requirements WDM CE ...
Page 90: ...PCI 1680U 1682U User Manual 84 4 8 2 2 Receive flow chart ...
Page 91: ...85 PCI 1680U 1682U User Manual Chapter 4 Software Requirements 4 8 2 3 Configure flow chart ...
Page 103: ...97 PCI 1680U 1682U User Manual Chapter 5 Pin Assignments and Wiring ...