// acxmisc.h
NTSTATUS AcxObjectBagOpen(
PWDF_OBJECT_ATTRIBUTES Attributes,
PACX_OBJECTBAG_CONFIG Config,
ACXOBJECTBAG *ObjectBag
);
View the official Windows Driver Kit DDI referenceNo description available.
The function AcxObjectBagOpen opens an existing, initialized AcxObjectBag.
AttributesAdditional Attributes defined using a WDF_OBJECT_ATTRIBUTES structure that are used to set various object's values: cleanup and destroy callbacks, context type, and to specify its parent object.
ConfigA pointer to the initialized ACX_OBJECTBAG_CONFIG structure.
ObjectBagAn initialized ObjectBag ACX object. For more information, see ACX - Summary of ACX Objects.
Returns STATUS_SUCCESS if the call was successful. Otherwise, it returns an appropriate error code. For more information, see Using NTSTATUS Values.
This example shows the use of ACX_OBJECTBAG_CONFIG.
GUID uniqueId = { 0 };
UNICODE_STRING uniqueIdStr = { 0 };
UNICODE_STRING pnpDeviceId = { 0 };
ACX_OBJECTBAG_CONFIG objBagCfg;
DECLARE_CONST_ACXOBJECTBAG_SYSTEM_PROPERTY_NAME(UniqueID);
ACX_OBJECTBAG_CONFIG_INIT(&objBagCfg);
objBagCfg.Handle = CircuitConfig->CompositeProperties;
objBagCfg.Flags |= AcxObjectBagConfigOpenWithHandle;
WDF_OBJECT_ATTRIBUTES_INIT(&attributes);
ACXOBJECTBAG objBag = NULL;
RETURN_NTSTATUS_IF_FAILED(AcxObjectBagOpen(&attributes, &objBagCfg, &objBag));
auto objBag_free = scope_exit([&objBag]() {
WdfObjectDelete(objBag);
});
RETURN_NTSTATUS_IF_FAILED(AcxObjectBagRetrieveGuid(objBag, &UniqueID, &uniqueId));
Minimum ACX version: 1.0
For more information about ACX versions, see ACX version overview.