WdfCollectionGetItem 方法

The WdfCollectionGetItem method returns a handle to the object that is contained in a specified object collection and associated with a specified index value.

语法

WDFOBJECT WdfCollectionGetItem(
  [in]  WDFCOLLECTION Collection,
  [in]  ULONG Index
);

参数

Collection [in]

A handle to a collection object.

Index [in]

A zero-based index value that identifies an object in the collection.

返回值

WdfCollectionGetItem returns a framework object handle, or NULL if the Index value is invalid.

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

评论

Index values represent the order in which objects are added to a collection. An index value of zero represents the first object in the collection, an index value of one represents the second object, and so on, like a linked list. When the driver removes item i from a collection, item i+1 becomes item i.

For more information about object collections, see Framework Object Collections.

示例

For a code example that uses WdfCollectionGetItem, see WdfCollectionGetCount.

要求

版本

Available in version 1.0 and later versions of KMDF.

标头

Wdfcollection.h (包括Wdf.h)

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

IRQL

<= DISPATCH_LEVEL

另请参见

WdfCollectionGetFirstItem
WdfCollectionGetLastItem

 

 

社区附加资源

添加
显示:
© 2015 Microsoft