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 WDK(Windows 드라이버 키트)의 Sb16 샘플 오디오 드라이버를 참조하세요.