COM_IOControl

This function implements the serial port’s I\O control routine. It is called by serial port functions such as GetComState, which is a wrapper around this function.

Syntax

BOOL COM_IOControl( DWORD dwOpenData, DWORD dwCode,
PBYTE
pBufIn, DWORD dwLenIn, PBYTE pBufOut, DWORD dwLenOut, PDWORD pdwActualOut );

Parameters

dwOpenData
Specifies a value returned from a call to the COM_Open function.
dwCode
Specifies an I\O control code to be performed.
pBufIn
Pointer to data input to the device.
dwLenIn
Specifies the number of bytes being passed in.
pBufOut
Pointer to data output from the driver.
dwLenOut
Specifies the maximum number of bytes to receive from driver.
pdwActualOut
Pointer to the actual number of bytes received from the driver.

Return Values

TRUE indicates success. FALSE indicates failure.

Remarks

This function is exported by a device driver. “COM” is the string passed in as lpszType during calls to the RegisterDevice function.

This function is defined in the Mdd.c file.

See Also

COM_IOControl