IOCTL_CS_BUFFERS (Compact 2013)
3/26/2014
This I/O control message sends a buffer to a driver. It can be used both during initialization and also when the stream is running. Send this message with DeviceIoControl.
Syntax
BOOL DeviceIoControl(
HANDLE hDevice, // handle to device
DWORD dwIoControlCode, // use IOCTL_CS_BUFFERS
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.
- dwIoControlCode
[in] Control code for the operation. Use IOCTL_CS_BUFFERS for this operation.
- lpInBuffer
[in] Pointer to a DWORD that specifies the type of buffer operation that the driver should perform. Set the value to an element of the BUFFER_COMMANDS enumeration.
- nInBufferSize
[in] Set to sizeof(DWORD).
lpOutBuffer
[out] The value of this pointer depends on the buffer command specified in lpInBuffer as shown in the following table.lpInBuffer
lpOutBuffer
CS_ALLOCATE
A pointer to a CS_STREAM_DESCRIPTOR structure that will be populated by the driver with the list of buffers it allocated.
CS_ENQUEUE
A pointer to the buffers that the client is sending to the driver.
- CS_DEALLOCATE
A pointer the buffers that the client is releasing.
- CS_DEALLOCATE
- nOutBufferSize
[in] Set to sizeof(CS_STREAM_DESCRIPTOR).
- lpBytesReturned
Ignored.
- lpOverlapped
[in] Set to NULL.
Return Values
Returns TRUE if successful; otherwise, returns FALSE. If it returns TRUE, then the bUnitReady member of CDROM_TESTUNITREADY is also set to TRUE.
Remarks
To get extended error information, call GetLastError. GetLastError may return other standard error messages as appropriate.
Remarks
If the driver allocates the buffers, then the client calls IOCTL_CS_BUFFERS when the driver is in the paused state. If the client allocates the buffers, then the client allocates the buffers when the driver is in paused state and sends down the buffers to the driver by calling IOCTL_CS_BUFFERS.
Requirements
Header |
csmedia.h |