Skip to content

Latest commit

 

History

History
67 lines (46 loc) · 3.45 KB

reading-protected-files.md

File metadata and controls

67 lines (46 loc) · 3.45 KB
title description ms.assetid keywords ms.topic ms.date ms.custom
Reading Protected Files
Reading Protected Files
24f839f1-ce57-4d06-b1a5-a6bea7b5b7bb
Windows Media Format SDK,reading protected files
Windows Media Format SDK,protected files
Advanced Systems Format (ASF),reading protected files
ASF (Advanced Systems Format),reading protected files
Advanced Systems Format (ASF),protected files
ASF (Advanced Systems Format),protected files
Advanced Systems Format (ASF),WMStubDRM.lib
ASF (Advanced Systems Format),WMStubDRM.lib
WMStubDRM.lib,reading protected files
WMStubDRM.lib,protected files
digital rights management (DRM),WMStubDRM.lib
DRM (digital rights management),WMStubDRM.lib
article
4/26/2023
UpdateFrequency5

Reading Protected Files

[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.]

Reading a DRM-protected file or network stream basically involves attempting to open the file (or connect to the stream) and then handling any events that might be sent from the DRM components.

If a player is not DRM-enabled (does not link to a valid wmstubdrm.lib library) the IWMReader::Open call fails when it tries to open a protected file and returns NS_E_PROTECTED_CONTENT or some related error.

When a DRM-enabled application attempts to open a DRM-protected file, the DRM component automatically searches the local system for a valid license. If one is found, the DRM component automatically decrypts the file in a way that is completely transparent to the application. The action that an application may perform on the decrypted file depends on the rights specified in the license. For a full description of possible rights, see the Windows Media Rights Manager SDK documentation.

If the application does not have a valid license for a file, the player receives a status notification from the DRM component. The player application can then initiate the license acquisition process. After a valid license has been received, the file can be accessed. The following sections describe the basic tasks that an application must perform in implementing the license acquisition process:

Note

DRM is not supported by the x64-based version of this SDK.

 

Related topics

Digital Rights Management Features

DRM Attribute List

DRM Properties

Enabling DRM Support