IDeviceIoControl::DeviceIoControlSync method
The DeviceIoControlSync method sends a synchronous device input/output (I/O) control request to the device interface that the call to the CreateDeviceAccessInstance function specified.
Syntax
HRESULT DeviceIoControlSync( [in] DWORD ioControlCode, [in, size_is(inputBufferSize)] UCHAR *inputBuffer, [in] DWORD inputBufferSize, [out, size_is(outputBufferSize)] UCHAR *outputBuffer, [in] DWORD outputBufferSize, [out] LPDWORD bytesReturned );
Parameters
- ioControlCode [in]
-
The I/O control code for the operation.
- inputBuffer [in]
-
An optional input buffer for the operation.
- inputBufferSize [in]
-
The size of input buffer, in bytes.
- outputBuffer [out]
-
An optional output buffer for the operation.
- outputBufferSize [in]
-
The size of output buffer, in bytes.
- bytesReturned [out]
-
A pointer to a variable that receives the number of bytes that were written into the output buffer, if one was specified.
Return value
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
Because this is a synchronous method, you must not use it on a thread that can't handle being blocked for an extended period. In this case, you use the DeviceIoControlAsync method.
Requirements
|
Header |
|
|---|---|
|
IDL |
|
|
Library |
|
See also