MFRegisterLocalByteStreamHandler function (mfapi.h)
Registers a byte-stream handler in the caller's process.
Syntax
HRESULT MFRegisterLocalByteStreamHandler(
[in] PCWSTR szFileExtension,
[in] PCWSTR szMimeType,
[in] IMFActivate *pActivate
);
Parameters
[in] szFileExtension
A string that contains the file name extension for this handler.
[in] szMimeType
A string that contains the MIME type for this handler.
[in] pActivate
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
Requirement | Value |
---|---|
Minimum supported client | Windows 8 [desktop apps only] |
Minimum supported server | Windows Server 2012 [desktop apps only] |
Target Platform | Windows |
Header | mfapi.h |
Library | Mfplat.lib |
DLL | Mfplat.dll |