The PortCls system driver implements the IResourceList interface for the benefit of miniport drivers. IResourceList オブジェクトは、構成リソースの一覧を表します。これは、プラグ アンド プレイ マネージャーがデバイスの起動時にデバイスに割り当てるシステム ハードウェア リソースの一覧です。 起動時のリソース割り当ての詳細については、「 ファンクション ドライバーでのデバイスの起動」を参照してください。
リソース リストには、次の種類のリソースが含まれています。
Interrupt vectors
DMA channels
I/O ポート アドレス
バス相対メモリ アドレスのブロック
For information about resource types, see Hardware Resources.
An IResourceList object encapsulates both the translated and untranslated (or "raw") versions of a resource list. 変換されたリソースと未翻訳のリソースの詳細については、「 Bus-Relative アドレスを仮想アドレスにマッピングする」を参照してください。
The IResourceList interface supports the following methods:
IResourceList::AddEntryFromParent
IResourceList::FindTranslatedEntry
IResourceList::FindUntranslatedEntry
IResourceList::NumberOfEntries
IResourceList::NumberOfEntriesOfType
IResourceList::UntranslatedList
ヘッダー ファイル Portcls.h は、リソース リスト オブジェクトの処理を簡略化するマクロのセットを定義します。 These macros generate calls to the IResourceList methods. 詳細については、「IResourceList」を参照してください。
さらに、Portcls.h では、リソース リストを作成するための関数のペアが定義されています。
To start up the devices on an audio adapter card, the operating system calls the adapter driver's start-device routine (see Startup Sequence) and passes in a resource list object as an input parameter. この一覧には、オペレーティング システムがアダプター ドライバーに割り当てたすべてのシステム リソースが含まれています。
スタート デバイス ルーチンでは、アダプター ドライバーは、すべてのアダプター ドライバーのデバイス (ウェーブ デバイス、MIDI デバイスなど) を起動します。 各デバイスを管理するために、アダプター ドライバーは、ミニポート ドライバー オブジェクトとそれに関連付けられているポート ドライバー オブジェクトを作成します。 アダプター ドライバーは、リソース一覧内のリソースをアダプター カード内のさまざまなデバイスに分割します。 For this purpose, the driver typically calls PcNewResourceSublist to create a resource list object for each device. The driver then calls IResourceList::AddEntryFromParent as many times as necessary to copy selected resources from the parent list into the various child lists. さらに、アダプター ドライバーは、それ自体にいくつかのリソースを割り当てる可能性があります。
Next, the start-device routine calls each port driver's IPort::Init method and passes in the device's resource list object (containing the child list) as an input parameter. Each port driver's IPort::Init method calls the corresponding miniport driver's IMiniportXxx::Init method, which is one of the following:
The IPort::Init method passes its resource list object to the IMiniportXxx::Init method as an input parameter. ミニポート ドライバーは、DMA チャネル、割り込み、およびリソース一覧内の他のシステム リソースを利用できます。
コード例については、Microsoft Windows Driver Kit (WDK) の Sb16 サンプル オーディオ ドライバーを参照してください。