IMFOutputTrustAuthority::SetPolicy method (mfidl.h)

Sets one or more policy objects on the output trust authority (OTA).

Syntax

HRESULT SetPolicy(
  [in]  IMFOutputPolicy **ppPolicy,
  [in]  DWORD           nPolicy,
  [out] BYTE            **ppbTicket,
  [out] DWORD           *pcbTicket
);

Parameters

[in] ppPolicy

The address of an array of IMFOutputPolicy pointers.

[in] nPolicy

The number of elements in the ppPolicy array.

[out] ppbTicket

Receives either a pointer to a buffer allocated by the OTA, or the value NULL. If this parameter receives a non-NULL value, the caller must release the buffer by calling CoTaskMemFree.

Note  Currently this parameter is reserved. An OTA should set the pointer to NULL.
 

[out] pcbTicket

Receives the size of the ppbTicket buffer, in bytes. If ppbTicket receives the value NULL, pcbTicket receives the value zero.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK
The method succeeded.
MF_S_WAIT_FOR_POLICY_SET
The policy was negotiated successfully, but the OTA will enforce it asynchronously.
MF_E_POLICY_UNSUPPORTED
The OTA does not support the requirements of this policy.

Remarks

If the method returns MF_S_WAIT_FOR_POLICY_SET, the OTA sends an MEPolicySet event when it enforces the policy.

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

See also

IMFOutputTrustAuthority