Requests permission to perform a specified action on the stream.
public:
HRESULT RequestAccess(
MFPOLICYMANAGER_ACTION Action,
_Outptr_ IMFActivate **ppContentEnablerActivate
)
Action
Type: MFPOLICYMANAGER_ACTION
The requested action, specified as a member of the MFPOLICYMANAGER_ACTION enumeration.
ppContentEnablerActivate
Type: Outptr IMFActivate **
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.
Type: HRESULT
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
| Return code | Description |
|---|---|
| S_OK | The user has permission to perform this action. |
| NS_E_DRM_NEEDS_INDIVIDUALIZATION | The user must individualize the application. |
| NS_E_LICENSE_REQUIRED | The user must obtain a license. |
Refer to Media Foundation return codes.
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 return value signals whether the user has permission to perform the action:
The Media Session will not allow the action unless this method returns S_OK. However, a return value of S_OK does not guarantee that the action will be performed, because some other failure might occur after this method is called. When the action is definitely about to happen, the Media Session calls IMFInputTrustAuthority::BindAccess.
A stream can go to multiple outputs, so this method might be called multiple times with different actions, once for every output.
Header: Declared in mfidl.h.
Library: Use mfuuid.lib.