// ks.h
KSDDKAPI NTSTATUS KsAllocateObjectBag(
[in] PKSDEVICE Device,
[out] KSOBJECT_BAG *ObjectBag
);
View the official Windows Driver Kit DDI reference
No description available.
The KsAllocateObjectBag function creates an object bag and associates it with a KSDEVICE.
Device
[in]A pointer to a KSDEVICE representing the device object associated with the newly created object bag.
ObjectBag
[out]A pointer to a KSOBJECT_BAG (the KSOBJECT_BAG structure is equivalent to type PVOID) where the newly allocated object bag is deposited.
Returns STATUS_SUCCESS if a new object bag is created. If a new object bag is not allocated, it returns STATUS_INSUFFICIENT_RESOURCES.
An allocated object bag is not deleted automatically. The minidriver calling KsAllocateObjectBag is responsible for deletion of the object bag. The easiest way to do this is by calling KsFreeObjectBag. Alternatively, if the minidriver has the addresses of the items in the bag, the minidriver can delete them individually by calling KsRemoveItemFromObjectBag.
For more information, see Object Bags.