Función DxgkInitialize (dispmprt.h)
Un controlador de miniporte (KMD) en modo kernel DriverEntry rutina llama a la función DxgkInitial ize proporcionada por el sistema para cargar e inicializar el subsistema del kernel de gráficos directX (Dxgkrnl.sys).
Sintaxis
NTSTATUS DxgkInitialize(
[in] PDRIVER_OBJECT DriverObject,
[in] PUNICODE_STRING RegistryPath,
[in] PDRIVER_INITIALIZATION_DATA DriverInitializationData
);
Parámetros
[in] DriverObject
Puntero a una estructura de DRIVER_OBJECT. El sistema operativo pasó
[in] RegistryPath
Puntero a un UNICODE_STRING que proporciona la ruta de acceso a la clave del Registro del servicio del controlador. El sistema operativo pasa
[in] DriverInitializationData
Puntero a una estructura de DRIVER_INITIALIZATION_DATA que proporciona dxgkrnl con punteros a funciones implementadas por el KMD.
Valor devuelto
DxgkInitialize devuelve STATUS_SUCCESS si se ejecuta correctamente; de lo contrario, devuelve uno de los códigos de error definidos en Ntstatus.h.
Observaciones
En el ejemplo de código siguiente se muestra una implementación de driverEntry en la que se llama a dxgkInitialize.
NTSTATUS
DriverEntry(
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath
)
{
DRIVER_INITIALIZATION_DATA DriverInitializationData = {'\0'};
PAGED_CODE();
if (! ARGUMENT_PRESENT(DriverObject) ||
! ARGUMENT_PRESENT(RegistryPath))
{
return STATUS_INVALID_PARAMETER;
}
// Fill in the DriverInitializationData structure and call DxgkInitialize()
DriverInitializationData.Version = DXGKDDI_INTERFACE_VERSION;
DriverInitializationData.DxgkDdiAddDevice = MyKMDAddDevice;
DriverInitializationData.DxgkDdiStartDevice = MyKMDStartDevice;
DriverInitializationData.DxgkDdiStopDevice = MyKMDStopDevice;
DriverInitializationData.DxgkDdiRemoveDevice = MyKMDRemoveDevice;
DriverInitializationData.DxgkDdiDispatchIoRequest = MyKMDDispatchIoRequest;
DriverInitializationData.DxgkDdiInterruptRoutine = MyKMDInterruptRoutine;
DriverInitializationData.DxgkDdiDpcRoutine = MyKMDDpcRoutine;
DriverInitializationData.DxgkDdiQueryChildRelations = MyKMDQueryChildRelations;
DriverInitializationData.DxgkDdiQueryChildStatus = MyKMDQueryChildStatus;
DriverInitializationData.DxgkDdiQueryDeviceDescriptor = MyKMDQueryDeviceDescriptor;
DriverInitializationData.DxgkDdiSetPowerState = MyKMDSetPowerState;
DriverInitializationData.DxgkDdiNotifyAcpiEvent = MyKMDNotifyAcpiEvent;
DriverInitializationData.DxgkDdiResetDevice = MyKMDResetDevice;
DriverInitializationData.DxgkDdiUnload = MyKMDUnload;
DriverInitializationData.DxgkDdiQueryInterface = MyKMDQueryInterface;
DriverInitializationData.DxgkDdiControlEtwLogging = MyKMDControlEtwLogging;
DriverInitializationData.DxgkDdiQueryAdapterInfo = MyKMDQueryAdapterInfo;
DriverInitializationData.DxgkDdiCreateDevice = MyKMDCreateDevice;
DriverInitializationData.DxgkDdiCreateAllocation = MyKMDCreateAllocation;
DriverInitializationData.DxgkDdiDestroyAllocation = MyKMDDestroyAllocation;
DriverInitializationData.DxgkDdiCreateOverlay = MyKMDCreateOverlay;
DriverInitializationData.DxgkDdiUpdateOverlay = MyKMDUpdateOverlay;
DriverInitializationData.DxgkDdiFlipOverlay = MyKMDFlipOverlay;
DriverInitializationData.DxgkDdiDestroyOverlay = MyKMDDestroyOverlay;
DriverInitializationData.DxgkDdiDescribeAllocation = MyKMDDescribeAllocation;
DriverInitializationData.DxgkDdiGetStandardAllocationDriverData = MyKMDGetStandardAllocationDriverData;
DriverInitializationData.DxgkDdiAcquireSwizzlingRange = MyKMDAcquireSwizzlingRange;
DriverInitializationData.DxgkDdiReleaseSwizzlingRange = MyKMDReleaseSwizzlingRange;
DriverInitializationData.DxgkDdiOpenAllocation = MyKMDOpenAllocation;
DriverInitializationData.DxgkDdiCloseAllocation = MyKMDCloseAllocation;
DriverInitializationData.DxgkDdiPatch = MyKMDPatchDmaBuffer;
DriverInitializationData.DxgkDdiSubmitCommand = MyKMDSubmitCommand;
DriverInitializationData.DxgkDdiBuildPagingBuffer = MyKMDBuildPagingBuffer;
DriverInitializationData.DxgkDdiSetPalette = MyKMDSetPalette;
DriverInitializationData.DxgkDdiSetPointerShape = MyKMDSetPointerShape;
DriverInitializationData.DxgkDdiSetPointerPosition = MyKMDSetPointerPosition;
DriverInitializationData.DxgkDdiPreemptCommand = MyKMDPreemptCommand;
DriverInitializationData.DxgkDdiDestroyDevice = MyKMDDestroyDevice;
DriverInitializationData.DxgkDdiRender = MyKMDRender;
DriverInitializationData.DxgkDdiRenderKm = MyKMDRenderKm; DriverInitializationData.DxgkDdiPresent = MyKMDPresent;
DriverInitializationData.DxgkDdiResetFromTimeout = MyKMDResetFromTimeout;
DriverInitializationData.DxgkDdiRestartFromTimeout = MyKMDRestartFromTimeout;
DriverInitializationData.DxgkDdiEscape = MyKMDEscape;
DriverInitializationData.DxgkDdiCollectDbgInfo = MyKMDCollectDbgInfo;
DriverInitializationData.DxgkDdiQueryCurrentFence = MyKMDQueryCurrentFence;
DriverInitializationData.DxgkDdiControlInterrupt = MyKMDControlInterrupt;
DriverInitializationData.DxgkDdiGetScanLine = MyKMDGetScanLine;
DriverInitializationData.DxgkDdiStopCapture = MyKMD DxgkDdiStopCapture; DriverInitializationData.DxgkDdiSetVidPnSourceAddress = MyKMDSetVidPnSourceAddress;
DriverInitializationData.DxgkDdiSetVidPnSourceVisibility = MyKMDSetVidPnSourceVisibility;
DriverInitializationData.DxgkDdiUpdateActiveVidPnPresentPath = MyKMDUpdateActiveVidPnPresentPath;
DriverInitializationData.DxgkDdiCommitVidPn = MyKMDCommitVidPn;
DriverInitializationData.DxgkDdiRecommendMonitorModes = MyKMDRecommendMonitorModes;
DriverInitializationData.DxgkDdiRecommendVidPnTopology = MyKMDRecommendVidPnTopology;
DriverInitializationData.DxgkDdiCreateContext = MyKMDCreateContext;
DriverInitializationData.DxgkDdiDestroyContext = MyKMDDestroyContext;
DriverInitializationData.DxgkDdiLinkDevice = MyKMDLinkDevice;
DriverInitializationData.DxgkDdiSetDisplayPrivateDriverFormat = MyKMDSetDisplayPrivateDriverFormat;
DriverInitializationData.DxgkDdiRecommendFunctionalVidPn = MyKMDRecommendFunctionalVidPn_XddmParity;
DriverInitializationData.DxgkDdiEnumVidPnCofuncModality = MyKMDEnumVidPnCofuncModality_XddmParity;
DriverInitializationData.DxgkDdiIsSupportedVidPn = MyKMDIsSupportedVidPn_XddmParity;
DriverInitializationData.DxgkDdiQueryVidPnHWCapability = MyKMD DxgkDdiQueryVidPnHWCapability;
return DxgkInitialize(DriverObject,
RegistryPath,
&DriverInitializationData);
}
Requisitos
Requisito | Valor |
---|---|
cliente mínimo admitido | Windows Vista (WDDM 1.0) |
de la plataforma de destino de |
Escritorio |
encabezado de |
dispmprt.h (incluya Dispmprt.h) |
irQL | PASSIVE_LEVEL |