IOCTL_SERIAL_WAIT_ON_MASK (Compact 2013)
3/26/2014
This I/O control message instructs a serial driver to wait for a communications event that matches the event specified in the event mask. Send this message with DeviceIoControl.
Syntax
BOOL DeviceIoControl(
HANDLE hDevice, // handle to the device
DWORD dwIoControlCode, // use IOCTL_SERIAL_WAIT_ON_MASK
LPVOID lpInBuffer, // pointer to input buffer
DWORD nInBufferSize, // input buffer size
LPVOID lpOutBuffer, // pointer to output buffer
DWORD nOutBufferSize, // output buffer size
LPDWORD lpBytesReturned, // number of bytes returned
OVERLAPPED lpOverlapped // pointer to OVERLAPPED structure
);
Parameters
- hDevice
[in] Handle to the device. To obtain a device handle, call COM_Open.
- dwIoControlCode
[in] The control code for the operation. Use IOCTL_SERIAL_WAIT_ON_MASK for this operation.
- lpInBuffer
[in] Set to NULL.
- nInBufferSize
[in] Set to zero.
- lpOutBuffer
[in][out] A pointer to a DWORD variable to place the event mask. The returned mask shows the event that terminated the wait event. If a process attempts to change the device handle's event mask by using IOCTL_SERIAL_SET_WAIT_MASK, the driver should return immediately with an empty event mask.
- nOutBufferSize
[in] sizeof(DWORD).
- lpBytesReturned
[out] Pointer to a DWORD variable to return the length of the returned data. If there is no error, this parameter should be set to sizeof(DWORD.
- lpOverlapped
[in] Not supported, set to NULL.
Return Values
Returns TRUE if successful; otherwise, returns FALSE.
Remarks
To get extended error information, call GetLastError. GetLastError may return other standard error messages as appropriate.
The returned mask shows the event that terminated the wait. If a process attempts to change the device handle's event mask by using the IOCTL_SERIAL_SET_WAIT_MASK call, the driver should return immediately with (DWORD)0 as the returned event mask.
Requirements
Header |
pegdser.h |
See Also
Reference
Serial Port Driver IOCTLs
COM_IOControl
COM_Open
DeviceIoControl
IOCTL_SERIAL_GET_WAIT_MASK
IOCTL_SERIAL_SET_WAIT_MASK