Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

MFRegisterLocalByteStreamHandler function

Registers a byte-stream handler in the caller's process.


HRESULT MFRegisterLocalByteStreamHandler(
  _In_ PCWSTR      szFileExtension,
  _In_ PCWSTR      szMimeType,
  _In_ IMFActivate *pActivate


szFileExtension [in]

A string that contains the file name extension for this handler.

szMimeType [in]

A string that contains the MIME type for this handler.

pActivate [in]

A pointer to the IMFActivate interface of an activation object. The caller implements this interface. The IMFActivate::ActivateObject method of the activation object must create a byte-stream handler. The byte-stream handler exposes the IMFByteStreamHandler interface.

Return value

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.


Byte-stream handlers are used in Microsoft Media Foundation during the source resolution process, which creates a media source from a URL. For more information, see Scheme Handlers and Byte-Stream Handlers.

Within a process, local byte-stream handlers take precedence over byte-stream handlers that are registered in the registry. Local byte-stream handlers are not visible to other processes.

Use this function if you want to register a custom byte-stream handler for your application, but do not want the handler available to other applications.

Either szFileExtension or szMimeType can be NULL; at least one must be non-NULL.


Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]







See also

Scheme Handlers and Byte-Stream Handlers



Community Additions

© 2015 Microsoft