Compartir a través de


IOCTL_STREAM_DETACH_BUFFER (Windows CE 5.0)

Send Feedback

This IOCTL permits the caller to detach a buffer that was previously attached to an individual session.

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_DETACH_BUFFER.
  • lpInBuffer
    [in] Must be filled in with a properly initialized STREAM_DetachBuffers_Request structure. The sdb_Session, sdb_NumberOfIds, and sdb_BufferIds members must be pre-initialized.
  • BufferSize
    [in] Set to the size of the STREAM_DetachBuffers_Request structure. The last entry of the structure, sdb_Buffers, is an array that can extend infinitely, so this field should represent the full size of the structure used rather than merely sizeof(STREAM_DetachBuffers_Request).
  • lpOutBuffer
    [in] This parameter should be set to NULL.
  • nOutBufferSize
    [in] This parameter should be set to zero.
  • 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 IOCTL_STREAM_ATTACH_BUFFER, the attach/detach mechanism permits buffers to be provided and asynchronously completed by the streaming filter driver.

Any buffer that is attached must be detached. Completion of a buffer by the driver does not imply any sort of automatic detachment; that action is always required by the application.

A buffer does not have to complete to be detached. Attempting to detach an incomplete buffer will simply cancel any implied action and detach the buffer from the session.

No application should attempt to access a particular buffer memory while the buffer is still attached to a session. Once detached, for a receive session the buffer will contain the received data; for a transmit session the buffer will then be reusable by the application.

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_DetachBuffers_Request

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.