Expand Minimize

MFRegisterLocalByteStreamHandler function

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

Syntax


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

Parameters

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.

Remarks

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.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Mfapi.h

DLL

Mfplat.lib

See also

Scheme Handlers and Byte-Stream Handlers

 

 

Community Additions

ADD
Show:
© 2014 Microsoft