IKsDataTypeHandler::KsCompleteIoOperation method (ksproxy.h)

The KsCompleteIoOperation method cleans up the extended header and completes the input and output (I/O) operation.

Syntax

HRESULT KsCompleteIoOperation(
  [in, out] IMediaSample  *Sample,
  [in, out] PVOID         StreamHeader,
  [in]      KSIOOPERATION IoOperation,
  [in]      BOOL          Cancelled
);

Parameters

[in, out] Sample

Pointer to the IMediaSample interface for the associated media sample.

[in, out] StreamHeader

Pointer to a buffer that contains the extended header information.

[in] IoOperation

Value that specifies the type of I/O operation. This value can be one of the following values from the KSIOOPERATION enumerated type:

Value Description
KsIoOperation_Write Write data to stream.
KsIoOperation_Read Read data from stream.

[in] Cancelled

Boolean value that is TRUE if the I/O operation was canceled and FALSE otherwise.

Return value

Returns NOERROR if successful; otherwise, returns an error code. If the stream's major type is KSDATAFORMAT_TYPE_AUDIO, a KsCompleteIoOperation call is inapplicable, so KsCompleteIoOperation automatically returns NOERROR.

Remarks

The client only calls KsCompleteIoOperation if the data type handler indicated to the client the existence of extended header information in a call to the IKsDataTypeHandler::KsQueryExtendedSize method.

For more information about IMediaSample, see the Microsoft Windows SDK documentation.

Requirements

Requirement Value
Target Platform Desktop
Header ksproxy.h (include Ksproxy.h)

See also

IKsDataTypeHandler::KsQueryExtendedSize