Partager via


IAMMultiMediaStream::OpenMoniker method (amstream.h)

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

Note  This interface is deprecated. New applications should not use it.
 
The OpenMoniker method opens a file or device moniker; you can read media data from this moniker if DirectShow supports the moniker.

Syntax

HRESULT OpenMoniker(
  [in] IBindCtx *pCtx,
  [in] IMoniker *pMoniker,
  [in] DWORD    dwFlags
);

Parameters

[in] pCtx

Pointer to the bind context associated with the moniker.

[in] pMoniker

Pointer to an IMoniker interface that specifies the moniker you want to open.

[in] dwFlags

Value that modifies how the filter graph will render the specified file. This value is a combination of one or more of the following flags.

Value Description
AMMSF_NOCLOCK Run the stream with no clock.
AMMSF_NORENDER Open the file, but do not render any streams. This flag should always be accompanied with the AMMSF_RUN flag.
AMMSF_RENDERALLSTREAMS Render all streams, including those that do not have an existing media stream.
AMMSF_RENDERTOEXISTING Only render to existing streams.
AMMSF_RUN Set the stream into the run state.

Return value

Returns S_OK if successful or E_INVALIDARG if the dwFlags parameter is invalid.

Requirements

Requirement Value
Target Platform Windows
Header amstream.h

See also

IAMMultiMediaStream Interface