IFileSourceFilter::Load method (strmif.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.]
The Load
method causes a source filter to load a media file.
Syntax
HRESULT Load(
[in] LPCOLESTR pszFileName,
[in] const AM_MEDIA_TYPE *pmt
);
Parameters
[in] pszFileName
Pointer to the name of the file to open.
[in] pmt
Pointer to the media type of the file. This can be NULL.
Return value
Returns an HRESULT value.
Remarks
This method initializes 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
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | strmif.h (include Dshow.h) |
Library | Strmiids.lib |