IFileSourceFilter::Load

 
Microsoft DirectShow 9.0

IFileSourceFilter::Load

The Load method causes a source filter to load a media file.

Syntax

  HRESULT Load(
  LPCOLESTR pszFileName,
  const AM_MEDIA_TYPE *pmt
);

Parameters

pszFileName

[in] Pointer to the name of the file to open.

pmt

[in] Pointer to the media type of the file. This can be NULL.

Return Values

Returns an HRESULT value.

Remarks

This method initializates the interface. It is not designed to load multiple files, and any calls to this method after the first call will fail.

For the File Source (Async) filter, pszFileName specifies the absolute path name of a local file.  For the File Source (URL) filter, pszFileName specifies the URL of a file to download. For other filter implementations, pszFileName might require a file name or a URL, depending on the filter.

Requirements

Header: Declared in Strmif.h; include Dshow.h.

Library: Use Strmiids.lib.

See Also