KsAllocateObjectCreateItem function (ks.h)
The KsAllocateObjectCreateItem function allocates a slot for the specified create item, optionally allocating space for and copying the create item data as well. This function assumes that the caller is serializing multiple changes to the create entry list.
Syntax
KSDDKAPI NTSTATUS KsAllocateObjectCreateItem(
[in] KSDEVICE_HEADER Header,
[in] PKSOBJECT_CREATE_ITEM CreateItem,
[in] BOOLEAN AllocateEntry,
[in, optional] PFNKSITEMFREECALLBACK ItemFreeCallback
);
Parameters
[in] Header
Points to the device header on which to attach the create item.
[in] CreateItem
Contains the create item to attach.
[in] AllocateEntry
Indicates whether the create item pointer passed should be attached directly to the header, or if a copy of it should be made instead.
[in, optional] ItemFreeCallback
Optionally contains a pointer to a minidriver-defined KStrItemFreeCallback function to be called when the create entry is being destroyed upon freeing the device header. This is only valid when AllocateEntry is TRUE.
Return value
Returns STATUS_SUCCESS if a new item was allocated and attached. Otherwise, it returns STATUS_INSUFFICIENT_RESOURCES.
Requirements
Requirement | Value |
---|---|
Target Platform | Universal |
Header | ks.h (include Ks.h) |
Library | Ks.lib |