DRM Functions and Interfaces
The 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:
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.
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:
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.
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.
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.
Submit and view feedback for