IWMDRMLicenseManagement::DeleteLicense method

[The feature associated with this page, Windows Media Format 11 SDK, is a legacy feature. It has been superseded by Source Reader and Sink Writer. Source Reader and Sink Writer have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use Source Reader and Sink Writer instead of Windows Media Format 11 SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The DeleteLicense method removes a license from the temporary local license store.

Syntax

HRESULT DeleteLicense(
  [in] BSTR  bstrKID,
  [in] DWORD dwFlags
);

Parameters

bstrKID [in]

Key ID (KID) of the license to be deleted.

dwFlags [in]

License deletion option flags. Set to one of the values in the following table.

Value Description
WMDRM_DELETE_LICENSE_IMMEDIATELY Specifies that the license should be removed from the store immediately.
WMDRM_DELETE_LICENSE_MARK_FOR_PURGE Specifies that the license should be marked for deletion, but should not be removed from the store until the CleanLicenseStore method is called.

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.
DRM_E_LICENSENOTFOUND
The specified license does not exist in the store.
- OR -
The store was not found.

Remarks

To delete licenses from the permanent local license store, you must use license revocation.

Requirements

Requirement Value
Header
Wmdrmsdk.h
Library
Wmdrmsdk.lib

See also

IWMDRMLicenseManagement Interface