Source Plug-ins

[The feature associated with this page, Windows Media Format 11 SDK, is a legacy feature. It has been superseded by Source Reader and Sink Writer. Source Reader and Sink Writer have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use Source Reader and Sink Writer instead of Windows Media Format 11 SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

A source plug-in is an option available to developers who wish to implement their own storage system for Windows Media® files. A source plug-in enables this through the implementation of a COM interface called IStream, which is a standard interface for providing data.

The source plug-in should be written as a dll, and its presence is made known to the SDK through a registry entry. There can be any number of source plug-ins implemented this way. The source plug-in must export the WMCreateStreamForURL function.

To register a source plug-in, the following registry entry should be added:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Media\WMSDK\sources

Name = "any unique name"

Value = pathname of the source plug-in dll

Once the dll has been registered, the application can use the IWMReader::Open method (with the appropriate URL as a parameter) to access stream data, which can be stored in files or user-defined data containers.

IWMReader::Open

Programming Reference

WMCreateStreamForURL