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 版本概觀。
要求
要求 | 價值 |
---|---|
標頭 | acxdevice.h |
IRQL | PASSIVE_LEVEL |