KsAllocateObjectBag function (ks.h)
The KsAllocateObjectBag function creates an object bag and associates it with a KSDEVICE.
Syntax
KSDDKAPI NTSTATUS KsAllocateObjectBag(
[in] PKSDEVICE Device,
[out] KSOBJECT_BAG *ObjectBag
);
Parameters
[in] Device
A pointer to a KSDEVICE representing the device object associated with the newly created object bag.
[out] ObjectBag
A pointer to a KSOBJECT_BAG (the KSOBJECT_BAG structure is equivalent to type PVOID) where the newly allocated object bag is deposited.
Return value
Returns STATUS_SUCCESS if a new object bag is created. If a new object bag is not allocated, it returns STATUS_INSUFFICIENT_RESOURCES.
Remarks
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.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Available in Microsoft Windows XP and later operating systems and DirectX 8.0 and later DirectX versions. |
Target Platform | Universal |
Header | ks.h (include Ks.h) |
Library | Ks.lib |
IRQL | PASSIVE_LEVEL |