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.
下列 DRM 功能可供使用:
為系統提供驅動程式介面,其中包含用於處理受保護內容的函式清單。 DrmCreateContentMixed
建立 DRM 內容識別碼,以識別包含來自數個輸入資料流程的混合內容的 KS 音訊資料流程。 DrmDestroyContent
刪除 DRM 內容 ID。 DrmForwardContentToDeviceObject
驗證驅動程式,並將系統指派給包含受保護內容的資料流程的 DRM 內容識別碼和內容許可權傳送給它。 DrmForwardContentToFileObject
Obsolete function. DrmForwardContentToInterface
驗證驅動程式物件,並將系統指派給包含受保護內容的資料流程的 DRM 內容識別碼和內容權限傳送給它。 DrmGetContentRights
擷取系統已指派給 DRM 內容識別碼的 DRM 內容權限。 此清單中的函式會在標頭檔 Drmk.h 中宣告。 核心模式 DRMK 系統驅動程式 Drmk.sys會匯出這些函式的進入點。
在 Windows XP 和更新版本中,PortCls 系統驅動程式 Portcls.sys會匯出一組不同的進入點,以取得相同一組 DRM 函式。 PortCls 函式的名稱與上一個清單中的名稱類似,不同之處在於它們使用前置詞 Pc 而不是 Drm:
PcForwardContentToDeviceObject
這些函式名稱會在標頭檔 Portcls.h 中宣告。 Portcls.sys 中的入口點只不過是呼叫 Drmk.sys中的對應函數。 PortCls 進入點只是為了方便起見而提供,因此已連線到 Portcls.sys 的音訊驅動程式不需要明確載入 Drmk.sys。
In Windows XP and later, the same set of functions is also exposed as methods in the IDrmPort and IDrmPort2 interfaces:
IDrmPort2::ForwardContentToDeviceObject
IDrmPort::ForwardContentToFileObject
IDrmPort::ForwardContentToInterface
The IDrmPort and IDrmPort2 interfaces are declared in header file Portcls.h and are implemented in Portcls.sys. 這些方法只不過是呼叫 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. 這可簡化撰寫單一驅動程式的工作,該驅動程式可以在支援 DRM 的較新版本 Windows 中執行,也可以在不支援 DRM 的舊版中執行。 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.
The DEFINE_DRMRIGHTS_DEFAULT macro, which is defined in header file Drmk.h, initializes the members of a DRMRIGHTS structure to their default values.