User Manual
RAC6182-Specific Extensions to the CE API 4–55
Publication 6182-UM002B-EN-P
Applications can utilize the RAC6182 platform's serial ports via the
standard WIN32 API's "File I/O" interface. A complete description of
the File I/O interface is outside the scope of this document. Users are
referred to the Microsoft Win32 SDK documentation for additional
information. However, some of the arguments needed by the File I/O
functions for serial port control are specific to the RAC6182. These
arguments are represented by macros defined in the c header file
othersdk.h, and are treated here in detail.
DeviceIoControl
This function accesses the serial port. It is prototyped in Winbase.h
(included in Windows.h).
Syntax
#include <Windows.h>
#include <othersdk.h>
BOOL DeviceIoControl(
HANDLE hDevice,
DWORD dwIOControlCode,
LPVOID lpInBuffer,
DWORD nInBufferSize,
LPVOID lpOutBuffer,
DWORD nOutBufferSize,
LPDWORD lpBytesReturned,
LPOVERLAPPED lpOverlapped
)
Remarks
See the documentation in the Microsoft Windows CE development kit
for additional information.
Parameter Description
hDevice Handle to device (returned by CreateFile)
dwIOControlCode
Evaluate with one of the macros defined in
othersdk.h. (See macro descriptions that follow.)
lpInBuffer Pointer to input data buffer. Used for set operations
nInBufferSize Size of input data buffer. Used for set operations.
lpOutBuffer Pointer to output data buffer. Used for get
operations.
nOutBufferSize Size of output data buffer. Used for get operations.
lpBytesReturned Pointer to count of bytes returned
lpOverlapped Pointer to overlapped information (NULL for CE)
Streams Interface for
Serial Ports