Share via


IMediaStream::CreateSharedSample (Windows CE 5.0)

Send Feedback

This method creates a new stream sample that shares the same backing object as the existing sample.

HRESULT CreateSharedSample(IStreamSample* pExistingSample,DWORDdwFlags,IStreamSample** ppNewSample);

Parameters

  • pExistingSample
    [in] Pointer to the existing sample.
  • dwFlags
    [in] Reserved for flag data. Must be zero.
  • ppNewSample
    [out] Address of a pointer to an IStreamSample interface that will point to the newly created shared sample.

Return Values

Returns one of the following values.

Value Description
E_OUTOFMEMORY There is not enough memory available to create the sample.
E_POINTER One of the parameters is invalid.
MS_E_INCOMPATIBLE The existing sample is not compatible with the specified media stream.
S_OK Success; ppNewSample points to the newly created sample.

Remarks

This method calls IUnknown::QueryInterface on the existing sample to retrieve the media type-specific information, which it uses to create the shared sample.

Requirements

DirectShow applications and DirectShow filters have different include file and link library requirements.

For more information, see Setting Up the Build Environment.

OS Versions: Windows CE 2.12 and later. Version 2.12 requires DXPAK 1.0 or later.

See Also

IMediaStream Interface

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.