WdfCollectionRemove function (wdfcollection.h)

[Applies to KMDF and UMDF]

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

Syntax

void WdfCollectionRemove(
  WDFCOLLECTION Collection,
  WDFOBJECT     Item
);

Parameters

Collection

[in] A handle to a collection object.

Item

[in] 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

   
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, KmdfIrql, KmdfIrql2

See also

WdfCollectionRemoveItem