WdfCmResourceListRemove メソッド

The WdfCmResourceListRemove method removes a resource descriptor from a specified resource list.

構文

VOID WdfCmResourceListRemove(
  [in]  WDFCMRESLIST List,
  [in]  ULONG Index
);

パラメーター

List [in]

A handle to a framework resource-list object that represents a list of hardware resources for a device.

Index [in]

A zero-based value that is used as an index into the resource list that List specifies.

戻り値

None.

A system bug check occurs if the driver supplies an invalid object handle.

解説

The WdfCmResourceListRemove method removes the resource descriptor that is associated with the index value that the Index parameter specifies.

When WdfCmResourceListRemove removes the resource descriptor that has the index value n, the index value of the next resource descriptor changes from n+1 to n.

For more information about resource lists, see Hardware Resources for Framework-Based Drivers.

The following code example removes the third resource descriptor from the raw and translated lists of hardware resources that an EvtDeviceRemoveAddedResources callback function receives.

NTSTATUS
MyEvtDeviceRemoveAddedResources(
    WDFDEVICE Device,
    WDFCMRESLIST ResourcesRaw,
    WDFCMRESLIST ResourcesTranslated
    )
{
...
    WdfCmResourceListRemove(
                            ResourcesRaw,
                            2
                            );
    WdfCmResourceListRemove(
                            ResourcesTranslated,
                            2
                            );
...

}

要件

バージョン

Available in version 1.0 and later versions of KMDF.

ヘッダー

Wdfresource.h (includeWdf.h)

ライブラリ

Wdf<MajorVersionNumber>000.sys (see Framework Library Versions.)

IRQL

<=DISPATCH_LEVEL

参照

WdfCmResourceListRemoveByDescriptor

 

 

コミュニティの追加

追加
表示:
© 2015 Microsoft