// acxmisc.h
NTSTATUS AcxObjectBagRetrieveUnicodeString(
ACXOBJECTBAG ObjectBag,
PCUNICODE_STRING ValueName,
PUNICODE_STRING Value
);
View the official Windows Driver Kit DDI referenceNo description available.
The AcxObjectBagRetrieveUnicodeString function retrieves a unicode string value from an existing, initialized AcxObjectBag that contains values.
ObjectBagAn initialized ObjectBag ACX object. For more information, see ACX - Summary of ACX Objects.
ValueNameThe name of the value that will be used to access the value.
ValueThe Value to be retrieved from the ObjectBag.
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 AcxObjectBagRetrieveUnicodeString.
UNICODE_STRING unicodeStringValue;
ACX_OBJECTBAG_CONFIG objBagCfg;
DECLARE_CONST_ACXOBJECTBAG_SYSTEM_PROPERTY_NAME(testName);
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(AcxObjectBagRetrieveUnicodeString(objBag, &testName, &unicodeStringValue));
Minimum ACX version: 1.0
For more information about ACX versions, see ACX version overview.