Add documentations for EngDxIoctl, NtGdiDxgGenericThunk

optimize for EngDxIoctl, NtGdiDxgGenericThunk
implement DxDxgGenericThunk, DxDdIoctl for they are outdated, they are left for compatible issue. 
 

svn path=/branches/reactx/; revision=29847
This commit is contained in:
Magnus Olsen 2007-10-24 08:13:39 +00:00
parent 6246902fcd
commit 3cc2abdc0a
8 changed files with 342 additions and 113 deletions

View file

@ -7,5 +7,6 @@ installbase="system32/drivers" installname="dxg.sys">
<define name="__USE_W32API" />
<library>dxgthk</library>
<file>main.c</file>
<file>historic.c</file>
<file>dxg.rc</file>
</module>

View file

@ -3,95 +3,96 @@
DRVFN gaDxgFuncs [] =
{
{DXG_INDEX_DxDxgGenericThunk, (PFN)DxDxgGenericThunk},
{DXG_INDEX_DxD3dContextCreate, (PFN)DxD3dContextCreate},
{DXG_INDEX_DxD3dContextDestroy, (PFN)DxD3dContextDestroy},
{DXG_INDEX_DxD3dContextDestroyAll, (PFN)DxD3dContextDestroyAll},
{DXG_INDEX_DxD3dValidateTextureStageState, (PFN)DxD3dValidateTextureStageState},
{DXG_INDEX_DxD3dDrawPrimitives2, (PFN)DxD3dDrawPrimitives2},
{DXG_INDEX_DxDdGetDriverState, (PFN)DxDdGetDriverState},
{DXG_INDEX_DxDdAddAttachedSurface, (PFN)DxDdAddAttachedSurface},
{DXG_INDEX_DxDdAlphaBlt, (PFN)DxDdAlphaBlt},
{DXG_INDEX_DxDdAttachSurface, (PFN)DxDdAttachSurface},
{DXG_INDEX_DxDdBeginMoCompFrame, (PFN)DxDdBeginMoCompFrame},
{DXG_INDEX_DxDdBlt, (PFN)DxDdBlt},
{DXG_INDEX_DxDdCanCreateSurface, (PFN)DxDdCanCreateSurface},
{DXG_INDEX_DxDdCanCreateD3DBuffer, (PFN)DxDdCanCreateD3DBuffer},
{DXG_INDEX_DxDdColorControl, (PFN)DxDdColorControl},
{DXG_INDEX_DxDdCreateDirectDrawObject, (PFN)DxDdCreateDirectDrawObject},
{DXG_INDEX_DxDdCreateD3DBuffer, (PFN)DxDdCreateD3DBuffer},
{DXG_INDEX_DxDdCreateD3DBuffer2, (PFN)DxDdCreateD3DBuffer},
{DXG_INDEX_DxDdCreateMoComp, (PFN)DxDdCreateMoComp},
{DXG_INDEX_DxDdCreateSurfaceObject, (PFN)DxDdCreateSurfaceObject},
{DXG_INDEX_DxDdDeleteDirectDrawObject, (PFN)DxDdDeleteDirectDrawObject},
{DXG_INDEX_DxDdDeleteSurfaceObject, (PFN)DxDdDeleteSurfaceObject},
{DXG_INDEX_DxDdDestroyMoComp, (PFN)DxDdDestroyMoComp},
{DXG_INDEX_DxDdDestroySurface, (PFN)DxDdDestroySurface},
{DXG_INDEX_DxDdDestroyD3DBuffer, (PFN)DxDdDestroyD3DBuffer},
{DXG_INDEX_DxDdEndMoCompFrame, (PFN)DxDdEndMoCompFrame},
{DXG_INDEX_DxDdFlip, (PFN)DxDdFlip},
{DXG_INDEX_DxDdFlipToGDISurface, (PFN)DxDdFlipToGDISurface},
{DXG_INDEX_DxDdGetAvailDriverMemory, (PFN)DxDdGetAvailDriverMemory},
{DXG_INDEX_DxDdGetBltStatus, (PFN)DxDdGetBltStatus},
{DXG_INDEX_DxDdGetDC, (PFN)DxDdGetDC},
{DXG_INDEX_DxDdGetDriverInfo, (PFN)DxDdGetDriverInfo},
{DXG_INDEX_DxDdGetDxHandle, (PFN)DxDdGetDxHandle},
{DXG_INDEX_DxDdGetFlipStatus, (PFN)},
{DXG_INDEX_DxDdGetInternalMoCompInfo, (PFN)},
{DXG_INDEX_DxDdGetMoCompBuffInfo, (PFN)},
{DXG_INDEX_DxDdGetMoCompGuids, (PFN)},
{DXG_INDEX_DxDdGetMoCompFormats, (PFN)},
{DXG_INDEX_DxDdGetScanLine, (PFN)},
{DXG_INDEX_DxDdLock, (PFN)},
{DXG_INDEX_DxDdLockD3D, (PFN)},
{DXG_INDEX_DxDdQueryDirectDrawObject, (PFN)},
{DXG_INDEX_DxDdQueryMoCompStatus, (PFN)},
{DXG_INDEX_DxDdReenableDirectDrawObject, (PFN)},
{DXG_INDEX_DxDdReleaseDC, (PFN)},
{DXG_INDEX_DxDdRenderMoComp, (PFN)},
{DXG_INDEX_DxDdResetVisrgn, (PFN)},
{DXG_INDEX_DxDdSetColorKey, (PFN)},
{DXG_INDEX_DxDdSetExclusiveMode, (PFN)},
{DXG_INDEX_DxDdSetGammaRamp, (PFN)},
{DXG_INDEX_DxDdCreateSurfaceEx, (PFN)},
{DXG_INDEX_DxDdSetOverlayPosition, (PFN)},
{DXG_INDEX_DxDdUnattachSurface, (PFN)},
{DXG_INDEX_DxDdUnlockD3D, (PFN)DxDdUnlockD3D},
{DXG_INDEX_DxDdUnlockD3D2, (PFN)DxDdUnlockD3D},
{DXG_INDEX_DxDdUpdateOverlay, (PFN)DxDdUpdateOverlay},
{DXG_INDEX_DxDdWaitForVerticalBlank, (PFN)DxDdWaitForVerticalBlank},
{DXG_INDEX_DxDvpCanCreateVideoPort, (PFN)DxDvpCanCreateVideoPort},
{DXG_INDEX_DxDvpColorControl, (PFN)DxDvpColorControl},
{DXG_INDEX_DxDvpCreateVideoPort, (PFN)DxDvpCreateVideoPort},
{DXG_INDEX_DxDvpDestroyVideoPort, (PFN)DxDvpDestroyVideoPort},
{DXG_INDEX_DxDvpFlipVideoPort, (PFN)DxDvpFlipVideoPort},
{DXG_INDEX_DxDvpGetVideoPortBandwidth, (PFN)DxDvpGetVideoPortBandwidth},
{DXG_INDEX_DxDvpGetVideoPortField, (PFN)DxDvpGetVideoPortField},
{DXG_INDEX_DxDvpGetVideoPortFlipStatus, (PFN)DxDvpGetVideoPortFlipStatus},
{DXG_INDEX_DxDvpGetVideoPortInputFormats, (PFN)DxDvpGetVideoPortInputFormats},
{DXG_INDEX_DxDvpGetVideoPortLine, (PFN)DxDvpGetVideoPortLine},
{DXG_INDEX_DxDvpGetVideoPortOutputFormats, (PFN)DxDvpGetVideoPortOutputFormats},
{DXG_INDEX_DxDvpGetVideoPortConnectInfo, (PFN)DxDvpGetVideoPortConnectInfo},
{DXG_INDEX_DxDvpGetVideoSignalStatus, (PFN)DxDvpGetVideoSignalStatus},
{DXG_INDEX_DxDvpUpdateVideoPort, (PFN)DxDvpUpdateVideoPort},
{DXG_INDEX_DxDvpWaitForVideoPortSync, (PFN)DxDvpWaitForVideoPortSync},
{DXG_INDEX_DxDvpAcquireNotification, (PFN)DxDvpAcquireNotification},
{DXG_INDEX_DxDvpReleaseNotification, (PFN)DxDvpReleaseNotification},
{DXG_INDEX_DxDdHeapVidMemAllocAligned, (PFN)DxDdHeapVidMemAllocAligned},
{DXG_INDEX_DxDdHeapVidMemFree, (PFN)DxDdHeapVidMemFree},
{DXG_INDEX_DxDdEnableDirectDraw, (PFN)DxDdEnableDirectDraw},
{DXG_INDEX_DxDdDisableDirectDraw, (PFN)DxDdDisableDirectDraw},
{DXG_INDEX_DxDdSuspendDirectDraw, (PFN)DxDdSuspendDirectDraw},
{DXG_INDEX_DxDdResumeDirectDraw, (PFN)DxDdResumeDirectDraw},
{DXG_INDEX_DxDdDynamicModeChange, (PFN)DxDdDynamicModeChange},
{DXG_INDEX_DxDdCloseProcess, (PFN)DxDdCloseProcess},
{DXG_INDEX_DxDdGetDirectDrawBound, (PFN)DxDdGetDirectDrawBound},
{DXG_INDEX_DxDdEnableDirectDrawRedirection, (PFN)DxDdEnableDirectDrawRedirection},
{DXG_INDEX_DxDdAllocPrivateUserMem, (PFN)DxDdAllocPrivateUserMem},
{DXG_INDEX_DxDdFreePrivateUserMem, (PFN)DxDdFreePrivateUserMem},
{DXG_INDEX_DxDdLockDirectDrawSurface, (PFN)DxDdLockDirectDrawSurface},
{DXG_INDEX_DxDdUnlockDirectDrawSurface, (PFN)DxDdUnlockDirectDrawSurface},
{DXG_INDEX_DxDdSetAccelLevel, (PFN)DxDdSetAccelLevel},
{DXG_INDEX_DxDdGetSurfaceLock, (PFN)DxDdGetSurfaceLock},
{DXG_INDEX_DxDdEnumLockedSurfaceRect, (PFN)DxDdEnumLockedSurfaceRect},
//{DXG_INDEX_DxD3dContextCreate, (PFN)DxD3dContextCreate},
//{DXG_INDEX_DxD3dContextDestroy, (PFN)DxD3dContextDestroy},
//{DXG_INDEX_DxD3dContextDestroyAll, (PFN)DxD3dContextDestroyAll},
//{DXG_INDEX_DxD3dValidateTextureStageState, (PFN)DxD3dValidateTextureStageState},
//{DXG_INDEX_DxD3dDrawPrimitives2, (PFN)DxD3dDrawPrimitives2},
//{DXG_INDEX_DxDdGetDriverState, (PFN)DxDdGetDriverState},
//{DXG_INDEX_DxDdAddAttachedSurface, (PFN)DxDdAddAttachedSurface},
//{DXG_INDEX_DxDdAlphaBlt, (PFN)DxDdAlphaBlt},
//{DXG_INDEX_DxDdAttachSurface, (PFN)DxDdAttachSurface},
//{DXG_INDEX_DxDdBeginMoCompFrame, (PFN)DxDdBeginMoCompFrame},
//{DXG_INDEX_DxDdBlt, (PFN)DxDdBlt},
//{DXG_INDEX_DxDdCanCreateSurface, (PFN)DxDdCanCreateSurface},
//{DXG_INDEX_DxDdCanCreateD3DBuffer, (PFN)DxDdCanCreateD3DBuffer},
//{DXG_INDEX_DxDdColorControl, (PFN)DxDdColorControl},
//{DXG_INDEX_DxDdCreateDirectDrawObject, (PFN)DxDdCreateDirectDrawObject},
//{DXG_INDEX_DxDdCreateSurface, (PFN)DxDdCreateD3DBuffer},
//{DXG_INDEX_DxDdCreateD3DBuffer, (PFN)DxDdCreateD3DBuffer},
//{DXG_INDEX_DxDdCreateMoComp, (PFN)DxDdCreateMoComp},
//{DXG_INDEX_DxDdCreateSurfaceObject, (PFN)DxDdCreateSurfaceObject},
//{DXG_INDEX_DxDdDeleteDirectDrawObject, (PFN)DxDdDeleteDirectDrawObject},
//{DXG_INDEX_DxDdDeleteSurfaceObject, (PFN)DxDdDeleteSurfaceObject},
//{DXG_INDEX_DxDdDestroyMoComp, (PFN)DxDdDestroyMoComp},
//{DXG_INDEX_DxDdDestroySurface, (PFN)DxDdDestroySurface},
//{DXG_INDEX_DxDdDestroyD3DBuffer, (PFN)DxDdDestroyD3DBuffer},
//{DXG_INDEX_DxDdEndMoCompFrame, (PFN)DxDdEndMoCompFrame},
//{DXG_INDEX_DxDdFlip, (PFN)DxDdFlip},
//{DXG_INDEX_DxDdFlipToGDISurface, (PFN)DxDdFlipToGDISurface},
//{DXG_INDEX_DxDdGetAvailDriverMemory, (PFN)DxDdGetAvailDriverMemory},
//{DXG_INDEX_DxDdGetBltStatus, (PFN)DxDdGetBltStatus},
//{DXG_INDEX_DxDdGetDC, (PFN)DxDdGetDC},
//{DXG_INDEX_DxDdGetDriverInfo, (PFN)DxDdGetDriverInfo},
//{DXG_INDEX_DxDdGetDxHandle, (PFN)DxDdGetDxHandle},
//{DXG_INDEX_DxDdGetFlipStatus, (PFN)DxDdGetFlipStatus},
//{DXG_INDEX_DxDdGetInternalMoCompInfo, (PFN)DxDdGetInternalMoCompInfo},
//{DXG_INDEX_DxDdGetMoCompBuffInfo, (PFN)DxDdGetMoCompBuffInfo},
//{DXG_INDEX_DxDdGetMoCompGuids, (PFN)DxDdGetMoCompGuids},
//{DXG_INDEX_DxDdGetMoCompFormats, (PFN)DxDdGetMoCompFormats},
//{DXG_INDEX_DxDdGetScanLine, (PFN)DxDdGetScanLine},
//{DXG_INDEX_DxDdLock, (PFN)DxDdLock},
//{DXG_INDEX_DxDdLockD3D, (PFN)DxDdLockD3D},
//{DXG_INDEX_DxDdQueryDirectDrawObject, (PFN)DxDdQueryDirectDrawObject},
//{DXG_INDEX_DxDdQueryMoCompStatus, (PFN)DxDdQueryMoCompStatus},
//{DXG_INDEX_DxDdReenableDirectDrawObject, (PFN)DxDdReenableDirectDrawObject},
//{DXG_INDEX_DxDdReleaseDC, (PFN)DxDdReleaseDC},
//{DXG_INDEX_DxDdRenderMoComp, (PFN)DxDdRenderMoComp},
//{DXG_INDEX_DxDdResetVisrgn, (PFN)DxDdResetVisrgn},
//{DXG_INDEX_DxDdSetColorKey, (PFN)DxDdSetColorKey},
//{DXG_INDEX_DxDdSetExclusiveMode, (PFN)DxDdSetExclusiveMode},
//{DXG_INDEX_DxDdSetGammaRamp, (PFN)DxDdSetGammaRamp},
//{DXG_INDEX_DxDdCreateSurfaceEx, (PFN)DxDdCreateSurfaceEx},
//{DXG_INDEX_DxDdSetOverlayPosition, (PFN)DxDdSetOverlayPosition},
//{DXG_INDEX_DxDdUnattachSurface, (PFN)DxDdUnattachSurface},
//{DXG_INDEX_DxDdUnlock, (PFN)DxDdUnlock},
//{DXG_INDEX_DxDdUnlockD3D2, (PFN)DxDdUnlockD3D},
//{DXG_INDEX_DxDdUpdateOverlay, (PFN)DxDdUpdateOverlay},
//{DXG_INDEX_DxDdWaitForVerticalBlank, (PFN)DxDdWaitForVerticalBlank},
//{DXG_INDEX_DxDvpCanCreateVideoPort, (PFN)DxDvpCanCreateVideoPort},
//{DXG_INDEX_DxDvpColorControl, (PFN)DxDvpColorControl},
//{DXG_INDEX_DxDvpCreateVideoPort, (PFN)DxDvpCreateVideoPort},
//{DXG_INDEX_DxDvpDestroyVideoPort, (PFN)DxDvpDestroyVideoPort},
//{DXG_INDEX_DxDvpFlipVideoPort, (PFN)DxDvpFlipVideoPort},
//{DXG_INDEX_DxDvpGetVideoPortBandwidth, (PFN)DxDvpGetVideoPortBandwidth},
//{DXG_INDEX_DxDvpGetVideoPortField, (PFN)DxDvpGetVideoPortField},
//{DXG_INDEX_DxDvpGetVideoPortFlipStatus, (PFN)DxDvpGetVideoPortFlipStatus},
//{DXG_INDEX_DxDvpGetVideoPortInputFormats, (PFN)DxDvpGetVideoPortInputFormats},
//{DXG_INDEX_DxDvpGetVideoPortLine, (PFN)DxDvpGetVideoPortLine},
//{DXG_INDEX_DxDvpGetVideoPortOutputFormats, (PFN)DxDvpGetVideoPortOutputFormats},
//{DXG_INDEX_DxDvpGetVideoPortConnectInfo, (PFN)DxDvpGetVideoPortConnectInfo},
//{DXG_INDEX_DxDvpGetVideoSignalStatus, (PFN)DxDvpGetVideoSignalStatus},
//{DXG_INDEX_DxDvpUpdateVideoPort, (PFN)DxDvpUpdateVideoPort},
//{DXG_INDEX_DxDvpWaitForVideoPortSync, (PFN)DxDvpWaitForVideoPortSync},
//{DXG_INDEX_DxDvpAcquireNotification, (PFN)DxDvpAcquireNotification},
//{DXG_INDEX_DxDvpReleaseNotification, (PFN)DxDvpReleaseNotification},
//{DXG_INDEX_DxDdHeapVidMemAllocAligned, (PFN)DxDdHeapVidMemAllocAligned},
//{DXG_INDEX_DxDdHeapVidMemFree, (PFN)DxDdHeapVidMemFree},
//{DXG_INDEX_DxDdEnableDirectDraw, (PFN)DxDdEnableDirectDraw},
//{DXG_INDEX_DxDdDisableDirectDraw, (PFN)DxDdDisableDirectDraw},
//{DXG_INDEX_DxDdSuspendDirectDraw, (PFN)DxDdSuspendDirectDraw},
//{DXG_INDEX_DxDdResumeDirectDraw, (PFN)DxDdResumeDirectDraw},
//{DXG_INDEX_DxDdDynamicModeChange, (PFN)DxDdDynamicModeChange},
//{DXG_INDEX_DxDdCloseProcess, (PFN)DxDdCloseProcess},
//{DXG_INDEX_DxDdGetDirectDrawBound, (PFN)DxDdGetDirectDrawBound},
//{DXG_INDEX_DxDdEnableDirectDrawRedirection, (PFN)DxDdEnableDirectDrawRedirection},
//{DXG_INDEX_DxDdAllocPrivateUserMem, (PFN)DxDdAllocPrivateUserMem},
//{DXG_INDEX_DxDdFreePrivateUserMem, (PFN)DxDdFreePrivateUserMem},
//{DXG_INDEX_DxDdLockDirectDrawSurface, (PFN)DxDdLockDirectDrawSurface},
//{DXG_INDEX_DxDdUnlockDirectDrawSurface, (PFN)DxDdUnlockDirectDrawSurface},
//{DXG_INDEX_DxDdSetAccelLevel, (PFN)DxDdSetAccelLevel},
//{DXG_INDEX_DxDdGetSurfaceLock, (PFN)DxDdGetSurfaceLock},
//{DXG_INDEX_DxDdEnumLockedSurfaceRect, (PFN)DxDdEnumLockedSurfaceRect},
{DXG_INDEX_DxDdIoctl, (PFN)DxDdIoctl}
};

