다음을 통해 공유


DxgkInitialize 함수(dispmprt.h)

DxgkInitialize 함수는 DirectX 그래픽 커널 하위 시스템(Dxgkrnl.sys)을 로드하고 초기화합니다.

구문

NTSTATUS DxgkInitialize(
  [in] PDRIVER_OBJECT              DriverObject,
  [in] PUNICODE_STRING             RegistryPath,
  [in] PDRIVER_INITIALIZATION_DATA DriverInitializationData
);

매개 변수

[in] DriverObject

DRIVER_OBJECT 구조체에 대한 포인터입니다. 디스플레이 미니포트 드라이버는 이전에 DriverEntry 함수에서 이 포인터를 얻었습니다.

[in] RegistryPath

드라이버의 서비스 레지스트리 키 경로를 제공하는 UNICODE_STRING 구조체에 대한 포인터입니다. 디스플레이 미니포트 드라이버는 이전에 DRIVER_OBJECT 함수에서 이 포인터를 얻었습니다.

[in] DriverInitializationData

DirectX 그래픽 커널 하위 시스템에 디스플레이 미니포트 드라이버에서 구현한 함수에 대한 포인터를 제공하는 DRIVER_INITIALIZATION_DATA 구조체에 대한 포인터입니다.

반환 값

DxgkInitialize는 성공하면 STATUS_SUCCESS 반환합니다. 그렇지 않으면 Ntstatus.h에 정의된 오류 코드 중 하나를 반환합니다.

설명

디스플레이 미니포트 드라이버의 DriverEntry 함수는 DxgkInitialize를 호출합니다.

예제

