Windows Media DRM (WMDRM) is a Digital Rights Management service for the Windows Media Platform, it’s used to manage multimedia files in a way that the distributor can control how that content is used. The content delivered with the WMDRM encryption is not universally accessible but limited to those users running Microsoft Windows.
This service supports portable media players running Media Transfer Protocol (MTP) that implement WMDRM-PD.
To create a Windows Portable Devices application, you must have the Windows Software Development Kit (SDK) installed on your computer.
The SDK provides the following interfaces for devices that support Windows Media Digital Rights Management 10 for Portable Devices (WMDRM-PD):
- IWMDRMDeviceApp, which enables an application to meter, synchronize licenses, and update DRM components on the device
- IWMDRMDeviceApp2, which extends IWMDRMDeviceApp and enables an application to query a specific DRM status or capability on the device.
The WMDRM API offers a sample application we can use to work and interact with portable devices. To build this application we need to complete the next steps:
- Install the Microsoft Windows SDK for Windows Vista (or superior)
- Install the Windows Media Format SDK version 11 (or greater)
The console application has the following files we can use to modify and customize according to what we want to achieve:
- WpdApiDrmSample.vcproj: This is the main project file for VC++ projects generated using an Application Wizard. It contains information about the version of Visual C++ that generated the file, and information about the platforms, configurations, and project features selected with the Application Wizard.
- WpdApiDrmSample.cpp: This is the main application source file.
- DeviceEnumeration.cpp: This file contains examples of how to enumerate portable devices.
- ContentEnumeration.cpp: This file contains examples of how to enumerate content on a portable device.
- ContentTransfer.cpp: This file contains examples of how to transfer content to a portable device.
- WmdmEnumeration.cpp: This file contains examples of how to initialize WMDM on a portable device that supports WMDM.
- WmdrmDeviceApp.cpp: This file contains examples of how to call IWMDRMDeviceApp methods on a portable device.
- WMDMProgress.h: This file contains an example implementation of IWMDMProgress3, used when updating the device's secure clock
- AppKey.h, AppKey.cpp: These files define the application certificate and key used for protected content transfers. To authenticate your application, modify AppKey.cpp to set your application's private key and certificate values obtained from Windows Media Licensing.