View file

@ -23,7 +23,7 @@
#include <reactos/win32k/ntgdityp.h>
#include <reactos/win32k/ntgdihdl.h>
#include <reactos/win32k/win32kdc.h>
#include <reactos/drivers/directx/dxg.h>
#include <reactos/drivers/directx/dxeng.h>
@ -35,6 +35,8 @@ NTSTATUS DxDdCleanupDxGraphics();
/* Driver list export functions */
DWORD STDCALL DxDxgGenericThunk(ULONG_PTR ulIndex, ULONG_PTR ulHandle, SIZE_T *pdwSizeOfPtr1, PVOID pvPtr1, SIZE_T *pdwSizeOfPtr2, PVOID pvPtr2);
DWORD STDCALL DxDdIoctl(ULONG ulIoctl, PVOID pBuffer, ULONG ulBufferSize);
/* Internel functions */
BOOL DdHmgDestroy();

View file

@ -0,0 +1,88 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* PURPOSE: Native driver for dxg implementation
* FILE: drivers/directx/dxg/main.c
* PROGRAMER: Magnus olsen (magnus@greatlord.com)
* REVISION HISTORY:
* 15/10-2007 Magnus Olsen
*/
#include <dxg_int.h>
/*++
* @name DxDxgGenericThunk
* @implemented
*
* The function DxDxgGenericThunk redirect dx call to other thing.
*
* @param ULONG_PTR ulIndex
* The functions we want redirct
*
* @param ULONG_PTR ulHandle
* Unknown
*
* @param SIZE_T *pdwSizeOfPtr1
* Unknown
*
* @param PVOID pvPtr1
* Unknown
*
* @param SIZE_T *pdwSizeOfPtr2
* Unknown
*
* @param PVOID pvPtr2
* Unknown
*
* @return
* always return DDHAL_DRIVER_NOTHANDLED
*
* @remarks.
* This api are not longer use in Windows NT 2000/XP/2003
*
*--*/
DWORD
STDCALL
DxDxgGenericThunk(ULONG_PTR ulIndex,
ULONG_PTR ulHandle,
SIZE_T *pdwSizeOfPtr1,
PVOID pvPtr1,
SIZE_T *pdwSizeOfPtr2,
PVOID pvPtr2)
{
return DDHAL_DRIVER_NOTHANDLED;
}
/*++
* @name DxDdIoctl
* @implemented
*
* The function DxDdIoctl is the ioctl call to diffent dx functions
*
* @param ULONG ulIoctl
* The ioctl code that we want call to
*
* @param PVOID pBuffer
* Our in or out buffer with data to the ioctl code we are using
*
* @param ULONG ulBufferSize
* The buffer size in bytes
*
* @return
* always return DDERR_UNSUPPORTED
*
* @remarks.
* This api are not longer use in Windows NT 2000/XP/2003
*
*--*/
DWORD
STDCALL
DxDdIoctl(ULONG ulIoctl,
PVOID pBuffer,
ULONG ulBufferSize)
{
return DDERR_UNSUPPORTED;
}

