WdfCollectionRemove function (wdfcollection.h)

[Applies to KMDF and UMDF]

The WdfCollectionRemove method removes an object from a specified object collection.

Syntax

void WdfCollectionRemove(
  [in] WDFCOLLECTION Collection,
  [in] WDFOBJECT     Item
);

Parameters

[in] Collection

A handle to a collection object.

[in] Item

A handle to the framework object that will be removed from the collection.

Return value

None

Remarks

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

When WdfCollectionRemove removes an object from a collection, it decrements the object's reference count.

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

Examples

The following code example removes a specified object from a specified object collection.

WdfCollectionRemove(
                    hCollection,
                    hObject
                    );

Requirements

Requirement Value
Target Platform Universal
Minimum KMDF version 1.0
Minimum UMDF version 2.0
Header wdfcollection.h (include Wdf.h)
Library Wdf01000.sys (KMDF); WUDFx02000.dll (UMDF)
IRQL <= DISPATCH_LEVEL
DDI compliance rules DriverCreate(kmdf), KmdfIrql(kmdf), KmdfIrql2(kmdf), KmdfIrqlExplicit(kmdf)

See also

WdfCollectionRemoveItem