AcxDeviceInitInitialize 函数 (acxdevice.h)

客户端驱动程序必须在其EVT_WDF_DRIVER_DEVICE_ADD回调中调用 AcxDeviceInitInitialize,然后才能调用 WdfDeviceCreate

语法

NTSTATUS AcxDeviceInitInitialize(
  PWDFDEVICE_INIT        DeviceInit,
  PACX_DEVICEINIT_CONFIG Config
);

参数

DeviceInit

指向表示要初始化的设备 WDFDEVICE_INIT 结构的指针。

Config

指向已通过调用 ACX_DEVICEINIT_CONFIG_INIT 函数初始化 的ACX_DEVICEINIT_CONFIG结构的指针

返回值

如果调用成功,AcxDeviceInitInitialize 将返回STATUS_SUCCESS。 否则,它将返回 NTSTATUS 错误代码。

备注

示例

WDFDEVICE             Parent;
NTSTATUS              status;
PWDFDEVICE_INIT       devInit = NULL;
ACX_DEVICEINIT_CONFIG devInitCfg;

// Code to initialize WDFDEVICE...

//
// Create a child audio device for this circuit.
//
devInit = WdfPdoInitAllocate(Parent);

if (NULL == devInit) 
{
    status = STATUS_INSUFFICIENT_RESOURCES;
    ASSERT(FALSE);
    goto exit;
}

//
// Allow ACX to add any pre-requirement it needs on this device.
//
ACX_DEVICEINIT_CONFIG_INIT(&devInitCfg);

devInitCfg.Flags |= AcxDeviceInitConfigRawDevice; 

status = AcxDeviceInitInitialize(devInit, &devInitCfg);

if (!NT_SUCCESS(status)) 
{
    ASSERT(FALSE);
    goto exit;
}

ACX 要求

最低 ACX 版本: 1.0

有关 ACX 版本的详细信息,请参阅 ACX 版本概述

要求

要求
Header acxdevice.h
IRQL PASSIVE_LEVEL

另请参阅