View file

@ -116,3 +116,102 @@
#define DXG_INDEX_DxDdGetSurfaceLock 0x59
#define DXG_INDEX_DxDdEnumLockedSurfaceRect 0x5A
/***********************************************************************************/
/* Driver Functions Protypes */
/***********************************************************************************/
typedef DWORD (NTAPI *PGD_DXDXGGENERICTHUNK)(ULONG_PTR, ULONG_PTR, SIZE_T *, PVOID, SIZE_T *, PVOID);
//typedef x (NTAPI *PGD_DxD3dContextCreate)(
//typedef x (NTAPI *PGD_DxD3dContextDestroy)(
//typedef x (NTAPI *PGD_DxD3dContextDestroyAll)(
//typedef x (NTAPI *PGD_DxD3dValidateTextureStageState)(
//typedef x (NTAPI *PGD_DxD3dDrawPrimitives2)(
//typedef x (NTAPI *PGD_DxDdGetDriverState)(
//typedef x (NTAPI *PGD_DxDdAddAttachedSurface)(
//typedef x (NTAPI *PGD_DxDdAlphaBlt)(
//typedef x (NTAPI *PGD_DxDdAttachSurface)(
//typedef x (NTAPI *PGD_DxDdBeginMoCompFrame)(
//typedef x (NTAPI *PGD_DxDdBlt)(
//typedef x (NTAPI *PGD_DxDdCanCreateSurface)(
//typedef x (NTAPI *PGD_DxDdCanCreateD3DBuffer)(
//typedef x (NTAPI *PGD_DxDdColorControl)(
//typedef x (NTAPI *PGD_DxDdCreateDirectDrawObject)(
//typedef x (NTAPI *PGD_DxDdCreateSurface)(
//typedef x (NTAPI *PGD_DxDdCreateD3DBuffer)(
//typedef x (NTAPI *PGD_DxDdCreateMoComp)(
//typedef x (NTAPI *PGD_DxDdCreateSurfaceObject)(
//typedef x (NTAPI *PGD_DxDdDeleteDirectDrawObject)(
//typedef x (NTAPI *PGD_DxDdDeleteSurfaceObject)(
//typedef x (NTAPI *PGD_DxDdDestroyMoComp)(
//typedef x (NTAPI *PGD_DxDdDestroySurface)(
//typedef x (NTAPI *PGD_DxDdDestroyD3DBuffer)(
//typedef x (NTAPI *PGD_DxDdEndMoCompFrame)(
//typedef x (NTAPI *PGD_DxDdFlip)(
//typedef x (NTAPI *PGD_DxDdFlipToGDISurface)(
//typedef x (NTAPI *PGD_DxDdGetAvailDriverMemory)(
//typedef x (NTAPI *PGD_DxDdGetBltStatus)(
//typedef x (NTAPI *PGD_DxDdGetDC)(
//typedef x (NTAPI *PGD_DxDdGetDriverInfo)(
//typedef x (NTAPI *PGD_DxDdGetDxHandle)(
//typedef x (NTAPI *PGD_DxDdGetFlipStatus)(
//typedef x (NTAPI *PGD_DxDdGetInternalMoCompInfo)(
//typedef x (NTAPI *PGD_DxDdGetMoCompBuffInfo)(
//typedef x (NTAPI *PGD_DxDdGetMoCompGuids)(
//typedef x (NTAPI *PGD_DxDdGetMoCompFormats)(
//typedef x (NTAPI *PGD_DxDdGetScanLine)(
//typedef x (NTAPI *PGD_DxDdLock)(
//typedef x (NTAPI *PGD_DxDdLockD3D)(
//typedef x (NTAPI *PGD_DxDdQueryDirectDrawObject)(
//typedef x (NTAPI *PGD_DxDdQueryMoCompStatus)(
//typedef x (NTAPI *PGD_DxDdReenableDirectDrawObject)(
//typedef x (NTAPI *PGD_DxDdReleaseDC)(
//typedef x (NTAPI *PGD_DxDdRenderMoComp)(
//typedef x (NTAPI *PGD_DxDdResetVisrgn)(
//typedef x (NTAPI *PGD_DxDdSetColorKey)(
//typedef x (NTAPI *PGD_DxDdSetExclusiveMode)(
//typedef x (NTAPI *PGD_DxDdSetGammaRamp)(
//typedef x (NTAPI *PGD_DxDdCreateSurfaceEx)(
//typedef x (NTAPI *PGD_DxDdSetOverlayPosition)(
//typedef x (NTAPI *PGD_DxDdUnattachSurface)(
//typedef x (NTAPI *PGD_DxDdUnlock)(
//typedef x (NTAPI *PGD_DxDdUnlockD3D)(
//typedef x (NTAPI *PGD_DxDdUpdateOverlay)(
//typedef x (NTAPI *PGD_DxDdWaitForVerticalBlank)(
//typedef x (NTAPI *PGD_DxDvpCanCreateVideoPort)(
//typedef x (NTAPI *PGD_DxDvpColorControl)(
//typedef x (NTAPI *PGD_DxDvpCreateVideoPort)(
//typedef x (NTAPI *PGD_DxDvpDestroyVideoPort)(
//typedef x (NTAPI *PGD_DxDvpFlipVideoPort)(
//typedef x (NTAPI *PGD_DxDvpGetVideoPortBandwidth)(
//typedef x (NTAPI *PGD_DxDvpGetVideoPortField)(
//typedef x (NTAPI *PGD_DxDvpGetVideoPortFlipStatus)(
//typedef x (NTAPI *PGD_DxDvpGetVideoPortInputFormats)(
//typedef x (NTAPI *PGD_DxDvpGetVideoPortLine)(
//typedef x (NTAPI *PGD_DxDvpGetVideoPortOutputFormats)(
//typedef x (NTAPI *PGD_DxDvpGetVideoPortConnectInfo)(
//typedef x (NTAPI *PGD_DxDvpGetVideoSignalStatus)(
//typedef x (NTAPI *PGD_DxDvpUpdateVideoPort)(
//typedef x (NTAPI *PGD_DxDvpWaitForVideoPortSync)(
//typedef x (NTAPI *PGD_DxDvpAcquireNotification)(
//typedef x (NTAPI *PGD_DxDvpReleaseNotification)(
//typedef x (NTAPI *PGD_DxDdHeapVidMemAllocAligned)(
//typedef x (NTAPI *PGD_DxDdHeapVidMemFree)(
//typedef x (NTAPI *PGD_DxDdEnableDirectDraw)(
//typedef x (NTAPI *PGD_DxDdDisableDirectDraw)(
//typedef x (NTAPI *PGD_DxDdSuspendDirectDraw)(
//typedef x (NTAPI *PGD_DxDdResumeDirectDraw)(
//typedef x (NTAPI *PGD_DxDdDynamicModeChange)(
//typedef x (NTAPI *PGD_DxDdCloseProcess)(
//typedef x (NTAPI *PGD_DxDdGetDirectDrawBound)(
//typedef x (NTAPI *PGD_DxDdEnableDirectDrawRedirection)(
//typedef x (NTAPI *PGD_DxDdAllocPrivateUserMem)(
//typedef x (NTAPI *PGD_DxDdFreePrivateUserMem)(
//typedef x (NTAPI *PGD_DxDdLockDirectDrawSurface)(
//typedef x (NTAPI *PGD_DxDdUnlockDirectDrawSurface)(
//typedef x (NTAPI *PGD_DxDdSetAccelLevel)(
//typedef x (NTAPI *PGD_DxDdGetSurfaceLock)(
//typedef x (NTAPI *PGD_DxDdEnumLockedSurfaceRect)(
typedef DWORD (NTAPI *PGD_ENGDXIOCTL)(ULONG, PVOID, ULONG);

