DRM Functions and Interfaces

In Microsoft Windows Me, and Windows XP and later, system driver components Drmk.sys and Portcls.sys implement a collection of DRM functions and interfaces that drivers use for managing the digital rights of kernel-streaming audio content. The Drmk.sys component implements a number of DrmXxx functions, and Portcls.sys implements a DRM-specific set of PcXxx functions, and also the IDrmPort and IDrmPort2 interfaces.

The following DRM functions are available in Windows Me, and Windows XP and later:

DrmAddContentHandlers

Provides the system with a driver interface consisting of a list of functions for handling protected content.

DrmCreateContentMixed

Creates a DRM content ID to identify a KS audio stream containing mixed content from several input streams.

DrmDestroyContent

Deletes a DRM content ID.

DrmForwardContentToDeviceObject

Authenticates a driver and sends it the DRM content ID and content rights that the system has assigned to a stream containing protected content.

DrmForwardContentToFileObject

Obsolete function.

DrmForwardContentToInterface

Authenticates a driver object and sends it the DRM content ID and content rights that the system has assigned to a stream containing protected content.

DrmGetContentRights

Retrieves the DRM content rights that the system has assigned to a DRM content ID.

The functions in this list are declared in header file Drmk.h. The kernel-mode DRMK system driver, Drmk.sys, exports the entry points for these functions. The DrmAddContentHandlers and DrmForwardContentToInterface functions are supported only in Windows XP and later. The other functions in the list are supported in Windows XP and later and in Windows Me.

In Windows XP and later, the PortCls system driver, Portcls.sys, exports a different set of entry points for the same set of DRM functions. The names of the PortCls functions are similar to those in the previous list, except that they use the prefix Pc instead of Drm:

PcAddContentHandlers

PcCreateContentMixed

PcDestroyContent

PcForwardContentToDeviceObject

PcForwardContentToFileObject

PcForwardContentToInterface

PcGetContentRights

These function names are declared in header file Portcls.h. The entry points in Portcls.sys do nothing more than call the corresponding functions in Drmk.sys. The PortCls entry points are provided simply for convenience so that an audio driver that is already connected to Portcls.sys does not need to explicitly load Drmk.sys.

In Windows XP and later, the same set of functions is also exposed as methods in the IDrmPort and IDrmPort2 interfaces:

IDrmPort2::AddContentHandlers

IDrmPort::CreateContentMixed

IDrmPort::DestroyContent

IDrmPort2::ForwardContentToDeviceObject

IDrmPort::ForwardContentToFileObject

IDrmPort::ForwardContentToInterface

IDrmPort::GetContentRights

The IDrmPort and IDrmPort2 interfaces are declared in header file Portcls.h and are implemented in Portcls.sys. These methods do nothing more than call the corresponding functions in Drmk.sys. A miniport driver obtains a reference to a IDrmPortx interface by querying its port driver for this interface. The advantage to using a IDrmPortx interface instead of the corresponding DrmXxx or PcXxx functions is that the driver can use this query to determine at run time whether the operating system version supports DRM or not. This simplifies the task of writing a single driver that can run both in newer versions of Windows that support DRM and in older versions that do not. IDrmPort2 is derived from IDrmPort and provides two additional methods.

In Windows XP and later and in Windows Me, the WaveCyclic and WavePci port drivers use the IDrmAudioStream interface if it is supported by the corresponding miniport driver. The port driver calls the IDrmAudioStream::SetContentId method to assign DRM protection to the digital content in an audio stream.

The DEFINE_DRMRIGHTS_DEFAULT macro, which is defined in header file Drmk.h, initializes the members of a DRMRIGHTS structure to their default values.

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft