WdfIoResourceRequirementsListGetIoResList 함수(wdfresource.h)

[KMDF에만 적용]

WdfIoResourceRequirementsListGetIoResList 메서드는 지정된 리소스 요구 사항 목록에서 지정된 논리 구성을 나타내는 프레임워크 resource-range-list 개체에 대한 핸들을 반환합니다.

구문

WDFIORESLIST WdfIoResourceRequirementsListGetIoResList(
  [in] WDFIORESREQLIST RequirementsList,
  [in] ULONG           Index
);

매개 변수

[in] RequirementsList

디바이스의 리소스 요구 사항 목록을 나타내는 프레임워크 resource-requirements-list 개체에 대한 핸들입니다.

[in] Index

RequirementsList가 지정하는 리소스 요구 사항 목록에 인덱스로 사용되는 0부터 시작하는 값입니다.

반환 값

WdfIoResourceRequirementsListGetIoResList인덱 스 값이 유효한 경우 Index 매개 변수가 식별하는 논리적 구성을 나타내는 프레임워크 resource-range-list 개체에 대한 핸들을 반환합니다. 그렇지 않으면 메서드는 NULL을 반환합니다.

드라이버가 잘못된 개체 핸들을 제공하는 경우 시스템 버그 검사 발생합니다.

설명

리소스 요구 사항 목록에 대한 자세한 내용은 Framework-Based 드라이버용 하드웨어 리소스를 참조하세요.

다음 코드 예제에서는 디바이스의 리소스 요구 사항 목록을 검색하여 인터럽트 리소스를 설명하는 첫 번째 리소스 설명자를 찾습니다.

NTSTATUS
Example_EvtDeviceFilterRemoveResourceRequirements(
    IN WDFDEVICE Device,
    IN WDFIORESREQLIST RequirementsList
    )
{
    ULONG i, j, reqCount, resCount;
    BOOLEAN descriptorFound = FALSE;

    //
    // Obtain the number of logical configurations.
    //
    reqCount = WdfIoResourceRequirementsListGetCount(RequirementsList);

    //
    // Search each logical configuration.
    //
    for (i = 0; i < reqCount; i++) {
        WDFIORESLIST reslist;

        if (descriptorFound) {
            break;
        }
        reslist = WdfIoResourceRequirementsListGetIoResList(
                                          RequirementsList,
                                          i
                                          );

        //
        // Get the number of resource descriptors that
        // are in this logical configuration.
        //
        resCount = WdfIoResourceListGetCount(reslist);

        for (j = 0; j < resCount; j++) {
            PIO_RESOURCE_DESCRIPTOR descriptor;

            //
            // Get the next resource descriptor.
            //
            descriptor = WdfIoResourceListGetDescriptor(
                               reslist,
                               j
                               );

            //
            // Stop if this descriptor is an interrupt descriptor.
            //
            if (descriptor->Type == CmResourceTypeInterrupt) {
                descriptorFound = TRUE;
                break;
            }
        }
    }
...
}

요구 사항

요구 사항
대상 플랫폼 유니버설
최소 KMDF 버전 1.0
머리글 wdfresource.h(Wdf.h 포함)
라이브러리 Wdf01000.sys(프레임워크 라이브러리 버전 관리 참조)
IRQL <=DISPATCH_LEVEL
DDI 규정 준수 규칙 DriverCreate(kmdf), KmdfIrql(kmdf), KmdfIrql2(kmdf), KmdfIrqlExplicit(kmdf)

추가 정보

IO_RESOURCE_DESCRIPTOR

WdfIoResourceListGetCount

WdfIoResourceListGetDescriptor

WdfIoResourceRequirementsListGetCount