View file

@ -14,7 +14,6 @@ typedef BOOL (NTAPI* PGD_DDRELEASEDC)(HANDLE);
typedef BOOL (NTAPI* PGD_DDRESTVISRGN)(HANDLE, HWND);
typedef HANDLE (NTAPI* PGD_DDGETDXHANDLE)(HANDLE, HANDLE, BOOL);
typedef HDC (NTAPI *PGD_DDGETDC)(HANDLE, PALETTEENTRY *);
typedef DWORD (NTAPI *PGD_DXGENERICTRUNK)(ULONG_PTR, ULONG_PTR, SIZE_T*, PVOID, SIZE_T*, PVOID);
typedef DWORD (NTAPI *PGD_DXDDREENABLEDIRECTDRAWOBJECT)(HANDLE, BOOL*);
typedef DWORD (NTAPI *PGD_DXDDGETDRIVERINFO)(HANDLE, PDD_GETDRIVERINFODATA);
typedef DWORD (NTAPI *PGD_DXDDSETEXCLUSIVEMODE)(HANDLE, PDD_SETEXCLUSIVEMODEDATA);
@ -103,7 +102,6 @@ typedef FLATPTR (NTAPI *PGD_HEAPVIDMEMALLOCALIGNED)(LPVIDMEM, DWORD, DWORD, LPSU
typedef VOID (NTAPI *PGD_VIDMEMFREE)(LPVMEMHEAP, FLATPTR);
typedef PVOID (NTAPI *PGD_ENGALLOCPRIVATEUSERMEM)(PDD_SURFACE_LOCAL, SIZE_T, ULONG) ;
typedef VOID (NTAPI *PGD_ENGFREEPRIVATEUSERMEM)(PDD_SURFACE_LOCAL, PVOID);
typedef DWORD (NTAPI *PGD_ENGDXIOCTL)(ULONG, PVOID, ULONG);
typedef PDD_SURFACE_LOCAL (NTAPI *PGD_ENGLOCKDIRECTDRAWSURFACE)(HANDLE);
typedef BOOL (NTAPI *PGD_ENGUNLOCKDIRECTDRAWSURFACE)(PDD_SURFACE_LOCAL);
@ -123,7 +121,4 @@ typedef BOOL (NTAPI *PGD_ENGUNLOCKDIRECTDRAWSURFACE)(PDD_SURFACE_LOCAL);
}
BOOL INTERNAL_CALL DD_Cleanup(PVOID pDD);
BOOL INTERNAL_CALL DDSURF_Cleanup(PVOID pDDSurf);
#endif /* _INT_W32k_DDRAW */

