Expand Minimize

KsAllocateObjectBag function

The KsAllocateObjectBag function creates an object bag and associates it with a KSDEVICE.

Syntax


NTSTATUS KsAllocateObjectBag(
  _In_   PKSDEVICE Device,
  _Out_  KSOBJECT_BAG *ObjectBag
);

Parameters

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.

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

Version

Available in Microsoft Windows XP and later operating systems and DirectX 8.0 and later DirectX versions.

Header

Ks.h (include Ks.h)

Library

Ks.lib

IRQL

PASSIVE_LEVEL

See also

KsFreeObjectBag
KsAddItemToObjectBag
KsRemoveItemFromObjectBag
KsDiscard
KsCopyObjectBagItems

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft