IOControl (Windows Embedded CE 6.0)
1/5/2010
This function, exported by the installable ISR DLL, enables a communication path from the interrupt service thread (IST) to the ISR.
Syntax
BOOL IOControl(
DWORD dwInst,
DWORD dwIoControlCode,
LPVOID lpInBuf,
DWORD nInBufSize,
LPVOID lpOutBuf,
DWORD nOutBufSize,
LPDWORD lpBytesReturned
);
Parameters
- dwInst
[in] Value that identifies the instance of the ISR handler.
- dwIoControlCode
[in] Control code for the operation. This value identifies the specific operation to be performed and the type of device on which to perform it.
- lpInBuf
[in] Pointer to a buffer that contains the data required to perform the operation. This parameter can be NULL if the dwIoControlCode parameter specifies an operation that does not require input data.
- nInBufSize
[in] Size, in bytes, of the buffer pointed to by lpInBuffer.
- lpOutBuf
[out] Pointer to a buffer that receives the operation's output data. This parameter can be NULL if the dwIoControlCode parameter specifies an operation that does not produce output data.
- nOutBufSize
[in] Size, in bytes, of the buffer pointed to by lpOutBuffer.
lpBytesReturned
[out] Pointer to a variable that receives the size, in bytes, of the data stored in the buffer pointed to by lpOutBuffer.If the output buffer is too small to return data, the call fails, the GetLastError function returns the ERROR_INSUFFICIENT_BUFFER error code, and the returned byte count is zero.
If the output buffer can only hold some data, the call fails, the OS returns as much information as it can, GetLastError returns the ERROR_MORE_DATA error code, and lpBytesReturned indicates the amount of data returned.
Your application should then call the DeviceIoControl function again with the same operation, specifying a new starting point.
Return Value
If the function succeeds, TRUE is returned; otherwise, FALSE is returned.
Remarks
IOControl must be exported for any DLL that implements installable ISR. IOControl provides a way to share memory and information between the IST and ISR.
For more information about installable ISRs, I/O control codes sent to an installable ISR, and other functions exported by the installable ISR DLL, see Installable ISRs.
When adding custom IOCTLs handled by IoControl, the last identifier used is equal to 67 for kernel IOCTLs based on FILE_DEVICE_HAL.
The function codes 0 through 2047 are reserved for Microsoft; codes 2048 through 4095 are reserved for customers.
Currently, internal product teams and external customers are using values in the range of 1000 through 1100.
Requirements
Header | Developer Implemented |
Library | Developer Implemented |
Windows Embedded CE | Windows CE .NET 4.0 and later |