View file

@ -150,11 +150,39 @@ NtGdiDdCreateDirectDrawObject(HDC hdc)
}
/************************************************************************/
/* NtGdiDxgGenericThunk */
/************************************************************************/
/*++
* @name NtGdiDxgGenericThunk
* @implemented
*
* The function NtGdiDxgGenericThunk redirect dx call to other thing.
* from dxg.sys
*
* @param ULONG_PTR ulIndex
* The functions we want redirct
*
* @param ULONG_PTR ulHandle
* Unknown
*
* @param SIZE_T *pdwSizeOfPtr1
* Unknown
*
* @param PVOID pvPtr1
* Unknown
*
* @param SIZE_T *pdwSizeOfPtr2
* Unknown
*
* @param PVOID pvPtr2
* Unknown
*
* @return
* always return DDHAL_DRIVER_NOTHANDLED
*
* @remarks.
* dxg.sys NtGdiDxgGenericThunk call are redirect to dxg.sys
* This api are not longer use in Windows NT 2000/XP/2003
*
*--*/
DWORD
STDCALL
NtGdiDxgGenericThunk(ULONG_PTR ulIndex,
@ -164,10 +192,7 @@ NtGdiDxgGenericThunk(ULONG_PTR ulIndex,
SIZE_T *pdwSizeOfPtr2,
PVOID pvPtr2)
{
PGD_DXGENERICTRUNK pfnDxgGenericThunk = NULL;
INT i;
DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDxgGenericThunk, pfnDxgGenericThunk);
PGD_DXGENERICTRUNK pfnDxgGenericThunk = (PGD_DXGENERICTRUNK)gpDxFuncs[DXG_INDEX_DxDxgGenericThunk].pfn;
if (pfnDxgGenericThunk == NULL)
{

View file

@ -112,24 +112,42 @@ EngFreePrivateUserMem(PDD_SURFACE_LOCAL psl,
}
}
/************************************************************************/
/* EngDxIoctl */
/************************************************************************/
/*++
* @name EngDxIoctl
* @implemented
*
* The function EngDxIoctl is the ioctl call to diffent dx functions
* to the driver dxg.sys
*
* @param ULONG ulIoctl
* The ioctl code that we want call to
*
* @param PVOID pBuffer
* Our in or out buffer with data to the ioctl code we are using
*
* @param ULONG ulBufferSize
* The buffer size in bytes
*
* @return
* always return DDERR_UNSUPPORTED
*
* @remarks.
* dxg.sys EngDxIoctl call are redirect to dxg.sys
* This api are not longer use in Windows NT 2000/XP/2003
*
*--*/
DWORD
STDCALL
EngDxIoctl(ULONG ulIoctl,
PVOID pBuffer,
ULONG ulBufferSize)
{
PGD_ENGDXIOCTL pfnEngDxIoctl = NULL;
INT i;
DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDdIoctl, pfnEngDxIoctl);
PGD_ENGDXIOCTL pfnEngDxIoctl = (PGD_ENGDXIOCTL)gpDxFuncs[DXG_INDEX_DxDdIoctl].pfn;
if (pfnEngDxIoctl == NULL)
{
DPRINT1("Warring no pfnEngDxIoctl");
return DDHAL_DRIVER_NOTHANDLED;
return DDERR_UNSUPPORTED;
}
DPRINT1("Calling on dxg.sys pfnEngDxIoctl");