57 DPRINT1(
"Warning: trying loading xp/2003/windows7/reactos dxg.sys\n");
62 DPRINT1(
"Warning: no ReactX or DirectX kernel driver found\n");
96 DPRINT1(
"Warning: DirectX graphics interface can not be initialized\n");
112 DPRINT(
"DirectX interface is activated\n");
135 DPRINT1(
"Warning: hdc is NULL\n");
142 if (pfnDdCreateDirectDrawObject ==
NULL)
144 DPRINT1(
"Warning: no pfnDdCreateDirectDrawObject\n");
148 DPRINT(
"Calling dxg.sys pfnDdCreateDirectDrawObject\n");
150 return pfnDdCreateDirectDrawObject(
hdc);
197 if (pfnDxgGenericThunk ==
NULL)
199 DPRINT1(
"Warning: no pfnDxgGenericThunk\n");
203 DPRINT(
"Calling dxg.sys pfnDxgGenericThunk\n");
204 return pfnDxgGenericThunk(ulIndex, ulHandle, pdwSizeOfPtr1, pvPtr1, pdwSizeOfPtr2, pvPtr2);
216 if (pfnDdGetDriverState ==
NULL)
218 DPRINT1(
"Warning: no pfnDdGetDriverState\n");
222 DPRINT(
"Calling dxg.sys pfnDdGetDriverState\n");
223 return pfnDdGetDriverState(
pdata);
236 if (pfnDdColorControl ==
NULL)
238 DPRINT1(
"Warning: no pfnDdColorControl\n");
242 DPRINT(
"Calling dxg.sys pfnDdColorControl\n");
243 return pfnDdColorControl(hSurface,puColorControlData);
261 if (pfnDdCreateSurfaceObject ==
NULL)
263 DPRINT1(
"Warning: no pfnDdCreateSurfaceObject\n");
267 DPRINT(
"Calling dxg.sys pfnDdCreateSurfaceObject\n");
268 return pfnDdCreateSurfaceObject(hDirectDrawLocal, hSurface, puSurfaceLocal, puSurfaceMore, puSurfaceGlobal, bComplete);
280 if (pfnDdDeleteDirectDrawObject ==
NULL)
282 DPRINT1(
"Warning: no pfnDdDeleteDirectDrawObject\n");
286 if (hDirectDrawLocal ==
NULL)
288 DPRINT1(
"Warning: hDirectDrawLocal is NULL\n");
292 DPRINT(
"Calling dxg.sys pfnDdDeleteDirectDrawObject(%p)\n", hDirectDrawLocal);
293 return pfnDdDeleteDirectDrawObject(hDirectDrawLocal);
305 if (pfnDdDeleteSurfaceObject ==
NULL)
307 DPRINT1(
"Warning: no pfnDdDeleteSurfaceObject\n");
312 DPRINT(
"Calling dxg.sys pfnDdDeleteSurfaceObject\n");
313 return pfnDdDeleteSurfaceObject(hSurface);
323 DWORD *pCallBackFlags,
335 if (pfnDdQueryDirectDrawObject ==
NULL)
337 DPRINT1(
"Warning: no pfnDdQueryDirectDrawObject\n");
341 DPRINT(
"Calling dxg.sys pfnDdQueryDirectDrawObject\n");
342 return pfnDdQueryDirectDrawObject(hDirectDrawLocal,
pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData,
343 puD3dBufferCallbacks, puD3dTextureFormats, puNumHeaps, puvmList, puNumFourCC, puFourCC);
359 if (pfnDdReenableDirectDrawObject ==
NULL)
361 DPRINT1(
"Warning: no pfnDdReenableDirectDrawObject\n");
365 DPRINT(
"Calling dxg.sys pfnDdReenableDirectDrawObject\n");
367 status = pfnDdReenableDirectDrawObject(hDirectDrawLocal, pubNewMode);
368 DPRINT1(
"end Calling dxg.sys pfnDdReenableDirectDrawObject, status: 0x%08x\n",
status);
371 return pfnDdReenableDirectDrawObject(hDirectDrawLocal, pubNewMode);
386 if (pfnDdGetDriverInfo ==
NULL)
388 DPRINT1(
"Warning: no pfnDdGetDriverInfo\n");
392 DPRINT(
"Calling dxg.sys pfnDdGetDriverInfo\n");
393 return pfnDdGetDriverInfo(hDirectDrawLocal, puGetDriverInfoData);
406 if (pfnDdGetAvailDriverMemory ==
NULL)
408 DPRINT1(
"Warning: no pfnDdGetAvailDriverMemory\n");
412 DPRINT(
"Calling dxg.sys pfnDdGetAvailDriverMemory\n");
413 return pfnDdGetAvailDriverMemory(hDirectDrawLocal, puGetAvailDriverMemoryData);
427 if (pfnDdSetExclusiveMode ==
NULL)
429 DPRINT1(
"Warning: no pfnDdSetExclusiveMode\n");
433 DPRINT(
"Calling dxg.sys pfnDdSetExclusiveMode\n");
434 return pfnDdSetExclusiveMode(hDirectDraw, puSetExclusiveModeData);
447 if (pfnDdFlipToGDISurface ==
NULL)
449 DPRINT1(
"Warning: no pfnDdFlipToGDISurface\n");
453 DPRINT(
"Calling dxg.sys pfnDdFlipToGDISurface\n");
454 return pfnDdFlipToGDISurface(hDirectDraw, puFlipToGDISurfaceData);
467 if (pfnDdGetDC ==
NULL)
469 DPRINT1(
"Warning: no pfnDdGetDC\n");
473 DPRINT(
"Calling dxg.sys pfnDdGetDC\n");
474 return pfnDdGetDC(hSurface, puColorTable);
488 if (pfnDdGetDxHandle ==
NULL)
490 DPRINT1(
"Warning: no pfnDdGetDxHandle\n");
494 DPRINT(
"Calling dxg.sys pfnDdGetDxHandle\n");
495 return pfnDdGetDxHandle(hDirectDraw, hSurface, bRelease);
507 if (pfnDdReleaseDC ==
NULL)
509 DPRINT1(
"Warning: no pfnDdReleaseDC\n");
513 DPRINT(
"Calling dxg.sys pfnDdReleaseDC\n");
514 return pfnDdReleaseDC(hSurface);
528 if (pfnDdResetVisrgn ==
NULL)
530 DPRINT1(
"Warning: no pfnDdResetVisrgn\n");
534 DPRINT(
"Calling dxg.sys pfnDdResetVisrgn\n");
535 return pfnDdResetVisrgn(hSurface,
hwnd);
549 if (pfnDdSetGammaRamp ==
NULL)
551 DPRINT1(
"Warning: no pfnDdSetGammaRamp\n");
555 DPRINT(
"Calling dxg.sys pfnDdSetGammaRamp\n");
556 return pfnDdSetGammaRamp(hDirectDraw,
hdc, lpGammaRamp);
#define DDHAL_DRIVER_NOTHANDLED
#define NT_SUCCESS(StatCode)
DWORD(NTAPI * PGD_DXGENERICTRUNK)(ULONG_PTR, ULONG_PTR, SIZE_T *, PVOID, SIZE_T *, PVOID)
#define DXG_INDEX_DxDdGetDriverState
#define DXG_INDEX_DxDdColorControl
#define DXG_INDEX_DxDdReenableDirectDrawObject
#define DXG_INDEX_DxDdGetAvailDriverMemory
#define DXG_INDEX_DxDdIoctl
#define DXG_INDEX_DxDdDeleteSurfaceObject
#define DXG_INDEX_DxDdResetVisrgn
#define DXG_INDEX_DxDdSetExclusiveMode
#define DXG_INDEX_DxDdFlipToGDISurface
#define DXG_INDEX_DxDdQueryDirectDrawObject
#define DXG_INDEX_DxDdGetDC
#define DXG_INDEX_DxDdGetDxHandle
#define DXG_INDEX_DxDdGetDriverInfo
#define DXG_INDEX_DxDdSetGammaRamp
#define DXG_INDEX_DxDdCreateSurfaceObject
#define DXG_INDEX_DxDdDeleteDirectDrawObject
#define DXG_INDEX_DxDxgGenericThunk
#define DXG_INDEX_DxDdReleaseDC
#define DXG_INDEX_DxDdCreateDirectDrawObject
DWORD(APIENTRY * PGD_DXDDFLIPTOGDISURFACE)(HANDLE, PDD_FLIPTOGDISURFACEDATA)
BOOL(APIENTRY * PGD_DXDDDELETEDIRECTDRAWOBJECT)(HANDLE)
NTSTATUS(APIENTRY * PGD_DXDDCLEANUPDXGRAPHICS)(VOID)
BOOL(APIENTRY * PGD_DDRESTVISRGN)(HANDLE, HWND)
NTSTATUS(APIENTRY * PGD_DXDDSTARTUPDXGRAPHICS)(ULONG, PDRVENABLEDATA, ULONG, PDRVENABLEDATA, PULONG, PEPROCESS)
HANDLE(APIENTRY * PGD_DDGETDXHANDLE)(HANDLE, HANDLE, BOOL)
BOOL(APIENTRY * PGD_DXDDDELETESURFACEOBJECT)(HANDLE)
DWORD(APIENTRY * PGD_DXDDSETEXCLUSIVEMODE)(HANDLE, PDD_SETEXCLUSIVEMODEDATA)
BOOL(APIENTRY * PGD_DDRELEASEDC)(HANDLE)
DWORD(APIENTRY * PGD_DXDDGETDRIVERINFO)(HANDLE, PDD_GETDRIVERINFODATA)
DWORD(APIENTRY * PGD_DDGETDRIVERSTATE)(PDD_GETDRIVERSTATEDATA)
DWORD(APIENTRY * PGD_DXDDREENABLEDIRECTDRAWOBJECT)(HANDLE, BOOL *)
BOOL(APIENTRY * PGD_DDSETGAMMARAMP)(HANDLE, HDC, LPVOID)
HDC(APIENTRY * PGD_DDGETDC)(HANDLE, PALETTEENTRY *)
BOOL(APIENTRY * PGD_DXDDQUERYDIRECTDRAWOBJECT)(HANDLE, DD_HALINFO *, DWORD *, LPD3DNTHAL_CALLBACKS, LPD3DNTHAL_GLOBALDRIVERDATA, PDD_D3DBUFCALLBACKS, LPDDSURFACEDESC, DWORD *, VIDEOMEMORY *, DWORD *, DWORD *)
DWORD(APIENTRY * PGD_DXDDGETAVAILDRIVERMEMORY)(HANDLE, PDD_GETAVAILDRIVERMEMORYDATA)
HANDLE(APIENTRY * PGD_DDCREATEDIRECTDRAWOBJECT)(HDC hdc)
DWORD(APIENTRY * PGD_DDCOLORCONTROL)(HANDLE hSurface, PDD_COLORCONTROLDATA puColorControlData)
HANDLE(APIENTRY * PGD_DXDDCREATESURFACEOBJECT)(HANDLE, HANDLE, PDD_SURFACE_LOCAL, PDD_SURFACE_MORE, PDD_SURFACE_GLOBAL, BOOL)
static PROTOCOLDATA * pdata
#define STATUS_DLL_NOT_FOUND
#define STATUS_PROCEDURE_NOT_FOUND
NTSTATUS APIENTRY DxDdStartupDxGraphics(ULONG ulc1, PDRVENABLEDATA DxEngDrvOld, ULONG ulc2, PDRVENABLEDATA DxgDrvOld, PULONG DirectDrawContext, PEPROCESS Proc)
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
EDD_DIRECTDRAW_GLOBAL edd_DdirectDraw_Global
HANDLE APIENTRY NtGdiDdGetDxHandle(HANDLE hDirectDraw, HANDLE hSurface, BOOL bRelease)
BOOL APIENTRY NtGdiDdReleaseDC(HANDLE hSurface)
DWORD APIENTRY NtGdiDdGetAvailDriverMemory(HANDLE hDirectDrawLocal, PDD_GETAVAILDRIVERMEMORYDATA puGetAvailDriverMemoryData)
PGD_DXDDSTARTUPDXGRAPHICS gpfnStartupDxGraphics
BOOL APIENTRY NtGdiDdReenableDirectDrawObject(HANDLE hDirectDrawLocal, BOOL *pubNewMode)
BOOL APIENTRY NtGdiDdQueryDirectDrawObject(HANDLE hDirectDrawLocal, DD_HALINFO *pHalInfo, DWORD *pCallBackFlags, LPD3DNTHAL_CALLBACKS puD3dCallbacks, LPD3DNTHAL_GLOBALDRIVERDATA puD3dDriverData, PDD_D3DBUFCALLBACKS puD3dBufferCallbacks, LPDDSURFACEDESC puD3dTextureFormats, DWORD *puNumHeaps, VIDEOMEMORY *puvmList, DWORD *puNumFourCC, DWORD *puFourCC)
DWORD APIENTRY NtGdiDdFlipToGDISurface(HANDLE hDirectDraw, PDD_FLIPTOGDISURFACEDATA puFlipToGDISurfaceData)
DWORD APIENTRY NtGdiDdGetDriverInfo(HANDLE hDirectDrawLocal, PDD_GETDRIVERINFODATA puGetDriverInfoData)
DWORD APIENTRY NtGdiDdGetDriverState(PDD_GETDRIVERSTATEDATA pdata)
HDC APIENTRY NtGdiDdGetDC(HANDLE hSurface, PALETTEENTRY *puColorTable)
HANDLE APIENTRY NtGdiDdCreateSurfaceObject(HANDLE hDirectDrawLocal, HANDLE hSurface, PDD_SURFACE_LOCAL puSurfaceLocal, PDD_SURFACE_MORE puSurfaceMore, PDD_SURFACE_GLOBAL puSurfaceGlobal, BOOL bComplete)
HANDLE APIENTRY NtGdiDdCreateDirectDrawObject(HDC hdc)
DWORD APIENTRY NtGdiDdColorControl(HANDLE hSurface, PDD_COLORCONTROLDATA puColorControlData)
PGD_DXDDCLEANUPDXGRAPHICS gpfnCleanupDxGraphics
BOOL APIENTRY NtGdiDdSetGammaRamp(HANDLE hDirectDraw, HDC hdc, LPVOID lpGammaRamp)
BOOL APIENTRY NtGdiDdDeleteSurfaceObject(HANDLE hSurface)
ULONG gdwDirectDrawContext
DWORD APIENTRY NtGdiDdSetExclusiveMode(HANDLE hDirectDraw, PDD_SETEXCLUSIVEMODEDATA puSetExclusiveModeData)
DWORD APIENTRY NtGdiDxgGenericThunk(ULONG_PTR ulIndex, ULONG_PTR ulHandle, SIZE_T *pdwSizeOfPtr1, PVOID pvPtr1, SIZE_T *pdwSizeOfPtr2, PVOID pvPtr2)
BOOL APIENTRY NtGdiDdDeleteDirectDrawObject(HANDLE hDirectDrawLocal)
BOOL APIENTRY NtGdiDdResetVisrgn(HANDLE hSurface, HWND hwnd)
ENGAPI PVOID APIENTRY EngFindImageProcAddress(_In_ HANDLE hModule, _In_ LPSTR lpProcName)
#define DDI_DRIVER_VERSION_NT5_01
_Out_ DD_HALINFO * pHalInfo
ENGAPI VOID APIENTRY EngUnloadImage(_In_ HANDLE hModule)
ENGAPI HANDLE APIENTRY EngLoadImage(_In_ LPWSTR pwszDriver)