Share via


IWMDRMDeviceApp::SynchronizeLicenses

banner art

The SynchronizeLicenses method updates licenses on a device when they are close to expiring.

Syntax

HRESULT SynchronizeLicenses(IWMDMDevice*pDevice,IWMDMProgress3*pProgressCallback,DWORDcMinCountThreshold,DWORDcMinHoursThreshold);

Parameters

pDevice

[in]  Pointer to an IWMDMDevice object.

pProgressCallback

[in]  Progress callback that will receive progress of any steps that it might need to carry out. The step is identified by the EventId parameter of the IWMDMProgress3 method called.

cMinCountThreshold

[in]  Optional minimum remaining play count on a device license.

cMinHoursThreshold

[in]  Optional minimum remaining hours on a device license.

Return Values

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_INVALIDARG One or more arguments are not valid.
DRM_E_INVALIDXMLTAG XML is improperly formed.
DRM_E_NOTIMPL This functionality is not currently implemented. (SyncLicenses w/pDevice=NULL)
DRM_E_NOXMLCLOSETAG The license XML was improperly formed.
DRM_E_NOXMLOPENTAG The license XML was improperly formed.
DRM_E_OUTOFMEMORY Out of memory.
DRM_E_XMLNOTFOUND Failed to find a required XML tag in the license.
NS_E_DEVICE_NOT_WMDRM_DEVICE The specified device is not a Windows Media DRM–compatible device.
NS_E_DRM_NEEDS_INDIVIDUALIZATION The DRM requires an individualized black box to perform this function. In other words, the Windows Media Format SDK requires a security upgrade.

Remarks

This call can only be made on a device that supports Windows Media DRM 10 for Portable Devices. You must specify at least one threshold parameter.

Requirements

Header: Requires both WMDRMDeviceApp.h and wmdrmdeviceapp_i.c (built from WMDRMDeviceApp.idl).

Library: mssachlp.lib

See Also