IMFInputTrustAuthority::RequestAccess method (mfidl.h)
Requests permission to perform a specified action on the stream.
Syntax
HRESULT RequestAccess(
[in] MFPOLICYMANAGER_ACTION Action,
[out] IMFActivate **ppContentEnablerActivate
);
Parameters
[in] Action
The requested action, specified as a member of the MFPOLICYMANAGER_ACTION enumeration.
[out] ppContentEnablerActivate
Receives the value NULL or a pointer to the IMFActivate interface. The IMFActivate interface is used to create a content enabler object. The caller must release the interface. For more information, see Remarks.
Return value
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
Return code | Description |
---|---|
|
The user has permission to perform this action. |
|
The user must individualize the application. |
|
The user must obtain a license. |
Remarks
This method verifies whether the user has permission to perform a specified action on the stream. The ITA does any work needed to verify the user's right to perform the action, such as checking licenses.
To verify the user's rights, the ITA might need to perform additional steps that require interaction with the user or consent from the user. For example, it might need to acquire a new license or individualize a DRM component. In that case, the ITA creates an activation object for a content enabler and returns the activation object's IMFActivate interface in the ppContentEnablerActivate parameter. The activation object is responsible for creating a content enabler that exposes the IMFContentEnabler interface. The content enabler is used as follows:
- The Media Session returns the IMFActivate pointer to the application.
- The application calls IMFActivate::ActivateObject to activate the content enabler.
- The application calls IMFContentEnabler methods to perform whatever actions are needed, such as individualization or obtaining a license. The content enabler object must encapsulate this functionality through the IMFContentEnabler interface.
- The Media Session calls RequestAccess again.
- If the user already has permission to perform the action, the method returns S_OK and sets *ppContentEnablerActivate to NULL.
- If the user does not have permission, the method returns a failure code and sets *ppContentEnablerActivate to NULL.
- If the ITA must perform additional steps that require interaction with the user, the method returns a failure code and returns the content enabler's IMFActivate pointer in ppContentEnablerActivate.
A stream can go to multiple outputs, so this method might be called multiple times with different actions, once for every output.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2008 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | mfidl.h |
Library | Mfuuid.lib |