ACX_OBJECTBAG_CONFIG_INIT - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// acxmisc.h

VOID ACX_OBJECTBAG_CONFIG_INIT(
  PACX_OBJECTBAG_CONFIG Config
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-acxmisc-acx_objectbag_config_init)

Description

The ACX_OBJECTBAG_CONFIG_INIT function initializes an ACX_OBJECTBAG_CONFIG structure.

Parameters

Config

A pointer to the ACX_OBJECTBAG_CONFIG structure that will be initialized.

Remarks

Example

This example shows the use of ACX_OBJECTBAG_CONFIG_INIT.

        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));

        RETURN_NTSTATUS_IF_FAILED(RtlStringFromGUID(uniqueId, &uniqueIdStr));

ACX requirements

Minimum ACX version: 1.0

For more information about ACX versions, see ACX version overview.

See also