Share via


IOCTL_STREAM_QUERY_BUFFER_STATE (Windows CE 5.0)

Send Feedback

This IOCTL permits the caller to query the state attached buffers and optionally wait for at least one to complete.

Parameters

  • hDevice
    [in] Handle to the target object. To get a device handle, call the CreateFile function with a name dynamically obtained from the SetupDiEnumDeviceInterfaces function.
  • dwIoControlCode
    [in] IOCTL for the operation. This value identifies the target operation and the type of device on which to perform the operation. For this operation, use IOCTL_STREAM_QUERY_BUFFER_STATE.
  • lpInBuffer
    [in] Must be filled in with a properly initialized STREAM_QueryBufferState_Request structure. The sqbs_Session and sqbs_Flags members must be pre-initialized.
  • BufferSize
    [in] Set to sizeof(STREAM_QueryBufferState_Request).
  • lpOutBuffer
    [out] This field should be set to point to a STREAM_QueryBufferState_Response structure.
  • nOutBufferSize
    [in] This field should be pre-initialized with the maximum size of the lpOutBuffer. This buffer should have a STREAM_QueryBufferState_Response structure at its head, but also must have space after the structure for all of the desired extra entries of the sqbs_BufferIds array.
  • lpBytesReturned
    [out] Pointer to a DWORD variable that receives the actual count of bytes returned by the function in the output buffer.
  • lpOverlapped
    [out] If not used, set to NULL. Otherwise, this should point to a completely filled out OVERLAPPED structure that contains a valid event. The event will be signaled when the I/O operation is complete.

Return Values

If the operation succeeds, the DeviceIoControl function returns a non-zero value. If the operation fails, DeviceIoControl returns zero. To obtain extended error information, call the GetLastError function.

Remarks

As explained in the IOCTL_STREAM_ATTACH_BUFFER IOCTL, the attach/detach mechanism permits buffers to be provided and asynchronously completed by the streaming filter driver.

This command permits the application to determine which buffers at any time have actually completed. If the command is used with having the STREAM_QueryBufferState_Flag_Block flag set, the command will block until at least one buffer has completed, or until the device in question is closed by another thread or the device is physically unplugged, making it unavailable. If this flag bit is not set, the command will return immediately with a summary of the buffers completed at that point in time.

If the specified session is stopped while an IOCTL_STREAM_QUERY_BUFFER_STATE is outstanding, the IOCTL command will be aborted and completed with an error.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Avc_stream.h.

See Also

IOCTL_STREAM_START_RECV_SESSION | IOCTL_STREAM_START_XMIT_SESSION | IOCTL_STREAM_ATTACH_BUFFER | DeviceIoControl | CreateFile | STREAM_QueryBufferState_Request | STREAM_QueryBufferState_Response

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.