다음 코드 예제에서는 DxgkInitialize가 호출되는 DriverEntry의 구현을 보여 줍니다.

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  = AtiAddDevice;
    DriverInitializationData.DxgkDdiStartDevice  = AtiStartDevice;
    DriverInitializationData.DxgkDdiStopDevice  = AtiStopDevice;
    DriverInitializationData.DxgkDdiRemoveDevice  = AtiRemoveDevice;
    DriverInitializationData.DxgkDdiDispatchIoRequest  = AtiDispatchIoRequest;
    DriverInitializationData.DxgkDdiInterruptRoutine  = AtiInterruptRoutine;
    DriverInitializationData.DxgkDdiDpcRoutine  = AtiDpcRoutine;
    DriverInitializationData.DxgkDdiQueryChildRelations  = AtiQueryChildRelations;
    DriverInitializationData.DxgkDdiQueryChildStatus   = AtiQueryChildStatus;
    DriverInitializationData.DxgkDdiQueryDeviceDescriptor  = AtiQueryDeviceDescriptor;
    DriverInitializationData.DxgkDdiSetPowerState  = AtiSetPowerState;
    DriverInitializationData.DxgkDdiNotifyAcpiEvent  = AtiNotifyAcpiEvent;
    DriverInitializationData.DxgkDdiResetDevice  = AtiResetDevice;
    DriverInitializationData.DxgkDdiUnload  = AtiUnload;
    DriverInitializationData.DxgkDdiQueryInterface  = AtiQueryInterface;
    DriverInitializationData.DxgkDdiControlEtwLogging  = D3DDDIControlEtwLogging;

    DriverInitializationData.DxgkDdiQueryAdapterInfo  = D3DDDIQueryAdapterInfo;
    DriverInitializationData.DxgkDdiCreateDevice  = D3DDDICreateDevice;
    DriverInitializationData.DxgkDdiCreateAllocation  = D3DDDICreateAllocation;
    DriverInitializationData.DxgkDdiDestroyAllocation  = D3DDDIDestroyAllocation;

    DriverInitializationData.DxgkDdiCreateOverlay  = D3DDDICreateOverlay;
    DriverInitializationData.DxgkDdiUpdateOverlay  = D3DDDIUpdateOverlay;
    DriverInitializationData.DxgkDdiFlipOverlay  = D3DDDIFlipOverlay;
    DriverInitializationData.DxgkDdiDestroyOverlay  = D3DDDIDestroyOverlay;

    DriverInitializationData.DxgkDdiDescribeAllocation  = D3DDDIDescribeAllocation;
    DriverInitializationData.DxgkDdiGetStandardAllocationDriverData = D3DDDIGetStandardAllocationDriverData;

    DriverInitializationData.DxgkDdiAcquireSwizzlingRange  = D3DDDIAcquireSwizzlingRange;
    DriverInitializationData.DxgkDdiReleaseSwizzlingRange  = D3DDDIReleaseSwizzlingRange;

    DriverInitializationData.DxgkDdiOpenAllocation  = D3DDDIOpenAllocation;
    DriverInitializationData.DxgkDdiCloseAllocation  = D3DDDICloseAllocation;

    DriverInitializationData.DxgkDdiPatch  = D3DDDIPatchDmaBuffer;
    DriverInitializationData.DxgkDdiSubmitCommand  = D3DDDISubmitCommand;
    DriverInitializationData.DxgkDdiBuildPagingBuffer  = D3DDDIBuildPagingBuffer;
    DriverInitializationData.DxgkDdiSetPalette  = D3DDDISetPalette;
    DriverInitializationData.DxgkDdiSetPointerShape  = D3DDDISetPointerShape;
    DriverInitializationData.DxgkDdiSetPointerPosition  = D3DDDISetPointerPosition;
    DriverInitializationData.DxgkDdiPreemptCommand  = D3DDDIPreemptCommand;

    DriverInitializationData.DxgkDdiDestroyDevice  = D3DDDIDestroyDevice;
    DriverInitializationData.DxgkDdiRender  = D3DDDIRender;
    DriverInitializationData.DxgkDdiRenderKm  = D3DDDIRenderKm;    DriverInitializationData.DxgkDdiPresent  = D3DDDIPresent;
    DriverInitializationData.DxgkDdiResetFromTimeout  = D3DDDIResetFromTimeout;
    DriverInitializationData.DxgkDdiRestartFromTimeout  = D3DDDIRestartFromTimeout;
    DriverInitializationData.DxgkDdiEscape  = D3DDDIEscape;
    DriverInitializationData.DxgkDdiCollectDbgInfo  = D3DDDICollectDbgInfo;
    DriverInitializationData.DxgkDdiQueryCurrentFence  = D3DDDIQueryCurrentFence;
    DriverInitializationData.DxgkDdiControlInterrupt  = D3DDDIControlInterrupt;
    DriverInitializationData.DxgkDdiGetScanLine  = D3DDDIGetScanLine;
    DriverInitializationData.DxgkDdiStopCapture  = D3DDDI DxgkDdiStopCapture;    DriverInitializationData.DxgkDdiSetVidPnSourceAddress  = D3DDDISetVidPnSourceAddress;
    DriverInitializationData.DxgkDdiSetVidPnSourceVisibility  = D3DDDISetVidPnSourceVisibility;
    DriverInitializationData.DxgkDdiUpdateActiveVidPnPresentPath  = D3DDDIUpdateActiveVidPnPresentPath;
    DriverInitializationData.DxgkDdiCommitVidPn  = D3DDDICommitVidPn;
    DriverInitializationData.DxgkDdiRecommendMonitorModes  = D3DDDIRecommendMonitorModes;
    DriverInitializationData.DxgkDdiRecommendVidPnTopology  = D3DDDIRecommendVidPnTopology;

    DriverInitializationData.DxgkDdiCreateContext  = D3DDDICreateContext;
    DriverInitializationData.DxgkDdiDestroyContext  = D3DDDIDestroyContext;

    DriverInitializationData.DxgkDdiLinkDevice  = D3DDDILinkDevice;
    DriverInitializationData.DxgkDdiSetDisplayPrivateDriverFormat  = D3DDDISetDisplayPrivateDriverFormat;
    DriverInitializationData.DxgkDdiRecommendFunctionalVidPn  = D3DDDIRecommendFunctionalVidPn_XddmParity;
    DriverInitializationData.DxgkDdiEnumVidPnCofuncModality  = D3DDDIEnumVidPnCofuncModality_XddmParity;
    DriverInitializationData.DxgkDdiIsSupportedVidPn  = D3DDDIIsSupportedVidPn_XddmParity;
    DriverInitializationData.DxgkDdiQueryVidPnHWCapability  = D3DDDI DxgkDdiQueryVidPnHWCapability;

    return DxgkInitialize(DriverObject,
                          RegistryPath,
                          &DriverInitializationData);
}

요구 사항

요구 사항
지원되는 최소 클라이언트 Windows Vista
대상 플랫폼 데스크톱
머리글 dispmprt.h(Dispmprt.h 포함)
IRQL PASSIVE_LEVEL

추가 정보

DRIVER_INITIALIZATION_DATA

DRIVER_OBJECT

디스플레이 미니포트 드라이버의 DriverEntry

UNICODE_STRING