More DirectDraw groundwork by Peter Bajusz
authorGé van Geldorp <ge@gse.nl>
Tue, 28 Oct 2003 19:30:08 +0000 (19:30 +0000)
committerGé van Geldorp <ge@gse.nl>
Tue, 28 Oct 2003 19:30:08 +0000 (19:30 +0000)
svn path=/trunk/; revision=6447

18 files changed:
reactos/include/ddentry.h
reactos/include/ddk/d3dhal.h
reactos/include/ddk/d3dnthal.h [new file with mode: 0644]
reactos/include/ddk/ddrawi.h
reactos/include/ddk/ddrawint.h [new file with mode: 0644]
reactos/include/ddk/winddi.h
reactos/include/ddraw.h
reactos/include/win32k/ntddraw.h
reactos/lib/d3d8thk/Makefile
reactos/lib/d3d8thk/d3d8thk.def
reactos/lib/d3d8thk/d3d8thk.edf [new file with mode: 0644]
reactos/lib/gdi32/gdi32.def
reactos/lib/gdi32/gdi32.edf
reactos/lib/gdi32/misc/stubs.c
reactos/subsys/win32k/makefile
reactos/subsys/win32k/ntddraw/ddraw.c [new file with mode: 0644]
reactos/subsys/win32k/ntddraw/stubs.c
reactos/subsys/win32k/objects/dc.c

index 06c0716..4316645 100644 (file)
@@ -16,8 +16,8 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-#include <ddk/ddrawi.h>
 #include <ddk/winddi.h>
+#include <ddk/ddrawi.h>
 #include <ddk/d3dhal.h>
 BOOL STDCALL DdCreateDirectDrawObject( 
 LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal,
@@ -93,265 +93,3 @@ LPDDRAWI_DIRECTDRAW_LCL pDDraw,
 LPDDRAWI_DDRAWSURFACE_LCL pDDSLcl1,
 LPDDRAWI_DDRAWSURFACE_LCL pDDSLcl2
 );
-DWORD STDCALL DxgGenericThunk(ULONG_PTR ulIndex,
-ULONG_PTR ulHandle,
-SIZE_T *pdwSizeOfPtr1,
-PVOID pvPtr1,
-SIZE_T *pdwSizeOfPtr2,
-PVOID pvPtr2);
-BOOL STDCALL D3DContextCreate( 
-HANDLE hDirectDrawLocal,
-HANDLE hSurfColor,
-HANDLE hSurfZ,
-D3DNTHAL_CONTEXTCREATEI *pdcci
-);
-DWORD STDCALL D3DContextDestroy( 
-LPD3DNTHAL_CONTEXTDESTROYDATA pContextDestroyData
-);
-DWORD STDCALL D3DContextDestroyAll(VOID);
-DWORD STDCALL D3DValidateTextureStageState( 
-LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA pData
-);
-DWORD STDCALL D3DDrawPrimitives2( 
-HANDLE hCmdBuf,
-HANDLE hVBuf,
-LPD3DNTHAL_DRAWPRIMITIVES2DATA pded,
-FLATPTR *pfpVidMemCmd,
-DWORD *pdwSizeCmd,
-FLATPTR *pfpVidMemVtx,
-DWORD *pdwSizeVtx
-);
-DWORD STDCALL D3DGetDriverState( 
-PDD_GETDRIVERSTATEDATA pdata
-);
-DWORD STDCALL DdAddAttachedSurface( 
-HANDLE hSurface,
-HANDLE hSurfaceAttached,
-PDD_ADDATTACHEDSURFACEDATA puAddAttachedSurfaceData
-);
-DWORD STDCALL DdAlphaBlt(
-HANDLE hSurfaceDest, 
-HANDLE hSurfaceSrc,
-PDD_BLTDATA puBltData);
-BOOL STDCALL DdDdAttachSurface( /*rename it so it doesnt conflict */
-HANDLE hSurfaceFrom,
-HANDLE hSurfaceTo
-);
-DWORD STDCALL DdBeginMoCompFrame( 
-HANDLE hMoComp,
-PDD_BEGINMOCOMPFRAMEDATA puBeginFrameData
-);
-DWORD STDCALL DdBlt( 
-HANDLE hSurfaceDest,
-HANDLE hSurfaceSrc,
-PDD_BLTDATA puBltData
-);
-DWORD STDCALL DdCanCreateSurface( 
-HANDLE hDirectDraw,
-PDD_CANCREATESURFACEDATA puCanCreateSurfaceData
-);
-DWORD STDCALL DdCanCreateD3DBuffer( 
-HANDLE hDirectDraw,
-PDD_CANCREATESURFACEDATA puCanCreateSurfaceData
-);
-DWORD STDCALL DdColorControl( 
-HANDLE hSurface,
-PDD_COLORCONTROLDATA puColorControlData
-);
-HANDLE STDCALL DdDdCreateDirectDrawObject( /*rename it so it doesnt conflict */
-HDC hdc
-);
-DWORD STDCALL DdCreateSurface( 
-HANDLE hDirectDraw,
-HANDLE *hSurface,
-DDSURFACEDESC *puSurfaceDescription,
-DD_SURFACE_GLOBAL *puSurfaceGlobalData,
-DD_SURFACE_LOCAL *puSurfaceLocalData,
-DD_SURFACE_MORE *puSurfaceMoreData,
-DD_CREATESURFACEDATA *puCreateSurfaceData,
-HANDLE *puhSurface
-);
-DWORD STDCALL DdCreateD3DBuffer( 
-HANDLE hDirectDraw,
-HANDLE *hSurface,
-DDSURFACEDESC *puSurfaceDescription,
-DD_SURFACE_GLOBAL *puSurfaceGlobalData,
-DD_SURFACE_LOCAL *puSurfaceLocalData,
-DD_SURFACE_MORE *puSurfaceMoreData,
-DD_CREATESURFACEDATA *puCreateSurfaceData,
-HANDLE *puhSurface
-);
-HANDLE STDCALL DdCreateMoComp( 
-HANDLE hDirectDraw,
-PDD_CREATEMOCOMPDATA puCreateMoCompData
-);
-HANDLE STDCALL DdDdCreateSurfaceObject( /*rename it so it doesnt conflict */
-HANDLE hDirectDrawLocal,
-HANDLE hSurface,
-PDD_SURFACE_LOCAL puSurfaceLocal,
-PDD_SURFACE_MORE puSurfaceMore,
-PDD_SURFACE_GLOBAL puSurfaceGlobal,
-BOOL bComplete
-);
-BOOL STDCALL DdDdDeleteDirectDrawObject( /*rename it so it doesnt conflict */
-HANDLE hDirectDrawLocal
-);
-BOOL STDCALL DdDdDeleteSurfaceObject( /*rename it so it doesnt conflict */
-HANDLE hSurface
-);
-DWORD STDCALL DdDestroyMoComp( 
-HANDLE hMoComp,
-PDD_DESTROYMOCOMPDATA puBeginFrameData
-);
-DWORD STDCALL DdDestroySurface( 
-HANDLE hSurface,
-BOOL bRealDestroy
-);
-DWORD STDCALL DdDestroyD3DBuffer( 
-HANDLE hSurface
-);
-DWORD STDCALL DdEndMoCompFrame( 
-HANDLE hMoComp,
-PDD_ENDMOCOMPFRAMEDATA puEndFrameData
-);
-DWORD STDCALL DdFlip( 
-HANDLE hSurfaceCurrent,
-HANDLE hSurfaceTarget,
-HANDLE hSurfaceCurrentLeft,
-HANDLE hSurfaceTargetLeft,
-PDD_FLIPDATA puFlipData
-);
-DWORD STDCALL DdFlipToGDISurface( 
-HANDLE hDirectDraw,
-PDD_FLIPTOGDISURFACEDATA puFlipToGDISurfaceData
-);
-DWORD STDCALL DdGetAvailDriverMemory( 
-HANDLE hDirectDraw,
-PDD_GETAVAILDRIVERMEMORYDATA puGetAvailDriverMemoryData
-);
-DWORD STDCALL DdGetBltStatus( 
-HANDLE hSurface,
-PDD_GETBLTSTATUSDATA puGetBltStatusData
-);
-HDC STDCALL DdDdGetDC( /*rename it so it doesnt conflict */
-HANDLE hSurface,
-PALETTEENTRY *puColorTable
-);
-DWORD STDCALL DdGetDriverInfo( 
-HANDLE hDirectDraw,
-PDD_GETDRIVERINFODATA puGetDriverInfoData
-);
-DWORD STDCALL DdDdGetDxHandle( /*rename it so it doesnt conflict */
-HANDLE hDirectDraw,
-HANDLE hSurface,
-BOOL bRelease
-);
-DWORD STDCALL DdGetFlipStatus( 
-HANDLE hSurface,
-PDD_GETFLIPSTATUSDATA puGetFlipStatusData
-);
-DWORD STDCALL DdGetInternalMoCompInfo( 
-HANDLE hDirectDraw,
-PDD_GETINTERNALMOCOMPDATA puGetInternalData
-);
-DWORD STDCALL DdGetMoCompBuffInfo( 
-HANDLE hDirectDraw,
-PDD_GETMOCOMPCOMPBUFFDATA puGetBuffData
-);
-DWORD STDCALL DdGetMoCompGuids( 
-HANDLE hDirectDraw,
-PDD_GETMOCOMPGUIDSDATA puGetMoCompGuidsData
-);
-DWORD STDCALL DdGetMoCompFormats( 
-HANDLE hDirectDraw,
-PDD_GETMOCOMPFORMATSDATA puGetMoCompFormatsData
-);
-DWORD STDCALL DdGetScanLine( 
-HANDLE hDirectDraw,
-PDD_GETSCANLINEDATA puGetScanLineData
-);
-DWORD STDCALL DdLock( 
-HANDLE hSurface,
-PDD_LOCKDATA puLockData,
-HDC hdcClip
-);
-DWORD STDCALL DdLockD3D( 
-HANDLE hSurface,
-PDD_LOCKDATA puLockData
-);
-BOOL STDCALL DdDdQueryDirectDrawObject(  /*rename it so it doesnt conflict */
-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 STDCALL DdQueryMoCompStatus( 
-HANDLE hMoComp,
-PDD_QUERYMOCOMPSTATUSDATA puQueryMoCompStatusData
-);
-BOOL STDCALL DdDdReenableDirectDrawObject( /*rename it so it doesnt conflict */
-HANDLE hDirectDrawLocal,
-BOOL *pubNewMode
-);
-BOOL STDCALL DdDdReleaseDC( /*rename it so it doesnt conflict */
-HANDLE hSurface
-);
-DWORD STDCALL DdRenderMoComp( 
-HANDLE hMoComp,
-PDD_RENDERMOCOMPDATA puRenderMoCompData
-);
-BOOL STDCALL DdDdResetVisrgn( /*rename it so it doesnt conflict */
-HANDLE hSurface,
-HWND hwnd
-);
-DWORD STDCALL DdSetColorKey( 
-HANDLE hSurface,
-PDD_SETCOLORKEYDATA puSetColorKeyData
-);
-DWORD STDCALL DdSetExclusiveMode( 
-HANDLE hDirectDraw,
-PDD_SETEXCLUSIVEMODEDATA puSetExclusiveModeData
-);
-BOOL STDCALL DdDdSetGammaRamp( /*rename it so it doesnt conflict */
-HANDLE hDirectDraw,
-HDC hdc,
-LPVOID lpGammaRamp
-);
-DWORD STDCALL DdCreateSurfaceEx( 
-HANDLE hDirectDraw,
-HANDLE hSurface,
-DWORD dwSurfaceHandle
-);
-DWORD STDCALL DdSetOverlayPosition( 
-HANDLE hSurfaceSource,
-HANDLE hSurfaceDestination,
-PDD_SETOVERLAYPOSITIONDATA puSetOverlayPositionData
-);
-VOID STDCALL DdDdUnattachSurface( /*rename it so it doesnt conflict */
-HANDLE hSurface,
-HANDLE hSurfaceAttached
-);
-DWORD STDCALL DdUnlock( 
-HANDLE hSurface,
-PDD_UNLOCKDATA puUnlockData
-);
-DWORD STDCALL DdUnlockD3D( 
-HANDLE hSurface,
-PDD_UNLOCKDATA puUnlockData
-);
-DWORD STDCALL DdUpdateOverlay( 
-HANDLE hSurfaceDestination,
-HANDLE hSurfaceSource,
-PDD_UPDATEOVERLAYDATA puUpdateOverlayData
-);
-DWORD STDCALL DdWaitForVerticalBlank( 
-HANDLE hDirectDraw,
-PDD_WAITFORVERTICALBLANKDATA puWaitForVerticalBlankData
-);
index 4eec4a7..9d3fc35 100644 (file)
@@ -528,86 +528,6 @@ typedef struct _D3DHAL_VALIDATETEXTURESTAGESTATEDATA
     HRESULT         ddrval;
 } D3DHAL_VALIDATETEXTURESTAGESTATEDATA;
 
-/* FIXME: get definition for this */
-typedef DWORD D3DNTHAL_CONTEXTCREATEI;
-
-typedef D3DHAL_CONTEXTDESTROYDATA D3DNTHAL_CONTEXTDESTROYDATA;
-typedef D3DNTHAL_CONTEXTDESTROYDATA *LPD3DNTHAL_CONTEXTDESTROYDATA;
-typedef D3DHAL_VALIDATETEXTURESTAGESTATEDATA D3DNTHAL_VALIDATETEXTURESTAGESTATEDATA;
-typedef D3DNTHAL_VALIDATETEXTURESTAGESTATEDATA *LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA;
-typedef D3DHAL_DRAWPRIMITIVES2DATA D3DNTHAL_DRAWPRIMITIVES2DATA;
-typedef D3DNTHAL_DRAWPRIMITIVES2DATA *LPD3DNTHAL_DRAWPRIMITIVES2DATA;
-typedef DDHAL_GETDRIVERSTATEDATA DD_GETDRIVERSTATEDATA;
-typedef DD_GETDRIVERSTATEDATA *PDD_GETDRIVERSTATEDATA;
-typedef DDHAL_ADDATTACHEDSURFACEDATA DD_ADDATTACHEDSURFACEDATA;
-typedef DD_ADDATTACHEDSURFACEDATA *PDD_ADDATTACHEDSURFACEDATA;
-typedef DDHAL_BLTDATA DD_BLTDATA;
-typedef DD_BLTDATA *PDD_BLTDATA;
-typedef DDHAL_BEGINMOCOMPFRAMEDATA DD_BEGINMOCOMPFRAMEDATA;
-typedef DD_BEGINMOCOMPFRAMEDATA *PDD_BEGINMOCOMPFRAMEDATA;
-typedef DDHAL_CANCREATESURFACEDATA DD_CANCREATESURFACEDATA;
-typedef DD_CANCREATESURFACEDATA *PDD_CANCREATESURFACEDATA;
-typedef DDHAL_COLORCONTROLDATA DD_COLORCONTROLDATA;
-typedef DD_COLORCONTROLDATA *PDD_COLORCONTROLDATA;
-typedef DDRAWI_DDRAWSURFACE_GBL DD_SURFACE_GLOBAL;
-typedef DD_SURFACE_GLOBAL *PDD_SURFACE_GLOBAL;
-typedef DDHAL_CREATEMOCOMPDATA DD_CREATEMOCOMPDATA;
-typedef DD_CREATEMOCOMPDATA *PDD_CREATEMOCOMPDATA;
-typedef DDRAWI_DDRAWSURFACE_LCL DD_SURFACE_LOCAL;
-typedef DD_SURFACE_LOCAL *PDD_SURFACE_LOCAL;
-typedef DDRAWI_DDRAWSURFACE_MORE DD_SURFACE_MORE;
-typedef DD_SURFACE_MORE *PDD_SURFACE_MORE;
-typedef DDHAL_DESTROYMOCOMPDATA DD_DESTROYMOCOMPDATA;
-typedef DD_DESTROYMOCOMPDATA *PDD_DESTROYMOCOMPDATA;
-typedef DDHAL_ENDMOCOMPFRAMEDATA DD_ENDMOCOMPFRAMEDATA;
-typedef DD_ENDMOCOMPFRAMEDATA *PDD_ENDMOCOMPFRAMEDATA;
-typedef DDHAL_FLIPDATA DD_FLIPDATA;
-typedef DD_FLIPDATA *PDD_FLIPDATA;
-typedef DDHAL_FLIPTOGDISURFACEDATA DD_FLIPTOGDISURFACEDATA;
-typedef DD_FLIPTOGDISURFACEDATA *PDD_FLIPTOGDISURFACEDATA;
-typedef DDHAL_GETAVAILDRIVERMEMORYDATA DD_GETAVAILDRIVERMEMORYDATA;
-typedef DD_GETAVAILDRIVERMEMORYDATA *PDD_GETAVAILDRIVERMEMORYDATA;
-typedef DDHAL_GETBLTSTATUSDATA DD_GETBLTSTATUSDATA;
-typedef DD_GETBLTSTATUSDATA *PDD_GETBLTSTATUSDATA;
-typedef DDHAL_GETDRIVERINFODATA DD_GETDRIVERINFODATA;
-typedef DD_GETDRIVERINFODATA *PDD_GETDRIVERINFODATA;
-typedef DDHAL_GETFLIPSTATUSDATA DD_GETFLIPSTATUSDATA;
-typedef DD_GETFLIPSTATUSDATA *PDD_GETFLIPSTATUSDATA;
-typedef DDHAL_GETINTERNALMOCOMPDATA DD_GETINTERNALMOCOMPDATA;
-typedef DD_GETINTERNALMOCOMPDATA *PDD_GETINTERNALMOCOMPDATA;
-typedef DDHAL_GETMOCOMPCOMPBUFFDATA DD_GETMOCOMPCOMPBUFFDATA;
-typedef DD_GETMOCOMPCOMPBUFFDATA *PDD_GETMOCOMPCOMPBUFFDATA;
-typedef DDHAL_GETMOCOMPGUIDSDATA DD_GETMOCOMPGUIDSDATA;
-typedef DD_GETMOCOMPGUIDSDATA *PDD_GETMOCOMPGUIDSDATA;
-typedef DDHAL_GETMOCOMPFORMATSDATA DD_GETMOCOMPFORMATSDATA;
-typedef DD_GETMOCOMPFORMATSDATA *PDD_GETMOCOMPFORMATSDATA;
-typedef DDHAL_GETSCANLINEDATA DD_GETSCANLINEDATA;
-typedef DD_GETSCANLINEDATA *PDD_GETSCANLINEDATA;
-typedef DDHAL_LOCKDATA DD_LOCKDATA;
-typedef DD_LOCKDATA *PDD_LOCKDATA;
-typedef DDHALINFO DD_HALINFO;
-typedef DDHAL_QUERYMOCOMPSTATUSDATA DD_QUERYMOCOMPSTATUSDATA;
-typedef DD_QUERYMOCOMPSTATUSDATA *PDD_QUERYMOCOMPSTATUSDATA;
-typedef DDHAL_RENDERMOCOMPDATA DD_RENDERMOCOMPDATA;
-typedef DD_RENDERMOCOMPDATA *PDD_RENDERMOCOMPDATA;
-typedef DDHAL_SETCOLORKEYDATA DD_SETCOLORKEYDATA;
-typedef DD_SETCOLORKEYDATA *PDD_SETCOLORKEYDATA;
-typedef DDHAL_SETEXCLUSIVEMODEDATA DD_SETEXCLUSIVEMODEDATA;
-typedef DD_SETEXCLUSIVEMODEDATA *PDD_SETEXCLUSIVEMODEDATA;
-typedef DDHAL_SETOVERLAYPOSITIONDATA DD_SETOVERLAYPOSITIONDATA;
-typedef DD_SETOVERLAYPOSITIONDATA *PDD_SETOVERLAYPOSITIONDATA;
-typedef DDHAL_UNLOCKDATA DD_UNLOCKDATA;
-typedef DD_UNLOCKDATA *PDD_UNLOCKDATA;
-typedef DDHAL_CREATESURFACEDATA DD_CREATESURFACEDATA;
-typedef DD_CREATESURFACEDATA *LPDD_CREATESURFACEDATA;
-typedef DDHAL_UPDATEOVERLAYDATA DD_UPDATEOVERLAYDATA;
-typedef DD_UPDATEOVERLAYDATA *PDD_UPDATEOVERLAYDATA;
-typedef DDHAL_WAITFORVERTICALBLANKDATA DD_WAITFORVERTICALBLANKDATA;
-typedef DD_WAITFORVERTICALBLANKDATA *PDD_WAITFORVERTICALBLANKDATA;
-typedef D3DHAL_CALLBACKS D3DNTHAL_CALLBACKS;
-typedef D3DNTHAL_CALLBACKS *LPD3DNTHAL_CALLBACKS;
-typedef D3DHAL_GLOBALDRIVERDATA D3DNTHAL_GLOBALDRIVERDATA;
-typedef D3DNTHAL_GLOBALDRIVERDATA *LPD3DNTHAL_GLOBALDRIVERDATA;
 #ifdef __cplusplus
 } /* extern "C" */
 #endif
diff --git a/reactos/include/ddk/d3dnthal.h b/reactos/include/ddk/d3dnthal.h
new file mode 100644 (file)
index 0000000..333da25
--- /dev/null
@@ -0,0 +1,72 @@
+/* 
+ * Direct3D NT driver interface
+ */
+
+#ifndef __DDK_D3DNTHAL_H
+#define __DDK_D3DNTHAL_H
+
+#include <ddk/ddrawint.h>
+#include <d3dtypes.h>
+#include <d3dcaps.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+DEFINE_GUID(GUID_D3DCallbacks,                   0x7BF06990, 0x8794, 0x11D0, 0x91, 0x39, 0x08, 0x00, 0x36, 0xD2, 0xEF, 0x02);
+DEFINE_GUID(GUID_D3DCallbacks3,                  0xDDF41230, 0xEC0A, 0x11D0, 0xA9, 0xB6, 0x00, 0xAA, 0x00, 0xC0, 0x99, 0x3E);
+DEFINE_GUID(GUID_D3DExtendedCaps,                0x7DE41F80, 0x9D93, 0x11D0, 0x89, 0xAB, 0x00, 0xA0, 0xC9, 0x05, 0x41, 0x29);
+DEFINE_GUID(GUID_D3DParseUnknownCommandCallback, 0x2E04FFA0, 0x98E4, 0x11D1, 0x8C, 0xE1, 0x00, 0xA0, 0xC9, 0x06, 0x29, 0xA8);
+DEFINE_GUID(GUID_ZPixelFormats,                  0x93869880, 0x36CF, 0x11D1, 0x9B, 0x1B, 0x00, 0xAA, 0x00, 0xBB, 0xB8, 0xAE);
+DEFINE_GUID(GUID_DDStereoMode,                   0xF828169C, 0xA8E8, 0x11D2, 0xA1, 0xF2, 0x00, 0xA0, 0xC9, 0x83, 0xEA, 0xF6);
+
+typedef struct _D3DNTHAL_CONTEXTCREATEDATA *PD3DNTHAL_CONTEXTCREATEDATA;
+typedef struct _D3DNTHAL_CONTEXTDESTROYDATA *PD3DNTHAL_CONTEXTDESTROYDATA;
+typedef struct _D3DNTHAL_DRAWPRIMITIVES2DATA *PD3DNTHAL_DRAWPRIMITIVES2DATA;
+typedef struct _D3DNTHAL_VALIDATETEXTURESTAGESTATEDATA *PD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA;
+
+/* DIRECT3D object callbacks */
+typedef DWORD (STDCALL *PD3DNTHAL_CONTEXTCREATECB)(PD3DNTHAL_CONTEXTCREATEDATA);
+typedef DWORD (STDCALL *PD3DNTHAL_CONTEXTDESTROYCB)(PD3DNTHAL_CONTEXTDESTROYDATA);
+
+typedef struct _D3DNTHAL_CALLBACKS {
+       DWORD                      dwSize;
+       PD3DNTHAL_CONTEXTCREATECB  ContextCreate;
+       PD3DNTHAL_CONTEXTDESTROYCB ContextDestroy;
+       PVOID                      Reserved[32];
+} D3DNTHAL_CALLBACKS;
+typedef D3DNTHAL_CALLBACKS *PD3DNTHAL_CALLBACKS;
+
+/* Structures to report driver capabilities */
+
+typedef struct _D3DNTHAL_DEVICEDESC {
+       DWORD            dwSize;
+       DWORD            dwFlags;
+       D3DCOLORMODEL    dcmColorModel;
+       DWORD            dwDevCaps;
+       D3DTRANSFORMCAPS dtcTransformCaps;
+       BOOL             bClipping;
+       D3DLIGHTINGCAPS  dlcLightingCaps;
+       D3DPRIMCAPS      dpcLineCaps;
+       D3DPRIMCAPS      dpcTriCaps;
+       DWORD            dwDeviceRenderBitDepth;
+       DWORD            dwDeviceZBufferBitDepth;
+       DWORD            dwMaxBufferSize;
+       DWORD            dwMaxVertexCount;
+} D3DNTHAL_DEVICEDESC, *PD3DNT_HALDEVICEDESC;
+
+typedef struct _D3DNTHAL_GLOBALDRIVERDATA {
+       DWORD               dwSize;
+       D3DNTHAL_DEVICEDESC hwCaps;
+       DWORD               dwNumVertices;
+       DWORD               dwNumClipVertices;
+       DWORD               dwNumTextureFormats;
+       LPDDSURFACEDESC     lpTextureFormats;
+} D3DNTHAL_GLOBALDRIVERDATA, *PD3DNTHAL_GLOBALDRIVERDATA;
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __DDK_D3DNTHAL_H */
index 8d617a1..841c157 100644 (file)
@@ -28,9 +28,11 @@ extern "C" {
 
 #include <ddraw.h>
 
+#ifndef __DDK_DDRAWINT_H
 typedef struct _DDVIDEOPORTCAPS *LPDDVIDEOPORTCAPS; /* should be in dvp.h */
 typedef struct _DDKERNELCAPS *LPDDKERNELCAPS; /* should be in ddkernel.h */
 typedef struct _VMEMHEAP *LPVMEMHEAP; /* should be in dmemmgr.h */
+#endif
 
 #define DDAPI WINAPI
 
@@ -66,8 +68,10 @@ typedef struct {
 
 typedef DWORD (PASCAL *LPDD32BITDRIVERINIT)(DWORD dwContext);
 
+#ifndef __DDK_DDRAWINT_H
 /* pointer to video memory */
 typedef ULONG_PTR FLATPTR;
+#endif
 
 /* predeclare some structures */
 typedef struct _DDHALINFO *LPDDHALINFO;
@@ -145,12 +149,14 @@ typedef struct _VIDMEM {
     } DUMMYUNIONNAME2;
 } VIDMEM,*LPVIDMEM;
 
+#ifndef __DDK_DDRAWINT_H
 #define VIDMEM_ISLINEAR                0x00000001
 #define VIDMEM_ISRECTANGULAR   0x00000002
 #define VIDMEM_ISHEAP          0x00000004
 #define VIDMEM_ISNONLOCAL      0x00000008
 #define VIDMEM_ISWC            0x00000010
 #define VIDMEM_ISDISABLED      0x00000020
+#endif
 
 typedef struct _VIDMEMINFO {
     FLATPTR            fpPrimary;
@@ -250,12 +256,6 @@ typedef struct _DDNONLOCALVIDMEMCAPS {
     DWORD      dwNLVBRops[DD_ROP_SPACE];
 } DDNONLOCALVIDMEMCAPS,*LPDDNONLOCALVIDMEMCAPS;
 
-typedef struct _DDSCAPSEX {
-    DWORD      dwCaps2;
-    DWORD      dwCaps3;
-    DWORD      dwCaps4;
-} DDSCAPSEX,*LPDDSCAPSEX;
-
 #define DDSCAPS_EXECUTEBUFFER  DDSCAPS_RESERVED2
 #define DDSCAPS2_VERTEXBUFFER  DDSCAPS2_RESERVED1
 #define DDSCAPS2_COMMANDBUFFER DDSCAPS2_RESERVED2
@@ -971,13 +971,21 @@ typedef struct _DDRAWI_DDRAWSURFACE_LCL {
 #define DDRAWISURF_HASCKEYDESTOVERLAY  0x00000100
 #define DDRAWISURF_HASCKEYDESTBLT      0x00000200
 #define DDRAWISURF_HASCKEYSRCOVERLAY   0x00000400
+#ifndef DDRAWISURF_HASCKEYSRCBLT
 #define DDRAWISURF_HASCKEYSRCBLT       0x00000800
+#endif
 #define DDRAWISURF_LOCKEXCLUDEDCURSOR  0x00001000
+#ifndef DDRAWISURF_HASPIXELFORMAT
 #define DDRAWISURF_HASPIXELFORMAT      0x00002000
+#endif
+#ifndef DDRAWISURF_HASOVERLAYDATA
 #define DDRAWISURF_HASOVERLAYDATA      0x00004000
+#endif
 #define DDRAWISURF_SETGAMMA            0x00008000
 /* more... */
+#ifndef DDRAWISURF_INVALID
 #define DDRAWISURF_INVALID             0x10000000
+#endif
 
 /* palettes */
 typedef struct _DDRAWI_DDRAWPALETTE_INT {
@@ -1314,17 +1322,6 @@ typedef struct _DDHAL_WAITFORVERTICALBLANKDATA
     LPDDHAL_WAITFORVERTICALBLANK    WaitForVerticalBlank; // PRIVATE: ptr to callback
 } DDHAL_WAITFORVERTICALBLANKDATA;
 
-typedef struct _DD_D3DBUFCALLBACKS
-{
-    DWORD dwSize;
-    DWORD dwFlags;
-    LPDDHAL_CANCREATESURFACE        CanCreateD3DBuffer;
-       LPDDHAL_CREATESURFACE           CreateD3DBuffer;
-    LPDDHALSURFCB_DESTROYSURFACE   DestroyD3DBuffer;
-       LPDDHALSURFCB_LOCK             LockD3DBuffer;
-    LPDDHALSURFCB_UNLOCK           UnlockD3DBuffer;
-} DD_D3DBUFCALLBACKS, *PDD_D3DBUFCALLBACKS;
-
 #ifdef __cplusplus
 } /* extern "C" */
 #endif
diff --git a/reactos/include/ddk/ddrawint.h b/reactos/include/ddk/ddrawint.h
new file mode 100644 (file)
index 0000000..abcd92e
--- /dev/null
@@ -0,0 +1,1236 @@
+/* 
+ * DirectDraw NT driver interface
+ */
+
+#ifndef __DDK_DDRAWINT_H
+#define __DDK_DDRAWINT_H
+
+#include <ddraw.h>
+#include <ole32/guiddef.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* pointer to video memory */
+typedef ULONG_PTR FLATPTR;
+
+// FIXME: These should have been defined in other header files!
+typedef struct _DDVIDEOPORTCAPS      *LPDDVIDEOPORTCAPS; /* should be in dvp.h */
+typedef struct _DDVIDEOPORTDESC      *LPDDVIDEOPORTDESC; /* should be in dvp.h */
+typedef struct _DDVIDEOPORTBANDWIDTH *LPDDVIDEOPORTBANDWIDTH; /* should be in dvp.h */
+typedef struct _DDVIDEOPORTCONNECT   *LPDDVIDEOPORTCONNECT; /* should be in dvp.h */
+typedef struct _DDVIDEOPORTINFO      *LPDDVIDEOPORTINFO; /* should be in dvp.h */
+typedef struct _DDKERNELCAPS         *LPDDKERNELCAPS; /* should be in ddkernel.h */
+typedef struct _VMEMHEAP             *LPVMEMHEAP; /* should be in dmemmgr.h */
+typedef struct _DD_VIDEOPORT_LOCAL   *PDD_VIDEOPORT_LOCAL; /* should be defined here once we have dvp.h */
+
+/************************************************************************/
+/* Video memory info structures                                         */
+/************************************************************************/
+
+typedef struct
+{
+       DWORD          dwFlags;
+       FLATPTR        fpStart;
+       union
+       {
+               FLATPTR    fpEnd;
+               DWORD      dwWidth;
+       };
+       DDSCAPS        ddsCaps;
+       DDSCAPS        ddsCapsAlt;
+       union
+       {
+               LPVMEMHEAP lpHeap;
+               DWORD      dwHeight;
+       };
+} VIDEOMEMORY, *PVIDEOMEMORY;
+
+#define VIDMEM_ISLINEAR      (1<<0)
+#define VIDMEM_ISRECTANGULAR (1<<1)
+#define VIDMEM_ISHEAP        (1<<2)
+#define VIDMEM_ISNONLOCAL    (1<<3)
+#define VIDMEM_ISWC          (1<<4)
+#define VIDMEM_ISDISABLED    (1<<5)
+
+typedef struct
+{
+       FLATPTR       fpPrimary;
+       DWORD         dwFlags;
+       DWORD         dwDisplayWidth;
+       DWORD         dwDisplayHeight;
+       LONG          lDisplayPitch;
+       DDPIXELFORMAT ddpfDisplay;
+       DWORD         dwOffscreenAlign;
+       DWORD         dwOverlayAlign;
+       DWORD         dwTextureAlign;
+       DWORD         dwZBufferAlign;
+       DWORD         dwAlphaAlign;
+       PVOID         pvPrimary;
+} VIDEOMEMORYINFO;
+typedef VIDEOMEMORYINFO *LPVIDEOMEMORYINFO;
+
+/************************************************************************/
+/* DDI representation of the DirectDraw object                          */
+/************************************************************************/
+
+typedef struct
+{
+       PVOID             dhpdev;
+       ULONG_PTR         dwReserved1;
+       ULONG_PTR         dwReserved2;
+       LPDDVIDEOPORTCAPS lpDDVideoPortCaps;
+} DD_DIRECTDRAW_GLOBAL, *PDD_DIRECTDRAW_GLOBAL;
+
+typedef struct
+{
+       PDD_DIRECTDRAW_GLOBAL lpGbl;
+} DD_DIRECTDRAW_LOCAL, *PDD_DIRECTDRAW_LOCAL;
+
+/************************************************************************/
+/* DDI representation of the DirectDrawSurface object                   */
+/************************************************************************/
+
+typedef struct
+{
+       union 
+       {
+               DWORD        dwBlockSizeY;
+               LONG         lSlicePitch;
+       };
+
+       union 
+       {
+               PVIDEOMEMORY lpVidMemHeap;
+               DWORD        dwBlockSizeX;
+               DWORD        dwUserMemSize;
+       };
+
+       FLATPTR          fpVidMem;
+       union
+       {
+               LONG         lPitch;
+               DWORD        dwLinearSize;
+       };
+       LONG             yHint;
+       LONG             xHint;
+       DWORD            wHeight;
+       DWORD            wWidth;
+       ULONG_PTR        dwReserved1;
+       DDPIXELFORMAT    ddpfSurface;
+       FLATPTR          fpHeapOffset;
+       HANDLE           hCreatorProcess;
+} DD_SURFACE_GLOBAL, *PDD_SURFACE_GLOBAL;
+
+typedef struct
+{
+       DWORD               dwMipMapCount;
+       PDD_VIDEOPORT_LOCAL lpVideoPort;
+       DWORD               dwOverlayFlags;
+       DDSCAPSEX           ddsCapsEx;
+       DWORD               dwSurfaceHandle;
+} DD_SURFACE_MORE, *PDD_SURFACE_MORE;
+
+typedef struct _DD_ATTACHLIST *PDD_ATTACHLIST;
+
+typedef struct
+{
+       PDD_SURFACE_GLOBAL lpGbl;
+       DWORD              dwFlags;
+       DDSCAPS            ddsCaps;
+       ULONG_PTR          dwReserved1;
+       union
+       {
+               DDCOLORKEY     ddckCKSrcOverlay;
+               DDCOLORKEY     ddckCKSrcBlt;
+       };
+       union
+       {
+               DDCOLORKEY     ddckCKDestOverlay;
+               DDCOLORKEY     ddckCKDestBlt;
+       };
+       PDD_SURFACE_MORE   lpSurfMore;
+       PDD_ATTACHLIST     lpAttachList;
+       PDD_ATTACHLIST     lpAttachListFrom;
+       RECT               rcOverlaySrc;
+} DD_SURFACE_LOCAL, *PDD_SURFACE_LOCAL;
+
+#define DDRAWISURF_HASCKEYSRCBLT  0x00000800L
+#define DDRAWISURF_HASPIXELFORMAT 0x00002000L
+#define DDRAWISURF_HASOVERLAYDATA 0x00004000L
+#define DDRAWISURF_FRONTBUFFER    0x04000000L
+#define DDRAWISURF_BACKBUFFER     0x08000000L
+#define DDRAWISURF_INVALID        0x10000000L
+#define DDRAWISURF_DRIVERMANAGED  0x40000000L
+
+typedef struct _DD_ATTACHLIST
+{
+       PDD_ATTACHLIST     lpLink;
+       PDD_SURFACE_LOCAL  lpAttached;
+} DD_ATTACHLIST;
+
+typedef struct
+{
+       PDD_SURFACE_LOCAL lpLcl;
+} DD_SURFACE_INT, *PDD_SURFACE_INT;
+
+/************************************************************************/
+/* DDI representation of the DirectDrawPalette object                   */
+/************************************************************************/
+
+typedef struct
+{
+    ULONG_PTR Reserved1;
+} DD_PALETTE_GLOBAL, *PDD_PALETTE_GLOBAL;
+
+/************************************************************************/
+/* DDI representation of the DirectDrawVideo object                     */
+/************************************************************************/
+
+typedef struct
+{
+       PDD_DIRECTDRAW_LOCAL lpDD;
+       GUID                 guid;
+       DWORD                dwUncompWidth;
+       DWORD                dwUncompHeight;
+       DDPIXELFORMAT        ddUncompPixelFormat;
+       DWORD                dwDriverReserved1;
+       DWORD                dwDriverReserved2;
+       DWORD                dwDriverReserved3;
+       LPVOID               lpDriverReserved1;
+       LPVOID               lpDriverReserved2;
+       LPVOID               lpDriverReserved3;
+} DD_MOTIONCOMP_LOCAL, *PDD_MOTIONCOMP_LOCAL;
+
+/************************************************************************/
+/* IDirectDrawSurface callbacks                                         */
+/************************************************************************/
+
+typedef struct
+{
+       PDD_DIRECTDRAW_GLOBAL         lpDD;
+       PDD_SURFACE_LOCAL             lpDDSurface;
+       DWORD                         bHasRect;
+       RECTL                         rArea;
+       LPVOID                        lpSurfData;
+       HRESULT                       ddRVal;
+       PVOID                         Lock;
+       DWORD                         dwFlags;
+       FLATPTR                       fpProcess;
+} DD_LOCKDATA, *PDD_LOCKDATA;
+typedef DWORD (STDCALL *PDD_SURFCB_LOCK)(PDD_LOCKDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_GLOBAL         lpDD;
+       PDD_SURFACE_LOCAL             lpDDSurface;
+       HRESULT                       ddRVal;
+       PVOID                         Unlock;
+} DD_UNLOCKDATA, *PDD_UNLOCKDATA;
+typedef DWORD (STDCALL *PDD_SURFCB_UNLOCK)(PDD_UNLOCKDATA);
+
+#define DDABLT_SRCOVERDEST        0x00000001
+#define DDBLT_AFLAGS              0x80000000
+
+typedef struct
+{
+       BYTE blue, green, red, alpha;
+} DDARGB, *PDDARGB;
+
+typedef struct
+{
+       PDD_DIRECTDRAW_GLOBAL         lpDD;
+       PDD_SURFACE_LOCAL             lpDDDestSurface;
+       RECTL                         rDest;
+       PDD_SURFACE_LOCAL             lpDDSrcSurface;
+       RECTL                         rSrc;
+       DWORD                         dwFlags;
+       DWORD                         dwROPFlags;
+       DDBLTFX                       bltFX;
+       HRESULT                       ddRVal;
+       PVOID                         Blt;
+       BOOL                          IsClipped;
+       RECTL                         rOrigDest;
+       RECTL                         rOrigSrc;
+       DWORD                         dwRectCnt;
+       LPRECT                        prDestRects;
+       DWORD                         dwAFlags;
+       DDARGB                        ddargbScaleFactors;
+} DD_BLTDATA, *PDD_BLTDATA;
+typedef DWORD (STDCALL *PDD_SURFCB_BLT)(PDD_BLTDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_GLOBAL         lpDD;
+       PDD_SURFACE_LOCAL             lpDDDestSurface;
+       RECTL                         rDest;
+       PDD_SURFACE_LOCAL             lpDDSrcSurface;
+       RECTL                         rSrc;
+       DWORD                         dwFlags;
+       DDOVERLAYFX                   overlayFX;
+       HRESULT                       ddRVal;
+       PVOID                         UpdateOverlay;
+} DD_UPDATEOVERLAYDATA, *PDD_UPDATEOVERLAYDATA;
+typedef DWORD (STDCALL *PDD_SURFCB_UPDATEOVERLAY)(PDD_UPDATEOVERLAYDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_GLOBAL         lpDD;
+       PDD_SURFACE_LOCAL             lpDDSrcSurface;
+       PDD_SURFACE_LOCAL             lpDDDestSurface;
+       LONG                          lXPos;
+       LONG                          lYPos;
+       HRESULT                       ddRVal;
+       PVOID                         SetOverlayPosition;
+} DD_SETOVERLAYPOSITIONDATA, *PDD_SETOVERLAYPOSITIONDATA;
+typedef DWORD (STDCALL *PDD_SURFCB_SETOVERLAYPOSITION)(PDD_SETOVERLAYPOSITIONDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_GLOBAL         lpDD;
+       PDD_SURFACE_LOCAL             lpDDSurface;
+       PDD_PALETTE_GLOBAL            lpDDPalette;
+       HRESULT                       ddRVal;
+       PVOID                         SetPalette;
+       BOOL                          Attach;
+} DD_SETPALETTEDATA, *PDD_SETPALETTEDATA;
+typedef DWORD (STDCALL *PDD_SURFCB_SETPALETTE)(PDD_SETPALETTEDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_GLOBAL         lpDD;
+       PDD_SURFACE_LOCAL             lpSurfCurr;
+       PDD_SURFACE_LOCAL             lpSurfTarg;
+       DWORD                         dwFlags;
+       HRESULT                       ddRVal;
+       PVOID                         Flip;
+       PDD_SURFACE_LOCAL             lpSurfCurrLeft;
+       PDD_SURFACE_LOCAL             lpSurfTargLeft;
+} DD_FLIPDATA, *PDD_FLIPDATA;
+typedef DWORD (STDCALL *PDD_SURFCB_FLIP)(PDD_FLIPDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_GLOBAL         lpDD;
+       PDD_SURFACE_LOCAL             lpDDSurface;
+       HRESULT                       ddRVal;
+       PVOID                         DestroySurface;
+} DD_DESTROYSURFACEDATA, *PDD_DESTROYSURFACEDATA;
+typedef DWORD (STDCALL *PDD_SURFCB_DESTROYSURFACE)(PDD_DESTROYSURFACEDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_GLOBAL         lpDD;
+       PDD_SURFACE_LOCAL             lpDDSurface;
+       HRESULT                       ddRVal;
+       PVOID                         SetClipList;
+} DD_SETCLIPLISTDATA, *PDD_SETCLIPLISTDATA;
+typedef DWORD (STDCALL *PDD_SURFCB_SETCLIPLIST)(PDD_SETCLIPLISTDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_GLOBAL         lpDD;
+       PDD_SURFACE_LOCAL             lpDDSurface;
+       PDD_SURFACE_LOCAL             lpSurfAttached;
+       HRESULT                       ddRVal;
+       PVOID                         AddAttachedSurface;
+} DD_ADDATTACHEDSURFACEDATA, *PDD_ADDATTACHEDSURFACEDATA;
+typedef DWORD (STDCALL *PDD_SURFCB_ADDATTACHEDSURFACE)(PDD_ADDATTACHEDSURFACEDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_GLOBAL         lpDD;
+       PDD_SURFACE_LOCAL             lpDDSurface;
+       DWORD                         dwFlags;
+       DDCOLORKEY                    ckNew;
+       HRESULT                       ddRVal;
+       PVOID                         SetColorKey;
+} DD_SETCOLORKEYDATA, *PDD_SETCOLORKEYDATA;
+typedef DWORD (STDCALL *PDD_SURFCB_SETCOLORKEY)(PDD_SETCOLORKEYDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_GLOBAL         lpDD;
+       PDD_SURFACE_LOCAL             lpDDSurface;
+       DWORD                         dwFlags;
+       HRESULT                       ddRVal;
+       PVOID                         GetBltStatus;
+} DD_GETBLTSTATUSDATA, *PDD_GETBLTSTATUSDATA;
+typedef DWORD (STDCALL *PDD_SURFCB_GETBLTSTATUS)(PDD_GETBLTSTATUSDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_GLOBAL         lpDD;
+       PDD_SURFACE_LOCAL             lpDDSurface;
+       DWORD                         dwFlags;
+       HRESULT                       ddRVal;
+       PVOID                         GetFlipStatus;
+} DD_GETFLIPSTATUSDATA, *PDD_GETFLIPSTATUSDATA;
+typedef DWORD (STDCALL *PDD_SURFCB_GETFLIPSTATUS)(PDD_GETFLIPSTATUSDATA);
+
+typedef struct
+{
+       DWORD                         dwSize;
+       DWORD                         dwFlags;
+       PDD_SURFCB_DESTROYSURFACE     DestroySurface;
+       PDD_SURFCB_FLIP               Flip;
+       PDD_SURFCB_SETCLIPLIST        SetClipList;
+       PDD_SURFCB_LOCK               Lock;
+       PDD_SURFCB_UNLOCK             Unlock;
+       PDD_SURFCB_BLT                Blt;
+       PDD_SURFCB_SETCOLORKEY        SetColorKey;
+       PDD_SURFCB_ADDATTACHEDSURFACE AddAttachedSurface;
+       PDD_SURFCB_GETBLTSTATUS       GetBltStatus;
+       PDD_SURFCB_GETFLIPSTATUS      GetFlipStatus;
+       PDD_SURFCB_UPDATEOVERLAY      UpdateOverlay;
+       PDD_SURFCB_SETOVERLAYPOSITION SetOverlayPosition;
+       PVOID                         Reserved;
+       PDD_SURFCB_SETPALETTE         SetPalette;
+} DD_SURFACECALLBACKS, *PDD_SURFACECALLBACKS;
+
+enum
+{
+       DDHAL_SURFCB32_DESTROYSURFACE     = 1<<0,
+       DDHAL_SURFCB32_FLIP               = 1<<1,
+       DDHAL_SURFCB32_SETCLIPLIST        = 1<<2,
+       DDHAL_SURFCB32_LOCK               = 1<<3,
+       DDHAL_SURFCB32_UNLOCK             = 1<<4,
+       DDHAL_SURFCB32_BLT                = 1<<5,
+       DDHAL_SURFCB32_SETCOLORKEY        = 1<<6,
+       DDHAL_SURFCB32_ADDATTACHEDSURFACE = 1<<7,
+       DDHAL_SURFCB32_GETBLTSTATUS       = 1<<8,
+       DDHAL_SURFCB32_GETFLIPSTATUS      = 1<<9,
+       DDHAL_SURFCB32_UPDATEOVERLAY      = 1<<10,
+       DDHAL_SURFCB32_SETOVERLAYPOSITION = 1<<11,
+       DDHAL_SURFCB32_SETPALETTE         = 1<<13,
+};
+
+/************************************************************************/
+/* IDirectDraw callbacks                                                */
+/************************************************************************/
+
+typedef struct
+{
+       PDD_DIRECTDRAW_GLOBAL    lpDD;
+       DDSURFACEDESC           *lpDDSurfaceDesc;
+       PDD_SURFACE_LOCAL       *lplpSList;
+       DWORD                    dwSCnt;
+       HRESULT                  ddRVal;
+       PVOID                    CreateSurface;
+} DD_CREATESURFACEDATA, *PDD_CREATESURFACEDATA;
+typedef DWORD (STDCALL *PDD_CREATESURFACE)(PDD_CREATESURFACEDATA);
+
+typedef struct
+{
+       PDD_SURFACE_LOCAL        lpDDSurface;
+       DWORD                    dwFlags;
+       DDCOLORKEY               ckNew;
+       HRESULT                  ddRVal;
+       PVOID                    SetColorKey;
+} DD_DRVSETCOLORKEYDATA, *PDD_DRVSETCOLORKEYDATA;
+typedef DWORD (STDCALL *PDD_SETCOLORKEY)(PDD_DRVSETCOLORKEYDATA);
+
+#define DDWAITVB_I_TESTVB    0x80000006
+
+typedef struct
+{
+       PDD_DIRECTDRAW_GLOBAL    lpDD;
+       DWORD                    dwFlags;
+       DWORD                    bIsInVB;
+       DWORD                    hEvent;
+       HRESULT                  ddRVal;
+       PVOID                    WaitForVerticalBlank;
+} DD_WAITFORVERTICALBLANKDATA, *PDD_WAITFORVERTICALBLANKDATA;
+typedef DWORD (STDCALL *PDD_WAITFORVERTICALBLANK)(PDD_WAITFORVERTICALBLANKDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_GLOBAL    lpDD;
+       DDSURFACEDESC           *lpDDSurfaceDesc;
+       DWORD                    bIsDifferentPixelFormat;
+       HRESULT                  ddRVal;
+       PVOID                    CanCreateSurface;
+} DD_CANCREATESURFACEDATA, *PDD_CANCREATESURFACEDATA;
+typedef DWORD (STDCALL *PDD_CANCREATESURFACE)(PDD_CANCREATESURFACEDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_GLOBAL    lpDD;
+       PDD_PALETTE_GLOBAL       lpDDPalette;
+       LPPALETTEENTRY           lpColorTable;
+       HRESULT                  ddRVal;
+       PVOID                    CreatePalette;
+       BOOL                     is_excl;
+} DD_CREATEPALETTEDATA, *PDD_CREATEPALETTEDATA;
+typedef DWORD (STDCALL *PDD_CREATEPALETTE)(PDD_CREATEPALETTEDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_GLOBAL    lpDD;
+       DWORD                    dwScanLine;
+       HRESULT                  ddRVal;
+       PVOID                    GetScanLine;
+} DD_GETSCANLINEDATA, *PDD_GETSCANLINEDATA;
+typedef DWORD (STDCALL *PDD_GETSCANLINE)(PDD_GETSCANLINEDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_GLOBAL    lpDD;
+       BOOL                     bMap;
+       HANDLE                   hProcess;
+       FLATPTR                  fpProcess;
+       HRESULT                  ddRVal;
+} DD_MAPMEMORYDATA, *PDD_MAPMEMORYDATA;
+typedef DWORD (STDCALL *PDD_MAPMEMORY)(PDD_MAPMEMORYDATA);
+
+typedef struct
+{
+       DWORD                    dwSize;
+       DWORD                    dwFlags;
+       PVOID                    Reserved1;
+       PDD_CREATESURFACE        CreateSurface;
+       PDD_SETCOLORKEY          SetColorKey;
+       PVOID                    Reserved2;
+       PDD_WAITFORVERTICALBLANK WaitForVerticalBlank;
+       PDD_CANCREATESURFACE     CanCreateSurface;
+       PDD_CREATEPALETTE        CreatePalette;
+       PDD_GETSCANLINE          GetScanLine;
+       PDD_MAPMEMORY            MapMemory;
+} DD_CALLBACKS, *PDD_CALLBACKS;
+
+enum
+{
+       DDHAL_CB32_CREATESURFACE        = 1<<1,
+       DDHAL_CB32_SETCOLORKEY          = 1<<2,
+       DDHAL_CB32_WAITFORVERTICALBLANK = 1<<4,
+       DDHAL_CB32_CANCREATESURFACE     = 1<<5,
+       DDHAL_CB32_CREATEPALETTE        = 1<<6,
+       DDHAL_CB32_GETSCANLINE          = 1<<7,
+       DDHAL_CB32_MAPMEMORY            = 1<<31,
+};
+
+typedef struct
+{
+       PDD_DIRECTDRAW_GLOBAL    lpDD;
+       DDSCAPS                  DDSCaps;
+       DWORD                    dwTotal;
+       DWORD                    dwFree;
+       HRESULT                  ddRVal;
+       PVOID                    GetAvailDriverMemory;
+} DD_GETAVAILDRIVERMEMORYDATA, *PDD_GETAVAILDRIVERMEMORYDATA;
+typedef DWORD (STDCALL *PDD_GETAVAILDRIVERMEMORY)(PDD_GETAVAILDRIVERMEMORYDATA);
+
+DEFINE_GUID(GUID_MiscellaneousCallbacks, 0xEFD60CC0, 0x49E7, 0x11D0, 0x88, 0x9D, 0x00, 0xAA, 0x00, 0xBB, 0xB7, 0x6A);
+
+typedef struct
+{
+       DWORD                    dwSize;
+       DWORD                    dwFlags;
+       PDD_GETAVAILDRIVERMEMORY GetAvailDriverMemory;
+} DD_MISCELLANEOUSCALLBACKS, *PDD_MISCELLANEOUSCALLBACKS;
+
+enum
+{
+       DDHAL_MISCCB32_GETAVAILDRIVERMEMORY = 1<<0,
+};
+
+typedef DWORD (STDCALL *PDD_ALPHABLT)(PDD_BLTDATA);
+
+typedef struct
+{
+       DWORD                     dwFlags;
+       PDD_DIRECTDRAW_LOCAL      lpDDLcl;
+       PDD_SURFACE_LOCAL         lpDDSLcl;
+       HRESULT                   ddRVal;
+} DD_CREATESURFACEEXDATA, *PDD_CREATESURFACEEXDATA;
+typedef DWORD (STDCALL *PDD_CREATESURFACEEX)(PDD_CREATESURFACEEXDATA);
+
+typedef struct
+{
+       DWORD                     dwFlags;
+       union
+       {
+               PDD_DIRECTDRAW_GLOBAL lpDD;
+               DWORD_PTR             dwhContext;
+       };
+       LPDWORD                   lpdwStates;
+       DWORD                     dwLength;
+       HRESULT                   ddRVal;
+} DD_GETDRIVERSTATEDATA, *PDD_GETDRIVERSTATEDATA;
+typedef DWORD (STDCALL *PDD_GETDRIVERSTATE)(PDD_GETDRIVERSTATEDATA);
+
+typedef struct
+{
+       DWORD                     dwFlags;
+       PDD_DIRECTDRAW_LOCAL      pDDLcl;
+       HRESULT                   ddRVal;
+} DD_DESTROYDDLOCALDATA, *PDD_DESTROYDDLOCALDATA;
+typedef DWORD (STDCALL *PDD_DESTROYDDLOCAL)(PDD_DESTROYDDLOCALDATA);
+
+DEFINE_GUID(GUID_Miscellaneous2Callbacks, 0x406B2F00, 0x3E5A, 0x11D1, 0xB6, 0x40, 0x00, 0xAA, 0x00, 0xA1, 0xF9, 0x6A);
+
+typedef struct
+{
+       DWORD                     dwSize;
+       DWORD                     dwFlags;
+       PDD_ALPHABLT              AlphaBlt;
+       PDD_CREATESURFACEEX       CreateSurfaceEx;
+       PDD_GETDRIVERSTATE        GetDriverState;
+       PDD_DESTROYDDLOCAL        DestroyDDLocal;
+} DD_MISCELLANEOUS2CALLBACKS, *PDD_MISCELLANEOUS2CALLBACKS;
+
+enum
+{
+       DDHAL_MISC2CB32_ALPHABLT        = 1<<0,
+       DDHAL_MISC2CB32_CREATESURFACEEX = 1<<1,
+       DDHAL_MISC2CB32_GETDRIVERSTATE  = 1<<2,
+       DDHAL_MISC2CB32_DESTROYDDLOCAL  = 1<<3,
+};
+
+typedef struct
+{
+       PDD_DIRECTDRAW_GLOBAL lpDD;
+       PDD_SURFACE_LOCAL     lpDDSurface;
+       HRESULT               ddRVal;
+       PVOID                 FreeDriverMemory;
+} DD_FREEDRIVERMEMORYDATA, *PDD_FREEDRIVERMEMORYDATA;
+typedef DWORD (STDCALL *PDD_FREEDRIVERMEMORY)(PDD_FREEDRIVERMEMORYDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_GLOBAL lpDD;
+       DWORD                 dwEnterExcl;
+       DWORD                 dwReserved;
+       HRESULT               ddRVal;
+       PVOID                 SetExclusiveMode;
+} DD_SETEXCLUSIVEMODEDATA, *PDD_SETEXCLUSIVEMODEDATA;
+typedef DWORD (STDCALL *PDD_SETEXCLUSIVEMODE)(PDD_SETEXCLUSIVEMODEDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_GLOBAL lpDD;
+       DWORD                 dwToGDI;
+       DWORD                 dwReserved;
+       HRESULT               ddRVal;
+       PVOID                 FlipToGDISurface;
+} DD_FLIPTOGDISURFACEDATA, *PDD_FLIPTOGDISURFACEDATA;
+typedef DWORD (STDCALL *PDD_FLIPTOGDISURFACE)(PDD_FLIPTOGDISURFACEDATA);
+
+DEFINE_GUID(GUID_NTCallbacks, 0x6FE9ECDE, 0xDF89, 0x11D1, 0x9D, 0xB0, 0x00, 0x60, 0x08, 0x27, 0x71, 0xBA);
+
+typedef struct
+{
+       DWORD                 dwSize;
+       DWORD                 dwFlags;
+       PDD_FREEDRIVERMEMORY  FreeDriverMemory;
+       PDD_SETEXCLUSIVEMODE  SetExclusiveMode;
+       PDD_FLIPTOGDISURFACE  FlipToGDISurface;
+} DD_NTCALLBACKS, *PDD_NTCALLBACKS;
+
+enum
+{
+       DDHAL_NTCB32_FREEDRIVERMEMORY = 1<<0,
+       DDHAL_NTCB32_SETEXCLUSIVEMODE = 1<<1,
+       DDHAL_NTCB32_FLIPTOGDISURFACE = 1<<2,
+};
+
+/************************************************************************/
+/* IDirectDrawPalette callbacks                                         */
+/************************************************************************/
+
+typedef struct
+{
+       PDD_DIRECTDRAW_GLOBAL    lpDD;
+       PDD_PALETTE_GLOBAL       lpDDPalette;
+       HRESULT                  ddRVal;
+       PVOID                    DestroyPalette;
+} DD_DESTROYPALETTEDATA, *PDD_DESTROYPALETTEDATA;
+typedef DWORD (STDCALL *PDD_PALCB_DESTROYPALETTE)(PDD_DESTROYPALETTEDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_GLOBAL    lpDD;
+       PDD_PALETTE_GLOBAL       lpDDPalette;
+       DWORD                    dwBase;
+       DWORD                    dwNumEntries;
+       LPPALETTEENTRY           lpEntries;
+       HRESULT                  ddRVal;
+       PVOID                    SetEntries;
+} DD_SETENTRIESDATA, *PDD_SETENTRIESDATA;
+typedef DWORD (STDCALL *PDD_PALCB_SETENTRIES)(PDD_SETENTRIESDATA);
+
+typedef struct
+{
+       DWORD                    dwSize;
+       DWORD                    dwFlags;
+       PDD_PALCB_DESTROYPALETTE DestroyPalette;
+       PDD_PALCB_SETENTRIES     SetEntries;
+} DD_PALETTECALLBACKS, *PDD_PALETTECALLBACKS;
+
+enum
+{
+       DDHAL_PALCB32_DESTROYPALETTE = 1<<0,
+       DDHAL_PALCB32_SETENTRIES     = 1<<1,
+};
+
+/************************************************************************/
+/* IDirectDrawVideoport callbacks                                       */
+/************************************************************************/
+
+typedef struct
+{
+       PDD_DIRECTDRAW_LOCAL           lpDD;
+       LPDDVIDEOPORTDESC              lpDDVideoPortDesc;
+       HRESULT                        ddRVal;
+       PVOID                          CanCreateVideoPort;
+} DD_CANCREATEVPORTDATA, *PDD_CANCREATEVPORTDATA;
+typedef DWORD (STDCALL *PDD_VPORTCB_CANCREATEVIDEOPORT)(PDD_CANCREATEVPORTDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_LOCAL           lpDD;
+       LPDDVIDEOPORTDESC              lpDDVideoPortDesc;
+       PDD_VIDEOPORT_LOCAL            lpVideoPort;
+       HRESULT                        ddRVal;
+       PVOID                          CreateVideoPort;
+} DD_CREATEVPORTDATA, *PDD_CREATEVPORTDATA;
+typedef DWORD (STDCALL *PDD_VPORTCB_CREATEVIDEOPORT)(PDD_CREATEVPORTDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_LOCAL           lpDD;
+       PDD_VIDEOPORT_LOCAL            lpVideoPort;
+       PDD_SURFACE_LOCAL              lpSurfCurr;
+       PDD_SURFACE_LOCAL              lpSurfTarg;
+       HRESULT                        ddRVal;
+       PVOID                          FlipVideoPort;
+} DD_FLIPVPORTDATA, *PDD_FLIPVPORTDATA;
+typedef DWORD (STDCALL *PDD_VPORTCB_FLIP)(PDD_FLIPVPORTDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_LOCAL           lpDD;
+       PDD_VIDEOPORT_LOCAL            lpVideoPort;
+       LPDDPIXELFORMAT                lpddpfFormat;
+       DWORD                          dwWidth;
+       DWORD                          dwHeight;
+       DWORD                          dwFlags;
+       LPDDVIDEOPORTBANDWIDTH         lpBandwidth;
+       HRESULT                        ddRVal;
+       PVOID                          GetVideoPortBandwidth;
+} DD_GETVPORTBANDWIDTHDATA, *PDD_GETVPORTBANDWIDTHDATA;
+typedef DWORD (STDCALL *PDD_VPORTCB_GETBANDWIDTH)(PDD_GETVPORTBANDWIDTHDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_LOCAL           lpDD;
+       PDD_VIDEOPORT_LOCAL            lpVideoPort;
+       DWORD                          dwFlags;
+       LPDDPIXELFORMAT                lpddpfFormat;
+       DWORD                          dwNumFormats;
+       HRESULT                        ddRVal;
+       PVOID                          GetVideoPortInputFormats;
+} DD_GETVPORTINPUTFORMATDATA, *PDD_GETVPORTINPUTFORMATDATA;
+typedef DWORD (STDCALL *PDD_VPORTCB_GETINPUTFORMATS)(PDD_GETVPORTINPUTFORMATDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_LOCAL           lpDD;
+       PDD_VIDEOPORT_LOCAL            lpVideoPort;
+       DWORD                          dwFlags;
+       LPDDPIXELFORMAT                lpddpfInputFormat;
+       LPDDPIXELFORMAT                lpddpfOutputFormats;
+       DWORD                          dwNumFormats;
+       HRESULT                        ddRVal;
+       PVOID                          GetVideoPortInputFormats;
+} DD_GETVPORTOUTPUTFORMATDATA, *PDD_GETVPORTOUTPUTFORMATDATA;
+typedef DWORD (STDCALL *PDD_VPORTCB_GETOUTPUTFORMATS)(PDD_GETVPORTOUTPUTFORMATDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_LOCAL           lpDD;
+       PDD_VIDEOPORT_LOCAL            lpVideoPort;
+       BOOL                           bField;
+       HRESULT                        ddRVal;
+       PVOID                          GetVideoPortField;
+} DD_GETVPORTFIELDDATA, *PDD_GETVPORTFIELDDATA;
+typedef DWORD (STDCALL *PDD_VPORTCB_GETFIELD)(PDD_GETVPORTFIELDDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_LOCAL           lpDD;
+       PDD_VIDEOPORT_LOCAL            lpVideoPort;
+       DWORD                          dwLine;
+       HRESULT                        ddRVal;
+       PVOID                          GetVideoPortLine;
+} DD_GETVPORTLINEDATA, *PDD_GETVPORTLINEDATA;
+typedef DWORD (STDCALL *PDD_VPORTCB_GETLINE)(PDD_GETVPORTLINEDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_LOCAL           lpDD;
+       DWORD                          dwPortId;
+       LPDDVIDEOPORTCONNECT           lpConnect;
+       DWORD                          dwNumEntries;
+       HRESULT                        ddRVal;
+       PVOID                          GetVideoPortConnectInfo;
+} DD_GETVPORTCONNECTDATA, *PDD_GETVPORTCONNECTDATA;
+typedef DWORD (STDCALL *PDD_VPORTCB_GETVPORTCONNECT)(PDD_GETVPORTCONNECTDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_LOCAL           lpDD;
+       PDD_VIDEOPORT_LOCAL            lpVideoPort;
+       HRESULT                        ddRVal;
+       PVOID                          DestroyVideoPort;
+} DD_DESTROYVPORTDATA, *PDD_DESTROYVPORTDATA;
+typedef DWORD (STDCALL *PDD_VPORTCB_DESTROYVPORT)(PDD_DESTROYVPORTDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_LOCAL           lpDD;
+       FLATPTR                        fpSurface;
+       HRESULT                        ddRVal;
+       PVOID                          GetVideoPortFlipStatus;
+} DD_GETVPORTFLIPSTATUSDATA, *PDD_GETVPORTFLIPSTATUSDATA;
+typedef DWORD (STDCALL *PDD_VPORTCB_GETFLIPSTATUS)(PDD_GETVPORTFLIPSTATUSDATA);
+
+#define DDRAWI_VPORTSTART          1
+#define DDRAWI_VPORTSTOP           2
+#define DDRAWI_VPORTUPDATE         3
+
+typedef struct
+{
+       PDD_DIRECTDRAW_LOCAL           lpDD;
+       PDD_VIDEOPORT_LOCAL            lpVideoPort;
+       PDD_SURFACE_INT               *lplpDDSurface;
+       PDD_SURFACE_INT               *lplpDDVBISurface;
+       LPDDVIDEOPORTINFO              lpVideoInfo;
+       DWORD                          dwFlags;
+       DWORD                          dwNumAutoflip;
+       DWORD                          dwNumVBIAutoflip;
+       HRESULT                        ddRVal;
+       PVOID                          UpdateVideoPort;
+} DD_UPDATEVPORTDATA, *PDD_UPDATEVPORTDATA;
+typedef DWORD (STDCALL *PDD_VPORTCB_UPDATE)(PDD_UPDATEVPORTDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_LOCAL           lpDD;
+       PDD_VIDEOPORT_LOCAL            lpVideoPort;
+       DWORD                          dwFlags;
+       DWORD                          dwLine;
+       DWORD                          dwTimeOut;
+       HRESULT                        ddRVal;
+       PVOID                          UpdateVideoPort;
+} DD_WAITFORVPORTSYNCDATA, *PDD_WAITFORVPORTSYNCDATA;
+typedef DWORD (STDCALL *PDD_VPORTCB_WAITFORSYNC)(PDD_WAITFORVPORTSYNCDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_LOCAL           lpDD;
+       PDD_VIDEOPORT_LOCAL            lpVideoPort;
+       DWORD                          dwStatus;
+       HRESULT                        ddRVal;
+       PVOID                          GetVideoSignalStatus;
+} DD_GETVPORTSIGNALDATA, *PDD_GETVPORTSIGNALDATA;
+typedef DWORD (STDCALL *PDD_VPORTCB_GETSIGNALSTATUS)(PDD_GETVPORTSIGNALDATA);
+
+#define DDRAWI_VPORTGETCOLOR       1
+#define DDRAWI_VPORTSETCOLOR       2
+
+typedef struct
+{
+       PDD_DIRECTDRAW_LOCAL           lpDD;
+       PDD_VIDEOPORT_LOCAL            lpVideoPort;
+       DWORD                          dwFlags;
+       LPDDCOLORCONTROL               lpColorData;
+       HRESULT                        ddRVal;
+       PVOID                          ColorControl;
+} DD_VPORTCOLORDATA, *PDD_VPORTCOLORDATA;
+typedef DWORD (STDCALL *PDD_VPORTCB_COLORCONTROL)(PDD_VPORTCOLORDATA);
+
+DEFINE_GUID(GUID_VideoPortCallbacks, 0xEFD60CC1, 0x49E7, 0x11D0, 0x88, 0x9D, 0x00, 0xAA, 0x00, 0xBB, 0xB7, 0x6A);
+
+typedef struct
+{
+       DWORD                          dwSize;
+       DWORD                          dwFlags;
+       PDD_VPORTCB_CANCREATEVIDEOPORT CanCreateVideoPort;
+       PDD_VPORTCB_CREATEVIDEOPORT    CreateVideoPort;
+       PDD_VPORTCB_FLIP               FlipVideoPort;
+       PDD_VPORTCB_GETBANDWIDTH       GetVideoPortBandwidth;
+       PDD_VPORTCB_GETINPUTFORMATS    GetVideoPortInputFormats;
+       PDD_VPORTCB_GETOUTPUTFORMATS   GetVideoPortOutputFormats;
+       PVOID                          Reserved;
+       PDD_VPORTCB_GETFIELD           GetVideoPortField;
+       PDD_VPORTCB_GETLINE            GetVideoPortLine;
+       PDD_VPORTCB_GETVPORTCONNECT    GetVideoPortConnectInfo;
+       PDD_VPORTCB_DESTROYVPORT       DestroyVideoPort;
+       PDD_VPORTCB_GETFLIPSTATUS      GetVideoPortFlipStatus;
+       PDD_VPORTCB_UPDATE             UpdateVideoPort;
+       PDD_VPORTCB_WAITFORSYNC        WaitForVideoPortSync;
+       PDD_VPORTCB_GETSIGNALSTATUS    GetVideoSignalStatus;
+       PDD_VPORTCB_COLORCONTROL       ColorControl;
+} DD_VIDEOPORTCALLBACKS, *PDD_VIDEOPORTCALLBACKS;
+
+enum
+{
+       DDHAL_VPORT32_CANCREATEVIDEOPORT = 1<<0,
+       DDHAL_VPORT32_CREATEVIDEOPORT    = 1<<1,
+       DDHAL_VPORT32_FLIP               = 1<<2,
+       DDHAL_VPORT32_GETBANDWIDTH       = 1<<3,
+       DDHAL_VPORT32_GETINPUTFORMATS    = 1<<4,
+       DDHAL_VPORT32_GETOUTPUTFORMATS   = 1<<5,
+       DDHAL_VPORT32_GETFIELD           = 1<<7,
+       DDHAL_VPORT32_GETLINE            = 1<<8,
+       DDHAL_VPORT32_GETCONNECT         = 1<<9,
+       DDHAL_VPORT32_DESTROY            = 1<<10,
+       DDHAL_VPORT32_GETFLIPSTATUS      = 1<<11,
+       DDHAL_VPORT32_UPDATE             = 1<<12,
+       DDHAL_VPORT32_WAITFORSYNC        = 1<<13,
+       DDHAL_VPORT32_GETSIGNALSTATUS    = 1<<14,
+       DDHAL_VPORT32_COLORCONTROL       = 1<<15,
+};
+
+/************************************************************************/
+/* IDirectDrawColorControl callbacks                                    */
+/************************************************************************/
+
+#define DDRAWI_GETCOLOR      1
+#define DDRAWI_SETCOLOR      2
+
+typedef struct
+{
+       PDD_DIRECTDRAW_GLOBAL    lpDD;
+       PDD_SURFACE_LOCAL        lpDDSurface;
+       LPDDCOLORCONTROL         lpColorData;
+       DWORD                    dwFlags;
+       HRESULT                  ddRVal;
+       PVOID                    ColorControl;
+} DD_COLORCONTROLDATA, *PDD_COLORCONTROLDATA;
+typedef DWORD (STDCALL *PDD_COLORCB_COLORCONTROL)(PDD_COLORCONTROLDATA);
+
+DEFINE_GUID(GUID_ColorControlCallbacks, 0xEFD60CC2, 0x49E7, 0x11D0, 0x88, 0x9D, 0x00, 0xAA, 0x00, 0xBB, 0xB7, 0x6A);
+
+typedef struct
+{
+       DWORD                    dwSize;
+       DWORD                    dwFlags;
+       PDD_COLORCB_COLORCONTROL ColorControl;
+} DD_COLORCONTROLCALLBACKS, *PDD_COLORCONTROLCALLBACKS;
+
+enum
+{
+       DDHAL_COLOR_COLORCONTROL = 1<<0,
+};
+
+/************************************************************************/
+/* IDirectDrawVideo callbacks                                           */
+/************************************************************************/
+
+typedef struct
+{
+       PDD_DIRECTDRAW_LOCAL         lpDD;
+       DWORD                        dwNumGuids;
+       GUID                        *lpGuids;
+       HRESULT                      ddRVal;
+} DD_GETMOCOMPGUIDSDATA, *PDD_GETMOCOMPGUIDSDATA;
+typedef DWORD (STDCALL *PDD_MOCOMPCB_GETGUIDS)(PDD_GETMOCOMPGUIDSDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_LOCAL         lpDD;
+       GUID                        *lpGuid;
+       DWORD                        dwNumFormats;
+       LPDDPIXELFORMAT              lpFormats;
+       HRESULT                      ddRVal;
+} DD_GETMOCOMPFORMATSDATA, *PDD_GETMOCOMPFORMATSDATA;
+typedef DWORD (STDCALL *PDD_MOCOMPCB_GETFORMATS)(PDD_GETMOCOMPFORMATSDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_LOCAL         lpDD;
+       PDD_MOTIONCOMP_LOCAL         lpMoComp;
+       GUID                        *lpGuid;
+       DWORD                        dwUncompWidth;
+       DWORD                        dwUncompHeight;
+       DDPIXELFORMAT                ddUncompPixelFormat;
+       LPVOID                       lpData;
+       DWORD                        dwDataSize;
+       HRESULT                      ddRVal;
+} DD_CREATEMOCOMPDATA, *PDD_CREATEMOCOMPDATA;
+typedef DWORD (STDCALL *PDD_MOCOMPCB_CREATE)(PDD_CREATEMOCOMPDATA);
+
+typedef struct
+{
+       DWORD                        dwSize;
+       DWORD                        dwNumCompBuffers;
+       DWORD                        dwWidthToCreate;
+       DWORD                        dwHeightToCreate;
+       DWORD                        dwBytesToAllocate;
+       DDSCAPS2                     ddCompCaps;
+       DDPIXELFORMAT                ddPixelFormat;
+} DDCOMPBUFFERINFO, *PDDCOMPBUFFERINFO;
+
+typedef struct
+{
+       PDD_DIRECTDRAW_LOCAL         lpDD;
+       GUID                        *lpGuid;
+       DWORD                        dwWidth;
+       DWORD                        dwHeight;
+       DDPIXELFORMAT                ddPixelFormat;
+       DWORD                        dwNumTypesCompBuffs;
+       PDDCOMPBUFFERINFO            lpCompBuffInfo;
+       HRESULT                      ddRVal;
+} DD_GETMOCOMPCOMPBUFFDATA, *PDD_GETMOCOMPCOMPBUFFDATA;
+typedef DWORD (STDCALL *PDD_MOCOMPCB_GETCOMPBUFFINFO)(PDD_GETMOCOMPCOMPBUFFDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_LOCAL         lpDD;
+       GUID                        *lpGuid;
+       DWORD                        dwWidth;
+       DWORD                        dwHeight;
+       DDPIXELFORMAT                ddPixelFormat;
+       DWORD                        dwScratchMemAlloc;
+       HRESULT                      ddRVal;
+} DD_GETINTERNALMOCOMPDATA, *PDD_GETINTERNALMOCOMPDATA;
+typedef DWORD (STDCALL *PDD_MOCOMPCB_GETINTERNALINFO)(PDD_GETINTERNALMOCOMPDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_LOCAL         lpDD;
+       PDD_MOTIONCOMP_LOCAL         lpMoComp;
+       PDD_SURFACE_LOCAL            lpDestSurface;
+       DWORD                        dwInputDataSize;
+       LPVOID                       lpInputData;
+       DWORD                        dwOutputDataSize;
+       LPVOID                       lpOutputData;
+       HRESULT                      ddRVal;
+} DD_BEGINMOCOMPFRAMEDATA, *PDD_BEGINMOCOMPFRAMEDATA;
+typedef DWORD (STDCALL *PDD_MOCOMPCB_BEGINFRAME)(PDD_BEGINMOCOMPFRAMEDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_LOCAL         lpDD;
+       PDD_MOTIONCOMP_LOCAL         lpMoComp;
+       LPVOID                       lpInputData;
+       DWORD                        dwInputDataSize;
+       HRESULT                      ddRVal;
+} DD_ENDMOCOMPFRAMEDATA, *PDD_ENDMOCOMPFRAMEDATA;
+typedef DWORD (STDCALL *PDD_MOCOMPCB_ENDFRAME)(PDD_ENDMOCOMPFRAMEDATA);
+
+typedef struct
+{
+       DWORD                        dwSize;
+       PDD_SURFACE_LOCAL            lpCompSurface;
+       DWORD                        dwDataOffset;
+       DWORD                        dwDataSize;
+       LPVOID                       lpPrivate;
+} DDMOCOMPBUFFERINFO, *PDDMOCOMPBUFFERINFO;
+
+typedef struct
+{
+       PDD_DIRECTDRAW_LOCAL         lpDD;
+       PDD_MOTIONCOMP_LOCAL         lpMoComp;
+       DWORD                        dwNumBuffers;
+       PDDMOCOMPBUFFERINFO          lpBufferInfo;
+       DWORD                        dwFunction;
+       LPVOID                       lpInputData;
+       DWORD                        dwInputDataSize;
+       LPVOID                       lpOutputData;
+       DWORD                        dwOutputDataSize;
+       HRESULT                      ddRVal;
+} DD_RENDERMOCOMPDATA, *PDD_RENDERMOCOMPDATA;
+typedef DWORD (STDCALL *PDD_MOCOMPCB_RENDER)(PDD_RENDERMOCOMPDATA);
+
+#define DDMCQUERY_READ 1
+
+typedef struct
+{
+       PDD_DIRECTDRAW_LOCAL         lpDD;
+       PDD_MOTIONCOMP_LOCAL         lpMoComp;
+       PDD_SURFACE_LOCAL            lpSurface;
+       DWORD                        dwFlags;
+       HRESULT                      ddRVal;
+} DD_QUERYMOCOMPSTATUSDATA, *PDD_QUERYMOCOMPSTATUSDATA;
+typedef DWORD (STDCALL *PDD_MOCOMPCB_QUERYSTATUS)(PDD_QUERYMOCOMPSTATUSDATA);
+
+typedef struct
+{
+       PDD_DIRECTDRAW_LOCAL         lpDD;
+       PDD_MOTIONCOMP_LOCAL         lpMoComp;
+       HRESULT                      ddRVal;
+} DD_DESTROYMOCOMPDATA, *PDD_DESTROYMOCOMPDATA;
+typedef DWORD (STDCALL *PDD_MOCOMPCB_DESTROY)(PDD_DESTROYMOCOMPDATA);
+
+DEFINE_GUID(GUID_MotionCompCallbacks, 0xB1122B40, 0x5DA5, 0x11D1, 0x8F, 0xCF, 0x00, 0xC0, 0x4F, 0xC2, 0x9B, 0x4E);
+
+typedef struct
+{
+       DWORD                        dwSize;
+       DWORD                        dwFlags;
+       PDD_MOCOMPCB_GETGUIDS        GetMoCompGuids;
+       PDD_MOCOMPCB_GETFORMATS      GetMoCompFormats;
+       PDD_MOCOMPCB_CREATE          CreateMoComp;
+       PDD_MOCOMPCB_GETCOMPBUFFINFO GetMoCompBuffInfo;
+       PDD_MOCOMPCB_GETINTERNALINFO GetInternalMoCompInfo;
+       PDD_MOCOMPCB_BEGINFRAME      BeginMoCompFrame;
+       PDD_MOCOMPCB_ENDFRAME        EndMoCompFrame;
+       PDD_MOCOMPCB_RENDER          RenderMoComp;
+       PDD_MOCOMPCB_QUERYSTATUS     QueryMoCompStatus;
+       PDD_MOCOMPCB_DESTROY         DestroyMoComp;
+} DD_MOTIONCOMPCALLBACKS;
+typedef DD_MOTIONCOMPCALLBACKS *PDD_MOTIONCOMPCALLBACKS;
+
+enum
+{
+       DDHAL_MOCOMP32_GETGUIDS        = 1<<0,
+       DDHAL_MOCOMP32_GETFORMATS      = 1<<1,
+       DDHAL_MOCOMP32_CREATE          = 1<<2,
+       DDHAL_MOCOMP32_GETCOMPBUFFINFO = 1<<3,
+       DDHAL_MOCOMP32_GETINTERNALINFO = 1<<4,
+       DDHAL_MOCOMP32_BEGINFRAME      = 1<<5,
+       DDHAL_MOCOMP32_ENDFRAME        = 1<<6,
+       DDHAL_MOCOMP32_RENDER          = 1<<7,
+       DDHAL_MOCOMP32_QUERYSTATUS     = 1<<8,
+       DDHAL_MOCOMP32_DESTROY         = 1<<9,
+};
+
+/************************************************************************/
+/* D3D buffer callbacks                                                 */
+/************************************************************************/
+
+typedef struct
+{
+       DWORD                     dwSize;
+       DWORD                     dwFlags;
+       PDD_CANCREATESURFACE      CanCreateD3DBuffer;
+       PDD_CREATESURFACE         CreateD3DBuffer;
+       PDD_SURFCB_DESTROYSURFACE DestroyD3DBuffer;
+       PDD_SURFCB_LOCK           LockD3DBuffer;
+       PDD_SURFCB_UNLOCK         UnlockD3DBuffer;
+} DD_D3DBUFCALLBACKS, *PDD_D3DBUFCALLBACKS;
+
+/************************************************************************/
+/* DdGetDriverInfo callback                                             */
+/************************************************************************/
+
+typedef struct
+{
+       // Input:
+       PVOID   dhpdev;
+       DWORD   dwSize;
+       DWORD   dwFlags;
+       GUID    guidInfo;
+       DWORD   dwExpectedSize;
+       PVOID   lpvData;
+       // Output:
+       DWORD   dwActualSize;
+       HRESULT ddRVal;
+} DD_GETDRIVERINFODATA, *PDD_GETDRIVERINFODATA;
+typedef DWORD (STDCALL *PDD_GETDRIVERINFO)(PDD_GETDRIVERINFODATA);
+
+/************************************************************************/
+/* Driver info structures                                               */
+/************************************************************************/
+
+typedef struct
+{
+       DWORD   dwSize;
+       DWORD   dwCaps;
+       DWORD   dwCaps2;
+       DWORD   dwCKeyCaps;
+       DWORD   dwFXCaps;
+       DWORD   dwFXAlphaCaps;
+       DWORD   dwPalCaps;
+       DWORD   dwSVCaps;
+       DWORD   dwAlphaBltConstBitDepths;
+       DWORD   dwAlphaBltPixelBitDepths;
+       DWORD   dwAlphaBltSurfaceBitDepths;
+       DWORD   dwAlphaOverlayConstBitDepths;
+       DWORD   dwAlphaOverlayPixelBitDepths;
+       DWORD   dwAlphaOverlaySurfaceBitDepths;
+       DWORD   dwZBufferBitDepths;
+       DWORD   dwVidMemTotal;
+       DWORD   dwVidMemFree;
+       DWORD   dwMaxVisibleOverlays;
+       DWORD   dwCurrVisibleOverlays;
+       DWORD   dwNumFourCCCodes;
+       DWORD   dwAlignBoundarySrc;
+       DWORD   dwAlignSizeSrc;
+       DWORD   dwAlignBoundaryDest;
+       DWORD   dwAlignSizeDest;
+       DWORD   dwAlignStrideAlign;
+       DWORD   dwRops[DD_ROP_SPACE];
+       DDSCAPS ddsCaps;
+       DWORD   dwMinOverlayStretch;
+       DWORD   dwMaxOverlayStretch;
+       DWORD   dwMinLiveVideoStretch;
+       DWORD   dwMaxLiveVideoStretch;
+       DWORD   dwMinHwCodecStretch;
+       DWORD   dwMaxHwCodecStretch;
+       DWORD   dwReserved1;
+       DWORD   dwReserved2;
+       DWORD   dwReserved3;
+       DWORD   dwSVBCaps;
+       DWORD   dwSVBCKeyCaps;
+       DWORD   dwSVBFXCaps;
+       DWORD   dwSVBRops[DD_ROP_SPACE];
+       DWORD   dwVSBCaps;
+       DWORD   dwVSBCKeyCaps;
+       DWORD   dwVSBFXCaps;
+       DWORD   dwVSBRops[DD_ROP_SPACE];
+       DWORD   dwSSBCaps;
+       DWORD   dwSSBCKeyCaps;
+       DWORD   dwSSBFXCaps;
+       DWORD   dwSSBRops[DD_ROP_SPACE];
+       DWORD   dwMaxVideoPorts;
+       DWORD   dwCurrVideoPorts;
+       DWORD   dwSVBCaps2;
+} DDNTCORECAPS, *PDDNTCORECAPS;
+
+typedef struct
+{
+       DWORD               dwSize;
+       VIDEOMEMORYINFO     vmiData;
+       DDNTCORECAPS        ddCaps;
+       PDD_GETDRIVERINFO   GetDriverInfo;
+       DWORD               dwFlags;
+       PVOID               lpD3DGlobalDriverData;
+       PVOID               lpD3DHALCallbacks;
+       PDD_D3DBUFCALLBACKS lpD3DBufCallbacks;
+} DD_HALINFO, *PDD_HALINFO;
+
+DEFINE_GUID(GUID_NonLocalVidMemCaps, 0x86C4FA80, 0x8D84, 0x11D0, 0x94, 0xE8, 0x00, 0xC0, 0x4F, 0xC3, 0x41, 0x37);
+
+typedef struct
+{
+       DWORD dwSize;
+       DWORD dwNLVBCaps;
+       DWORD dwNLVBCaps2;
+       DWORD dwNLVBCKeyCaps;
+       DWORD dwNLVBFXCaps;
+       DWORD dwNLVBRops[DD_ROP_SPACE];
+} DD_NONLOCALVIDMEMCAPS, *PDD_NONLOCALVIDMEMCAPS;
+
+DEFINE_GUID(GUID_DDMoreSurfaceCaps, 0x3B8A0466, 0xF269, 0x11D1, 0x88, 0x0B, 0x00, 0xC0, 0x4F, 0xD9, 0x30, 0xC5);
+
+typedef struct
+{
+       DWORD         dwSize;
+       DDSCAPSEX     ddsCapsMore;
+       struct
+       {
+               DDSCAPSEX ddsCapsEx;
+               DDSCAPSEX ddsCapsExAlt;
+       } ddsExtendedHeapRestrictions[1];
+} DD_MORESURFACECAPS, *PDD_MORESURFACECAPS;
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* __DDK_DDRAWINT_H */
index c3dde72..ef7d3bc 100644 (file)
@@ -16,7 +16,7 @@
 #else
 #include <windows.h>
 #endif
-#include <ddk/ddrawi.h>
+#include <ddk/ddrawint.h>
 
 #ifndef IN
 #define IN
@@ -35,28 +35,6 @@ typedef DWORD PTRDIFF;
 
 #define GDI_DRIVER_VERSION 0x4000   /* NT 4 compatibility */
 
-typedef DDHAL_DDCALLBACKS *PDD_CALLBACKS;
-typedef DDHALINFO *PDD_HALINFO;
-typedef DDHAL_DDPALETTECALLBACKS *PDD_PALETTECALLBACKS;
-typedef DDHAL_DDSURFACECALLBACKS *PDD_SURFACECALLBACKS;
-typedef struct _VIDEOMEMORY
-{
-    DWORD               dwFlags;
-    FLATPTR             fpStart;
-    union
-    {
-        FLATPTR         fpEnd;
-        DWORD           dwWidth;
-    };
-    DDSCAPS             ddsCaps;
-    DDSCAPS             ddsCapsAlt;
-    union
-    {
-        struct _VMEMHEAP *lpHeap;
-        DWORD           dwHeight;
-    };
-} VIDEOMEMORY, *PVIDEOMEMORY;
-
 typedef struct _FONTINFO
 {
     ULONG   cjThis;
index 1859702..2f68e62 100644 (file)
@@ -323,6 +323,12 @@ typedef struct _DDSCAPS2 {
        DWORD   dwCaps4; /* more reserved capabilities */
 } DDSCAPS2,*LPDDSCAPS2;
 
+typedef struct _DDSCAPSEX {
+       DWORD   dwCaps2; /* additional capabilities */
+       DWORD   dwCaps3; /* reserved capabilities */
+       DWORD   dwCaps4; /* more reserved capabilities */
+} DDSCAPSEX,*LPDDSCAPSEX;
+
 #define        DD_ROP_SPACE    (256/32)        /* space required to store ROP array */
 
 typedef struct DDCAPS_DX7              /* DirectX 7 version of caps struct */
index c579031..57cb7ee 100644 (file)
 #define __WIN32K_NTDDRAW_H
 
 #include <windows.h>
-#include <ddk/d3dhal.h>
+#include <ddk/ddrawint.h>
+#include <ddk/d3dnthal.h>
 
-typedef D3DHAL_CONTEXTCREATEDATA D3DNTHAL_CONTEXTCREATEDATA;
+#ifdef __cplusplus
+extern "C" {
+#endif
 
-BOOL APIENTRY NtGdiD3dContextCreate(
+BOOL STDCALL NtGdiD3dContextCreate(
     HANDLE hDirectDrawLocal,
     HANDLE hSurfColor,
     HANDLE hSurfZ,
-    D3DNTHAL_CONTEXTCREATEDATA *pdcci
+    PD3DNTHAL_CONTEXTCREATEDATA pdcci
 );
 
-DWORD APIENTRY NtGdiD3dContextDestroy(      
-    LPD3DNTHAL_CONTEXTDESTROYDATA pContextDestroyData
+DWORD STDCALL NtGdiD3dContextDestroy(      
+    PD3DNTHAL_CONTEXTDESTROYDATA pContextDestroyData
 );
 
-DWORD APIENTRY NtGdiD3dContextDestroyAll(VOID);
+DWORD STDCALL NtGdiD3dContextDestroyAll(VOID);
 
-DWORD APIENTRY NtGdiD3dDrawPrimitives2(      
+DWORD STDCALL NtGdiD3dDrawPrimitives2(      
     HANDLE hCmdBuf,
     HANDLE hVBuf,
-    LPD3DNTHAL_DRAWPRIMITIVES2DATA pded,
+    PD3DNTHAL_DRAWPRIMITIVES2DATA pded,
     FLATPTR *pfpVidMemCmd,
     DWORD *pdwSizeCmd,
     FLATPTR *pfpVidMemVtx,
     DWORD *pdwSizeVtx
 );
 
-DWORD APIENTRY NtGdiD3dValidateTextureStageState(      
-    LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA pData
+DWORD STDCALL NtGdiD3dValidateTextureStageState(      
+    PD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA pData
 );
 
-DWORD APIENTRY NtGdiDdAddAttachedSurface(      
+DWORD STDCALL NtGdiDdAddAttachedSurface(      
     HANDLE hSurface,
     HANDLE hSurfaceAttached,
     PDD_ADDATTACHEDSURFACEDATA puAddAttachedSurfaceData
 );
 
-DWORD APIENTRY NtGdiDdAlphaBlt(VOID);
+DWORD STDCALL NtGdiDdAlphaBlt(VOID);
 
-BOOL APIENTRY NtGdiDdAttachSurface(      
+BOOL STDCALL NtGdiDdAttachSurface(      
     HANDLE hSurfaceFrom,
     HANDLE hSurfaceTo
 );
 
-DWORD APIENTRY NtGdiDdBeginMoCompFrame(      
+DWORD STDCALL NtGdiDdBeginMoCompFrame(      
     HANDLE hMoComp,
     PDD_BEGINMOCOMPFRAMEDATA puBeginFrameData
 );
 
-DWORD APIENTRY NtGdiDdBlt(      
+DWORD STDCALL NtGdiDdBlt(      
     HANDLE hSurfaceDest,
     HANDLE hSurfaceSrc,
     PDD_BLTDATA puBltData
 );
 
-DWORD APIENTRY NtGdiDdCanCreateD3DBuffer(      
+DWORD STDCALL NtGdiDdCanCreateD3DBuffer(      
     HANDLE hDirectDraw,
     PDD_CANCREATESURFACEDATA puCanCreateSurfaceData
 );
 
-DWORD APIENTRY NtGdiDdCanCreateSurface(      
+DWORD STDCALL NtGdiDdCanCreateSurface(      
     HANDLE hDirectDraw,
     PDD_CANCREATESURFACEDATA puCanCreateSurfaceData
 );
 
-DWORD APIENTRY NtGdiDdColorControl(      
+DWORD STDCALL NtGdiDdColorControl(      
     HANDLE hSurface,
     PDD_COLORCONTROLDATA puColorControlData
 );
 
-DWORD APIENTRY NtGdiDdCreateD3DBuffer(      
+DWORD STDCALL NtGdiDdCreateD3DBuffer(      
     HANDLE hDirectDraw,
     HANDLE *hSurface,
     DDSURFACEDESC *puSurfaceDescription,
     DD_SURFACE_GLOBAL *puSurfaceGlobalData,
     DD_SURFACE_LOCAL *puSurfaceLocalData,
     DD_SURFACE_MORE *puSurfaceMoreData,
-    DD_CREATESURFACEDATA *puCreateSurfaceData,
+    PDD_CREATESURFACEDATA puCreateSurfaceData,
     HANDLE *puhSurface
 );
 
-HANDLE APIENTRY NtGdiDdCreateDirectDrawObject(      
+HANDLE STDCALL NtGdiDdCreateDirectDrawObject(      
     HDC hdc
 );
 
-HANDLE APIENTRY NtGdiDdCreateMoComp(      
+HANDLE STDCALL NtGdiDdCreateMoComp(      
     HANDLE hDirectDraw,
     PDD_CREATEMOCOMPDATA puCreateMoCompData
 );
 
-DWORD APIENTRY NtGdiDdCreateSurface(      
+DWORD STDCALL NtGdiDdCreateSurface(      
     HANDLE hDirectDraw,
     HANDLE *hSurface,
     DDSURFACEDESC *puSurfaceDescription,
     DD_SURFACE_GLOBAL *puSurfaceGlobalData,
     DD_SURFACE_LOCAL *puSurfaceLocalData,
     DD_SURFACE_MORE *puSurfaceMoreData,
-    DD_CREATESURFACEDATA *puCreateSurfaceData,
+    PDD_CREATESURFACEDATA puCreateSurfaceData,
     HANDLE *puhSurface
 );
 
-DWORD APIENTRY NtGdiDdCreateSurfaceEx(      
+DWORD STDCALL NtGdiDdCreateSurfaceEx(      
     HANDLE hDirectDraw,
     HANDLE hSurface,
     DWORD dwSurfaceHandle
 );
 
-HANDLE APIENTRY NtGdiDdCreateSurfaceObject(      
+HANDLE STDCALL NtGdiDdCreateSurfaceObject(      
     HANDLE hDirectDrawLocal,
     HANDLE hSurface,
     PDD_SURFACE_LOCAL puSurfaceLocal,
@@ -119,34 +122,34 @@ HANDLE APIENTRY NtGdiDdCreateSurfaceObject(
     BOOL bComplete
 );
 
-BOOL APIENTRY NtGdiDdDeleteDirectDrawObject(      
+BOOL STDCALL NtGdiDdDeleteDirectDrawObject(      
     HANDLE hDirectDrawLocal
 );
 
-BOOL APIENTRY NtGdiDdDeleteSurfaceObject(      
+BOOL STDCALL NtGdiDdDeleteSurfaceObject(      
     HANDLE hSurface
 );
 
-DWORD APIENTRY NtGdiDdDestroyD3DBuffer(      
+DWORD STDCALL NtGdiDdDestroyD3DBuffer(      
     HANDLE hSurface
 );
 
-DWORD APIENTRY NtGdiDdDestroyMoComp(      
+DWORD STDCALL NtGdiDdDestroyMoComp(      
     HANDLE hMoComp,
     PDD_DESTROYMOCOMPDATA puBeginFrameData
 );
 
-DWORD APIENTRY NtGdiDdDestroySurface(      
+DWORD STDCALL NtGdiDdDestroySurface(      
     HANDLE hSurface,
     BOOL bRealDestroy
 );
 
-DWORD APIENTRY NtGdiDdEndMoCompFrame(      
+DWORD STDCALL NtGdiDdEndMoCompFrame(      
     HANDLE hMoComp,
     PDD_ENDMOCOMPFRAMEDATA puEndFrameData
 );
 
-DWORD APIENTRY NtGdiDdFlip(      
+DWORD STDCALL NtGdiDdFlip(      
     HANDLE hSurfaceCurrent,
     HANDLE hSurfaceTarget,
     HANDLE hSurfaceCurrentLeft,
@@ -154,88 +157,88 @@ DWORD APIENTRY NtGdiDdFlip(
     PDD_FLIPDATA puFlipData
 );
 
-DWORD APIENTRY NtGdiDdFlipToGDISurface(      
+DWORD STDCALL NtGdiDdFlipToGDISurface(      
     HANDLE hDirectDraw,
     PDD_FLIPTOGDISURFACEDATA puFlipToGDISurfaceData
 );
 
-DWORD APIENTRY NtGdiDdGetAvailDriverMemory(      
+DWORD STDCALL NtGdiDdGetAvailDriverMemory(      
     HANDLE hDirectDraw,
     PDD_GETAVAILDRIVERMEMORYDATA puGetAvailDriverMemoryData
 );
 
-DWORD APIENTRY NtGdiDdGetBltStatus(      
+DWORD STDCALL NtGdiDdGetBltStatus(      
     HANDLE hSurface,
     PDD_GETBLTSTATUSDATA puGetBltStatusData
 );
 
-HDC APIENTRY NtGdiDdGetDC(      
+HDC STDCALL NtGdiDdGetDC(      
     HANDLE hSurface,
     PALETTEENTRY *puColorTable
 );
 
-DWORD APIENTRY NtGdiDdGetDriverInfo(      
+DWORD STDCALL NtGdiDdGetDriverInfo(      
     HANDLE hDirectDraw,
     PDD_GETDRIVERINFODATA puGetDriverInfoData
 );
 
-DWORD APIENTRY NtGdiDdGetDriverState(      
+DWORD STDCALL NtGdiDdGetDriverState(      
     PDD_GETDRIVERSTATEDATA pdata
 );
 
-DWORD APIENTRY NtGdiDdGetDxHandle(      
+DWORD STDCALL NtGdiDdGetDxHandle(      
     HANDLE hDirectDraw,
     HANDLE hSurface,
     BOOL bRelease
 );
 
-DWORD APIENTRY NtGdiDdGetFlipStatus(      
+DWORD STDCALL NtGdiDdGetFlipStatus(      
     HANDLE hSurface,
     PDD_GETFLIPSTATUSDATA puGetFlipStatusData
 );
 
-DWORD APIENTRY NtGdiDdGetInternalMoCompInfo(      
+DWORD STDCALL NtGdiDdGetInternalMoCompInfo(      
     HANDLE hDirectDraw,
     PDD_GETINTERNALMOCOMPDATA puGetInternalData
 );
 
-DWORD APIENTRY NtGdiDdGetMoCompBuffInfo(      
+DWORD STDCALL NtGdiDdGetMoCompBuffInfo(      
     HANDLE hDirectDraw,
     PDD_GETMOCOMPCOMPBUFFDATA puGetBuffData
 );
 
-DWORD APIENTRY NtGdiDdGetMoCompFormats(      
+DWORD STDCALL NtGdiDdGetMoCompFormats(      
     HANDLE hDirectDraw,
     PDD_GETMOCOMPFORMATSDATA puGetMoCompFormatsData
 );
 
-DWORD APIENTRY NtGdiDdGetMoCompGuids(      
+DWORD STDCALL NtGdiDdGetMoCompGuids(      
     HANDLE hDirectDraw,
     PDD_GETMOCOMPGUIDSDATA puGetMoCompGuidsData
 );
 
-DWORD APIENTRY NtGdiDdGetScanLine(      
+DWORD STDCALL NtGdiDdGetScanLine(      
     HANDLE hDirectDraw,
     PDD_GETSCANLINEDATA puGetScanLineData
 );
 
-DWORD APIENTRY NtGdiDdLock(      
+DWORD STDCALL NtGdiDdLock(      
     HANDLE hSurface,
     PDD_LOCKDATA puLockData,
     HDC hdcClip
 );
 
-DWORD APIENTRY NtGdiDdLockD3D(      
+DWORD STDCALL NtGdiDdLockD3D(      
     HANDLE hSurface,
     PDD_LOCKDATA puLockData
 );
 
-BOOL APIENTRY NtGdiDdQueryDirectDrawObject(      
+BOOL STDCALL NtGdiDdQueryDirectDrawObject(      
     HANDLE hDirectDrawLocal,
     DD_HALINFO *pHalInfo,
     DWORD *pCallBackFlags,
-    LPD3DNTHAL_CALLBACKS puD3dCallbacks,
-    LPD3DNTHAL_GLOBALDRIVERDATA puD3dDriverData,
+    PD3DNTHAL_CALLBACKS puD3dCallbacks,
+    PD3DNTHAL_GLOBALDRIVERDATA puD3dDriverData,
     PDD_D3DBUFCALLBACKS puD3dBufferCallbacks,
     LPDDSURFACEDESC puD3dTextureFormats,
     DWORD *puNumHeaps,
@@ -244,77 +247,80 @@ BOOL APIENTRY NtGdiDdQueryDirectDrawObject(
     DWORD *puFourCC
 );
 
-DWORD APIENTRY NtGdiDdQueryMoCompStatus(      
+DWORD STDCALL NtGdiDdQueryMoCompStatus(      
     HANDLE hMoComp,
     PDD_QUERYMOCOMPSTATUSDATA puQueryMoCompStatusData
 );
 
-BOOL APIENTRY NtGdiDdReenableDirectDrawObject(      
+BOOL STDCALL NtGdiDdReenableDirectDrawObject(      
     HANDLE hDirectDrawLocal,
     BOOL *pubNewMode
 );
 
-BOOL APIENTRY NtGdiDdReleaseDC(      
+BOOL STDCALL NtGdiDdReleaseDC(      
     HANDLE hSurface
 );
 
-DWORD APIENTRY NtGdiDdRenderMoComp(      
+DWORD STDCALL NtGdiDdRenderMoComp(      
     HANDLE hMoComp,
     PDD_RENDERMOCOMPDATA puRenderMoCompData
 );
 
-BOOL APIENTRY NtGdiDdResetVisrgn(      
+BOOL STDCALL NtGdiDdResetVisrgn(      
     HANDLE hSurface,
     HWND hwnd
 );
 
-DWORD APIENTRY NtGdiDdSetColorKey(      
+DWORD STDCALL NtGdiDdSetColorKey(      
     HANDLE hSurface,
     PDD_SETCOLORKEYDATA puSetColorKeyData
 );
 
-DWORD APIENTRY NtGdiDdSetExclusiveMode(      
+DWORD STDCALL NtGdiDdSetExclusiveMode(      
     HANDLE hDirectDraw,
     PDD_SETEXCLUSIVEMODEDATA puSetExclusiveModeData
 );
 
-BOOL APIENTRY NtGdiDdSetGammaRamp(      
+BOOL STDCALL NtGdiDdSetGammaRamp(      
     HANDLE hDirectDraw,
     HDC hdc,
     LPVOID lpGammaRamp
 );
 
-DWORD APIENTRY NtGdiDdSetOverlayPosition(      
+DWORD STDCALL NtGdiDdSetOverlayPosition(      
     HANDLE hSurfaceSource,
     HANDLE hSurfaceDestination,
     PDD_SETOVERLAYPOSITIONDATA puSetOverlayPositionData
 );
 
-VOID APIENTRY NtGdiDdUnattachSurface(      
+VOID STDCALL NtGdiDdUnattachSurface(      
     HANDLE hSurface,
     HANDLE hSurfaceAttached
 );
 
-DWORD APIENTRY NtGdiDdUnlock(      
+DWORD STDCALL NtGdiDdUnlock(      
     HANDLE hSurface,
     PDD_UNLOCKDATA puUnlockData
 );
 
-DWORD APIENTRY NtGdiDdUnlockD3D(      
+DWORD STDCALL NtGdiDdUnlockD3D(      
     HANDLE hSurface,
     PDD_UNLOCKDATA puUnlockData
 );
 
-DWORD APIENTRY NtGdiDdUpdateOverlay(      
+DWORD STDCALL NtGdiDdUpdateOverlay(      
     HANDLE hSurfaceDestination,
     HANDLE hSurfaceSource,
     PDD_UPDATEOVERLAYDATA puUpdateOverlayData
 );
 
-DWORD APIENTRY NtGdiDdWaitForVerticalBlank(      
+DWORD STDCALL NtGdiDdWaitForVerticalBlank(      
     HANDLE hDirectDraw,
     PDD_WAITFORVERTICALBLANKDATA puWaitForVerticalBlankData
 );
 
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
 
 #endif
index 6f74e15..02b9f05 100644 (file)
@@ -4,8 +4,6 @@ TARGET_TYPE = dynlink
 
 TARGET_NAME = d3d8thk
 
-TARGET_DEFONLY = yes
-
 #TARGET_BASE = 0x76340000
 
 # require os code to explicitly request A/W version of structs/functions
index d320705..881f506 100644 (file)
@@ -1,58 +1,58 @@
 LIBRARY d3d8thk
 EXPORTS
-       OsThunkD3dContextCreate = NtGdiD3dContextCreate@16
-       OsThunkD3dContextDestroy = NtGdiD3dContextDestroy@4
-       OsThunkD3dContextDestroyAll = NtGdiD3dContextDestroyAll@4
-       OsThunkD3dDrawPrimitives2 = NtGdiD3dDrawPrimitives2@28
-       OsThunkD3dValidateTextureStageState = NtGdiD3dValidateTextureStageState@4
-       OsThunkDdAddAttachedSurface = NtGdiDdAddAttachedSurface@12
-       OsThunkDdAlphaBlt = NtGdiDdAlphaBlt@12
-       OsThunkDdAttachSurface = NtGdiDdAttachSurface@8
-       OsThunkDdBeginMoCompFrame = NtGdiDdBeginMoCompFrame@8
-       OsThunkDdBlt = NtGdiDdBlt@12
-       OsThunkDdCanCreateD3DBuffer = NtGdiDdCanCreateD3DBuffer@8
-       OsThunkDdCanCreateSurface = NtGdiDdCanCreateSurface@8
-       OsThunkDdColorControl = NtGdiDdColorControl@8
-       OsThunkDdCreateD3DBuffer = NtGdiDdCreateD3DBuffer@32
-       OsThunkDdCreateDirectDrawObject = NtGdiDdCreateDirectDrawObject@4
-       OsThunkDdCreateMoComp = NtGdiDdCreateMoComp@8
-       OsThunkDdCreateSurface = NtGdiDdCreateSurface@32
-       OsThunkDdCreateSurfaceEx = NtGdiDdCreateSurfaceEx@12
-       OsThunkDdCreateSurfaceObject = NtGdiDdCreateSurfaceObject@24
-       OsThunkDdDeleteDirectDrawObject = NtGdiDdDeleteDirectDrawObject@4
-       OsThunkDdDeleteSurfaceObject = NtGdiDdDeleteSurfaceObject@4
-       OsThunkDdDestroyD3DBuffer = NtGdiDdDestroyD3DBuffer@4
-       OsThunkDdDestroyMoComp = NtGdiDdDestroyMoComp@8
-       OsThunkDdDestroySurface = NtGdiDdDestroySurface@8
-       OsThunkDdEndMoCompFrame = NtGdiDdEndMoCompFrame@8
-       OsThunkDdFlip = NtGdiDdFlip@20
-       OsThunkDdFlipToGDISurface = NtGdiDdFlipToGDISurface@8
-       OsThunkDdGetAvailDriverMemory = NtGdiDdGetAvailDriverMemory@8
-       OsThunkDdGetBltStatus = NtGdiDdGetBltStatus@8
-       OsThunkDdGetDC = NtGdiDdGetDC@8
-       OsThunkDdGetDriverInfo = NtGdiDdGetDriverInfo@8
-       OsThunkDdGetDriverState = NtGdiDdGetDriverState@4
-       OsThunkDdGetDxHandle = NtGdiDdGetDxHandle@12
-       OsThunkDdGetFlipStatus = NtGdiDdGetFlipStatus@8
-       OsThunkDdGetInternalMoCompInfo = NtGdiDdGetInternalMoCompInfo@8
-       OsThunkDdGetMoCompBuffInfo = NtGdiDdGetMoCompBuffInfo@8
-       OsThunkDdGetMoCompFormats = NtGdiDdGetMoCompFormats@8
-       OsThunkDdGetMoCompGuids = NtGdiDdGetMoCompGuids@8
-       OsThunkDdGetScanLine = NtGdiDdGetScanLine@8
-       OsThunkDdLock = NtGdiDdLock@12
-       OsThunkDdLockD3D = NtGdiDdLockD3D@8
-       OsThunkDdQueryDirectDrawObject = NtGdiDdQueryDirectDrawObject@44
-       OsThunkDdQueryMoCompStatus = NtGdiDdQueryMoCompStatus@8
-       OsThunkDdReenableDirectDrawObject = NtGdiDdReenableDirectDrawObject@8
-       OsThunkDdReleaseDC = NtGdiDdReleaseDC@4
-       OsThunkDdRenderMoComp = NtGdiDdRenderMoComp@8
-       OsThunkDdResetVisrgn = NtGdiDdResetVisrgn@8
-       OsThunkDdSetColorKey = NtGdiDdSetColorKey@8
-       OsThunkDdSetExclusiveMode = NtGdiDdSetExclusiveMode@8
-       OsThunkDdSetGammaRamp = NtGdiDdSetGammaRamp@12
-       OsThunkDdSetOverlayPosition = NtGdiDdSetOverlayPosition@12
-       OsThunkDdUnattachSurface = NtGdiDdUnattachSurface@8
-       OsThunkDdUnlock = NtGdiDdUnlock@8
-       OsThunkDdUnlockD3D = NtGdiDdUnlockD3D@8
-       OsThunkDdUpdateOverlay = NtGdiDdUpdateOverlay@12
-       OsThunkDdWaitForVerticalBlank = NtGdiDdWaitForVerticalBlank@8
+       OsThunkD3dContextCreate@16 = NtGdiD3dContextCreate@16
+       OsThunkD3dContextDestroy@4 = NtGdiD3dContextDestroy@4
+       OsThunkD3dContextDestroyAll@4 = NtGdiD3dContextDestroyAll@4
+       OsThunkD3dDrawPrimitives2@28 = NtGdiD3dDrawPrimitives2@28
+       OsThunkD3dValidateTextureStageState@4 = NtGdiD3dValidateTextureStageState@4
+       OsThunkDdAddAttachedSurface@12 = NtGdiDdAddAttachedSurface@12
+       OsThunkDdAlphaBlt@12 = NtGdiDdAlphaBlt@12
+       OsThunkDdAttachSurface@8 = NtGdiDdAttachSurface@8
+       OsThunkDdBeginMoCompFrame@8 = NtGdiDdBeginMoCompFrame@8
+       OsThunkDdBlt@12 = NtGdiDdBlt@12
+       OsThunkDdCanCreateD3DBuffer@8 = NtGdiDdCanCreateD3DBuffer@8
+       OsThunkDdCanCreateSurface@8 = NtGdiDdCanCreateSurface@8
+       OsThunkDdColorControl@8 = NtGdiDdColorControl@8
+       OsThunkDdCreateD3DBuffer@32 = NtGdiDdCreateD3DBuffer@32
+       OsThunkDdCreateDirectDrawObject@4 = NtGdiDdCreateDirectDrawObject@4
+       OsThunkDdCreateMoComp@8 = NtGdiDdCreateMoComp@8
+       OsThunkDdCreateSurface@32 = NtGdiDdCreateSurface@32
+       OsThunkDdCreateSurfaceEx@12 = NtGdiDdCreateSurfaceEx@12
+       OsThunkDdCreateSurfaceObject@24 = NtGdiDdCreateSurfaceObject@24
+       OsThunkDdDeleteDirectDrawObject@4 = NtGdiDdDeleteDirectDrawObject@4
+       OsThunkDdDeleteSurfaceObject@4 = NtGdiDdDeleteSurfaceObject@4
+       OsThunkDdDestroyD3DBuffer@4 = NtGdiDdDestroyD3DBuffer@4
+       OsThunkDdDestroyMoComp@8 = NtGdiDdDestroyMoComp@8
+       OsThunkDdDestroySurface@8 = NtGdiDdDestroySurface@8
+       OsThunkDdEndMoCompFrame@8 = NtGdiDdEndMoCompFrame@8
+       OsThunkDdFlip@20 = NtGdiDdFlip@20
+       OsThunkDdFlipToGDISurface@8 = NtGdiDdFlipToGDISurface@8
+       OsThunkDdGetAvailDriverMemory@8 = NtGdiDdGetAvailDriverMemory@8
+       OsThunkDdGetBltStatus@8 = NtGdiDdGetBltStatus@8
+       OsThunkDdGetDC@8 = NtGdiDdGetDC@8
+       OsThunkDdGetDriverInfo@8 = NtGdiDdGetDriverInfo@8
+       OsThunkDdGetDriverState@4 = NtGdiDdGetDriverState@4
+       OsThunkDdGetDxHandle@12 = NtGdiDdGetDxHandle@12
+       OsThunkDdGetFlipStatus@8 = NtGdiDdGetFlipStatus@8
+       OsThunkDdGetInternalMoCompInfo@8 = NtGdiDdGetInternalMoCompInfo@8
+       OsThunkDdGetMoCompBuffInfo@8 = NtGdiDdGetMoCompBuffInfo@8
+       OsThunkDdGetMoCompFormats@8 = NtGdiDdGetMoCompFormats@8
+       OsThunkDdGetMoCompGuids@8 = NtGdiDdGetMoCompGuids@8
+       OsThunkDdGetScanLine@8 = NtGdiDdGetScanLine@8
+       OsThunkDdLock@12 = NtGdiDdLock@12
+       OsThunkDdLockD3D@8 = NtGdiDdLockD3D@8
+       OsThunkDdQueryDirectDrawObject@44 = NtGdiDdQueryDirectDrawObject@44
+       OsThunkDdQueryMoCompStatus@8 = NtGdiDdQueryMoCompStatus@8
+       OsThunkDdReenableDirectDrawObject@8 = NtGdiDdReenableDirectDrawObject@8
+       OsThunkDdReleaseDC@4 = NtGdiDdReleaseDC@4
+       OsThunkDdRenderMoComp@8 = NtGdiDdRenderMoComp@8
+       OsThunkDdResetVisrgn@8 = NtGdiDdResetVisrgn@8
+       OsThunkDdSetColorKey@8 = NtGdiDdSetColorKey@8
+       OsThunkDdSetExclusiveMode@8 = NtGdiDdSetExclusiveMode@8
+       OsThunkDdSetGammaRamp@12 = NtGdiDdSetGammaRamp@12
+       OsThunkDdSetOverlayPosition@12 = NtGdiDdSetOverlayPosition@12
+       OsThunkDdUnattachSurface@8 = NtGdiDdUnattachSurface@8
+       OsThunkDdUnlock@8 = NtGdiDdUnlock@8
+       OsThunkDdUnlockD3D@8 = NtGdiDdUnlockD3D@8
+       OsThunkDdUpdateOverlay@12 = NtGdiDdUpdateOverlay@12
+       OsThunkDdWaitForVerticalBlank@8 = NtGdiDdWaitForVerticalBlank@8
diff --git a/reactos/lib/d3d8thk/d3d8thk.edf b/reactos/lib/d3d8thk/d3d8thk.edf
new file mode 100644 (file)
index 0000000..d320705
--- /dev/null
@@ -0,0 +1,58 @@
+LIBRARY d3d8thk
+EXPORTS
+       OsThunkD3dContextCreate = NtGdiD3dContextCreate@16
+       OsThunkD3dContextDestroy = NtGdiD3dContextDestroy@4
+       OsThunkD3dContextDestroyAll = NtGdiD3dContextDestroyAll@4
+       OsThunkD3dDrawPrimitives2 = NtGdiD3dDrawPrimitives2@28
+       OsThunkD3dValidateTextureStageState = NtGdiD3dValidateTextureStageState@4
+       OsThunkDdAddAttachedSurface = NtGdiDdAddAttachedSurface@12
+       OsThunkDdAlphaBlt = NtGdiDdAlphaBlt@12
+       OsThunkDdAttachSurface = NtGdiDdAttachSurface@8
+       OsThunkDdBeginMoCompFrame = NtGdiDdBeginMoCompFrame@8
+       OsThunkDdBlt = NtGdiDdBlt@12
+       OsThunkDdCanCreateD3DBuffer = NtGdiDdCanCreateD3DBuffer@8
+       OsThunkDdCanCreateSurface = NtGdiDdCanCreateSurface@8
+       OsThunkDdColorControl = NtGdiDdColorControl@8
+       OsThunkDdCreateD3DBuffer = NtGdiDdCreateD3DBuffer@32
+       OsThunkDdCreateDirectDrawObject = NtGdiDdCreateDirectDrawObject@4
+       OsThunkDdCreateMoComp = NtGdiDdCreateMoComp@8
+       OsThunkDdCreateSurface = NtGdiDdCreateSurface@32
+       OsThunkDdCreateSurfaceEx = NtGdiDdCreateSurfaceEx@12
+       OsThunkDdCreateSurfaceObject = NtGdiDdCreateSurfaceObject@24
+       OsThunkDdDeleteDirectDrawObject = NtGdiDdDeleteDirectDrawObject@4
+       OsThunkDdDeleteSurfaceObject = NtGdiDdDeleteSurfaceObject@4
+       OsThunkDdDestroyD3DBuffer = NtGdiDdDestroyD3DBuffer@4
+       OsThunkDdDestroyMoComp = NtGdiDdDestroyMoComp@8
+       OsThunkDdDestroySurface = NtGdiDdDestroySurface@8
+       OsThunkDdEndMoCompFrame = NtGdiDdEndMoCompFrame@8
+       OsThunkDdFlip = NtGdiDdFlip@20
+       OsThunkDdFlipToGDISurface = NtGdiDdFlipToGDISurface@8
+       OsThunkDdGetAvailDriverMemory = NtGdiDdGetAvailDriverMemory@8
+       OsThunkDdGetBltStatus = NtGdiDdGetBltStatus@8
+       OsThunkDdGetDC = NtGdiDdGetDC@8
+       OsThunkDdGetDriverInfo = NtGdiDdGetDriverInfo@8
+       OsThunkDdGetDriverState = NtGdiDdGetDriverState@4
+       OsThunkDdGetDxHandle = NtGdiDdGetDxHandle@12
+       OsThunkDdGetFlipStatus = NtGdiDdGetFlipStatus@8
+       OsThunkDdGetInternalMoCompInfo = NtGdiDdGetInternalMoCompInfo@8
+       OsThunkDdGetMoCompBuffInfo = NtGdiDdGetMoCompBuffInfo@8
+       OsThunkDdGetMoCompFormats = NtGdiDdGetMoCompFormats@8
+       OsThunkDdGetMoCompGuids = NtGdiDdGetMoCompGuids@8
+       OsThunkDdGetScanLine = NtGdiDdGetScanLine@8
+       OsThunkDdLock = NtGdiDdLock@12
+       OsThunkDdLockD3D = NtGdiDdLockD3D@8
+       OsThunkDdQueryDirectDrawObject = NtGdiDdQueryDirectDrawObject@44
+       OsThunkDdQueryMoCompStatus = NtGdiDdQueryMoCompStatus@8
+       OsThunkDdReenableDirectDrawObject = NtGdiDdReenableDirectDrawObject@8
+       OsThunkDdReleaseDC = NtGdiDdReleaseDC@4
+       OsThunkDdRenderMoComp = NtGdiDdRenderMoComp@8
+       OsThunkDdResetVisrgn = NtGdiDdResetVisrgn@8
+       OsThunkDdSetColorKey = NtGdiDdSetColorKey@8
+       OsThunkDdSetExclusiveMode = NtGdiDdSetExclusiveMode@8
+       OsThunkDdSetGammaRamp = NtGdiDdSetGammaRamp@12
+       OsThunkDdSetOverlayPosition = NtGdiDdSetOverlayPosition@12
+       OsThunkDdUnattachSurface = NtGdiDdUnattachSurface@8
+       OsThunkDdUnlock = NtGdiDdUnlock@8
+       OsThunkDdUnlockD3D = NtGdiDdUnlockD3D@8
+       OsThunkDdUpdateOverlay = NtGdiDdUpdateOverlay@12
+       OsThunkDdWaitForVerticalBlank = NtGdiDdWaitForVerticalBlank@8
index ef9f0ac..73f55ed 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: gdi32.def,v 1.10 2003/09/12 17:51:46 vizzini Exp $
+; $Id: gdi32.def,v 1.11 2003/10/28 19:30:08 gvg Exp $
 ;
 ; gdi32.def
 ;
@@ -90,63 +90,6 @@ CreateScalableFontResourceA@16
 CreateScalableFontResourceW@16
 CreateSolidBrush@4
 DPtoLP@12
-DxgGenericThunk@24
-D3DContextCreate@16
-D3DContextDestroy@4
-D3DContextDestroyAll@0
-D3DValidateTextureStageState@4
-D3DDrawPrimitives2@28
-D3DGetDriverState@4
-DdAddAttachedSurface@12
-DdAlphaBlt@12
-DdDdAttachSurface@8
-DdBeginMoCompFrame@8
-DdBlt@12
-DdCanCreateSurface@8
-DdCanCreateD3DBuffer@8
-DdColorControl@8
-DdDdCreateDirectDrawObject@4
-DdCreateSurface@32
-DdCreateD3DBuffer@32
-DdCreateMoComp@8
-DdDdCreateSurfaceObject@24
-DdDdDeleteDirectDrawObject@4
-DdDdDeleteSurfaceObject@4
-DdDestroyMoComp@8
-DdDestroySurface@8
-DdDestroyD3DBuffer@4
-DdEndMoCompFrame@8
-DdFlip@20
-DdFlipToGDISurface@8
-DdGetAvailDriverMemory@8
-DdGetBltStatus@8
-DdDdGetDC@8
-DdGetDriverInfo@8
-DdDdGetDxHandle@12
-DdGetFlipStatus@8
-DdGetInternalMoCompInfo@8
-DdGetMoCompBuffInfo@8
-DdGetMoCompGuids@8
-DdGetMoCompFormats@8
-DdGetScanLine@8
-DdLock@12
-DdLockD3D@8
-DdDdQueryDirectDrawObject@44
-DdQueryMoCompStatus@8
-DdDdReenableDirectDrawObject@8
-DdDdReleaseDC@4
-DdRenderMoComp@8
-DdDdResetVisrgn@8
-DdSetColorKey@8
-DdSetExclusiveMode@8
-DdDdSetGammaRamp@12
-DdCreateSurfaceEx@12
-DdSetOverlayPosition@12
-DdDdUnattachSurface@8
-DdUnlock@8
-DdUnlockD3D@8
-DdUpdateOverlay@12
-DdWaitForVerticalBlank@8
 DeleteColorSpace@4
 DeleteDC@4
 DeleteEnhMetaFile@4
index 9264bb6..3a962d0 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: gdi32.edf,v 1.8 2003/09/12 17:51:46 vizzini Exp $
+; $Id: gdi32.edf,v 1.9 2003/10/28 19:30:08 gvg Exp $
 ;
 ; gdi32.def
 ;
@@ -90,63 +90,6 @@ CreateScalableFontResourceA=CreateScalableFontResourceA@16
 CreateScalableFontResourceW=CreateScalableFontResourceW@16
 CreateSolidBrush=CreateSolidBrush@4
 DPtoLP=DPtoLP@12
-DdEntry0=DxgGenericThunk@24
-DdEntry1=D3DContextCreate@16
-DdEntry2=D3DContextDestroy@4
-DdEntry3=D3DContextDestroyAll@0
-DdEntry4=D3DValidateTextureStageState@4
-DdEntry5=D3DDrawPrimitives2@28
-DdEntry6=D3DGetDriverState@4
-DdEntry7=DdAddAttachedSurface@12
-DdEntry8=DdAlphaBlt@12
-DdEntry9=DdDdAttachSurface@8
-DdEntry10=DdBeginMoCompFrame@8
-DdEntry11=DdBlt@12
-DdEntry12=DdCanCreateSurface@8
-DdEntry13=DdCanCreateD3DBuffer@8
-DdEntry14=DdColorControl@8
-DdEntry15=DdDdCreateDirectDrawObject@4
-DdEntry16=DdCreateSurface@32
-DdEntry17=DdCreateD3DBuffer@32
-DdEntry18=DdCreateMoComp@8
-DdEntry19=DdDdCreateSurfaceObject@24
-DdEntry20=DdDdDeleteDirectDrawObject@4
-DdEntry21=DdDdDeleteSurfaceObject@4
-DdEntry22=DdDestroyMoComp@8
-DdEntry23=DdDestroySurface@8
-DdEntry24=DdDestroyD3DBuffer@4
-DdEntry25=DdEndMoCompFrame@8
-DdEntry26=DdFlip@20
-DdEntry27=DdFlipToGDISurface@8
-DdEntry28=DdGetAvailDriverMemory@8
-DdEntry29=DdGetBltStatus@8
-DdEntry30=DdDdGetDC@8
-DdEntry31=DdGetDriverInfo@8
-DdEntry32=DdDdGetDxHandle@12
-DdEntry33=DdGetFlipStatus@8
-DdEntry34=DdGetInternalMoCompInfo@8
-DdEntry35=DdGetMoCompBuffInfo@8
-DdEntry36=DdGetMoCompGuids@8
-DdEntry37=DdGetMoCompFormats@8
-DdEntry38=DdGetScanLine@8
-DdEntry39=DdLock@12
-DdEntry40=DdLockD3D@8
-DdEntry41=DdDdQueryDirectDrawObject@44
-DdEntry42=DdQueryMoCompStatus@8
-DdEntry43=DdDdReenableDirectDrawObject@8
-DdEntry44=DdDdReleaseDC@4
-DdEntry45=DdRenderMoComp@8
-DdEntry46=DdDdResetVisrgn@8
-DdEntry47=DdSetColorKey@8
-DdEntry48=DdSetExclusiveMode@8
-DdEntry49=DdDdSetGammaRamp@12
-DdEntry50=DdCreateSurfaceEx@12
-DdEntry51=DdSetOverlayPosition@12
-DdEntry52=DdDdUnattachSurface@8
-DdEntry53=DdUnlock@8
-DdEntry54=DdUnlockD3D@8
-DdEntry55=DdUpdateOverlay@12
-DdEntry56=DdWaitForVerticalBlank@8
 DeleteColorSpace=DeleteColorSpace@4
 DeleteDC=DeleteDC@4
 DeleteEnhMetaFile=DeleteEnhMetaFile@4
index 466020b..056cde1 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: stubs.c,v 1.37 2003/09/12 22:17:06 gvg Exp $
+/* $Id: stubs.c,v 1.38 2003/10/28 19:30:08 gvg Exp $
  *
  * reactos/lib/gdi32/misc/stubs.c
  *
@@ -4462,723 +4462,6 @@ LPDDRAWI_DDRAWSURFACE_LCL pDDSLcl2
        return 0;
 }
 
-/*
- * @unimplemented
- */
-DWORD STDCALL DxgGenericThunk(ULONG_PTR ulIndex,
-ULONG_PTR ulHandle,
-SIZE_T *pdwSizeOfPtr1,
-PVOID pvPtr1,
-SIZE_T *pdwSizeOfPtr2,
-PVOID pvPtr2)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL STDCALL D3DContextCreate( 
-HANDLE hDirectDrawLocal,
-HANDLE hSurfColor,
-HANDLE hSurfZ,
-D3DNTHAL_CONTEXTCREATEI *pdcci
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL D3DContextDestroy( 
-LPD3DNTHAL_CONTEXTDESTROYDATA pContextDestroyData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL D3DContextDestroyAll(VOID)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL D3DValidateTextureStageState( 
-LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA pData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL D3DDrawPrimitives2( 
-HANDLE hCmdBuf,
-HANDLE hVBuf,
-LPD3DNTHAL_DRAWPRIMITIVES2DATA pded,
-FLATPTR *pfpVidMemCmd,
-DWORD *pdwSizeCmd,
-FLATPTR *pfpVidMemVtx,
-DWORD *pdwSizeVtx
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL D3DGetDriverState( 
-PDD_GETDRIVERSTATEDATA pdata
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdAddAttachedSurface( 
-HANDLE hSurface,
-HANDLE hSurfaceAttached,
-PDD_ADDATTACHEDSURFACEDATA puAddAttachedSurfaceData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdAlphaBlt(
-HANDLE hSurfaceDest, 
-HANDLE hSurfaceSrc,
-PDD_BLTDATA puBltData)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL STDCALL DdDdAttachSurface( /*rename it so it doesnt conflict */
-HANDLE hSurfaceFrom,
-HANDLE hSurfaceTo
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdBeginMoCompFrame( 
-HANDLE hMoComp,
-PDD_BEGINMOCOMPFRAMEDATA puBeginFrameData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdBlt( 
-HANDLE hSurfaceDest,
-HANDLE hSurfaceSrc,
-PDD_BLTDATA puBltData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdCanCreateSurface( 
-HANDLE hDirectDraw,
-PDD_CANCREATESURFACEDATA puCanCreateSurfaceData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdCanCreateD3DBuffer( 
-HANDLE hDirectDraw,
-PDD_CANCREATESURFACEDATA puCanCreateSurfaceData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdColorControl( 
-HANDLE hSurface,
-PDD_COLORCONTROLDATA puColorControlData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-HANDLE STDCALL DdDdCreateDirectDrawObject( /*rename it so it doesnt conflict */
-HDC hdc
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdCreateSurface( 
-HANDLE hDirectDraw,
-HANDLE *hSurface,
-DDSURFACEDESC *puSurfaceDescription,
-DD_SURFACE_GLOBAL *puSurfaceGlobalData,
-DD_SURFACE_LOCAL *puSurfaceLocalData,
-DD_SURFACE_MORE *puSurfaceMoreData,
-DD_CREATESURFACEDATA *puCreateSurfaceData,
-HANDLE *puhSurface
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdCreateD3DBuffer( 
-HANDLE hDirectDraw,
-HANDLE *hSurface,
-DDSURFACEDESC *puSurfaceDescription,
-DD_SURFACE_GLOBAL *puSurfaceGlobalData,
-DD_SURFACE_LOCAL *puSurfaceLocalData,
-DD_SURFACE_MORE *puSurfaceMoreData,
-DD_CREATESURFACEDATA *puCreateSurfaceData,
-HANDLE *puhSurface
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-HANDLE STDCALL DdCreateMoComp( 
-HANDLE hDirectDraw,
-PDD_CREATEMOCOMPDATA puCreateMoCompData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-HANDLE STDCALL DdDdCreateSurfaceObject( /*rename it so it doesnt conflict */
-HANDLE hDirectDrawLocal,
-HANDLE hSurface,
-PDD_SURFACE_LOCAL puSurfaceLocal,
-PDD_SURFACE_MORE puSurfaceMore,
-PDD_SURFACE_GLOBAL puSurfaceGlobal,
-BOOL bComplete
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL STDCALL DdDdDeleteDirectDrawObject( /*rename it so it doesnt conflict */
-HANDLE hDirectDrawLocal
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL STDCALL DdDdDeleteSurfaceObject( /*rename it so it doesnt conflict */
-HANDLE hSurface
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdDestroyMoComp( 
-HANDLE hMoComp,
-PDD_DESTROYMOCOMPDATA puBeginFrameData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdDestroySurface( 
-HANDLE hSurface,
-BOOL bRealDestroy
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdDestroyD3DBuffer( 
-HANDLE hSurface
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdEndMoCompFrame( 
-HANDLE hMoComp,
-PDD_ENDMOCOMPFRAMEDATA puEndFrameData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdFlip( 
-HANDLE hSurfaceCurrent,
-HANDLE hSurfaceTarget,
-HANDLE hSurfaceCurrentLeft,
-HANDLE hSurfaceTargetLeft,
-PDD_FLIPDATA puFlipData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdFlipToGDISurface( 
-HANDLE hDirectDraw,
-PDD_FLIPTOGDISURFACEDATA puFlipToGDISurfaceData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdGetAvailDriverMemory( 
-HANDLE hDirectDraw,
-PDD_GETAVAILDRIVERMEMORYDATA puGetAvailDriverMemoryData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdGetBltStatus( 
-HANDLE hSurface,
-PDD_GETBLTSTATUSDATA puGetBltStatusData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-HDC STDCALL DdDdGetDC( /*rename it so it doesnt conflict */
-HANDLE hSurface,
-PALETTEENTRY *puColorTable
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdGetDriverInfo( 
-HANDLE hDirectDraw,
-PDD_GETDRIVERINFODATA puGetDriverInfoData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdDdGetDxHandle( /*rename it so it doesnt conflict */
-HANDLE hDirectDraw,
-HANDLE hSurface,
-BOOL bRelease
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdGetFlipStatus( 
-HANDLE hSurface,
-PDD_GETFLIPSTATUSDATA puGetFlipStatusData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdGetInternalMoCompInfo( 
-HANDLE hDirectDraw,
-PDD_GETINTERNALMOCOMPDATA puGetInternalData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdGetMoCompBuffInfo( 
-HANDLE hDirectDraw,
-PDD_GETMOCOMPCOMPBUFFDATA puGetBuffData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdGetMoCompGuids( 
-HANDLE hDirectDraw,
-PDD_GETMOCOMPGUIDSDATA puGetMoCompGuidsData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdGetMoCompFormats( 
-HANDLE hDirectDraw,
-PDD_GETMOCOMPFORMATSDATA puGetMoCompFormatsData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdGetScanLine( 
-HANDLE hDirectDraw,
-PDD_GETSCANLINEDATA puGetScanLineData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdLock( 
-HANDLE hSurface,
-PDD_LOCKDATA puLockData,
-HDC hdcClip
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdLockD3D( 
-HANDLE hSurface,
-PDD_LOCKDATA puLockData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL STDCALL DdDdQueryDirectDrawObject(  /*rename it so it doesnt conflict */
-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
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdQueryMoCompStatus( 
-HANDLE hMoComp,
-PDD_QUERYMOCOMPSTATUSDATA puQueryMoCompStatusData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL STDCALL DdDdReenableDirectDrawObject( /*rename it so it doesnt conflict */
-HANDLE hDirectDrawLocal,
-BOOL *pubNewMode
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL STDCALL DdDdReleaseDC( /*rename it so it doesnt conflict */
-HANDLE hSurface
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdRenderMoComp( 
-HANDLE hMoComp,
-PDD_RENDERMOCOMPDATA puRenderMoCompData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL STDCALL DdDdResetVisrgn( /*rename it so it doesnt conflict */
-HANDLE hSurface,
-HWND hwnd
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdSetColorKey( 
-HANDLE hSurface,
-PDD_SETCOLORKEYDATA puSetColorKeyData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdSetExclusiveMode( 
-HANDLE hDirectDraw,
-PDD_SETEXCLUSIVEMODEDATA puSetExclusiveModeData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL STDCALL DdDdSetGammaRamp( /*rename it so it doesnt conflict */
-HANDLE hDirectDraw,
-HDC hdc,
-LPVOID lpGammaRamp
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdCreateSurfaceEx( 
-HANDLE hDirectDraw,
-HANDLE hSurface,
-DWORD dwSurfaceHandle
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdSetOverlayPosition( 
-HANDLE hSurfaceSource,
-HANDLE hSurfaceDestination,
-PDD_SETOVERLAYPOSITIONDATA puSetOverlayPositionData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-VOID STDCALL DdDdUnattachSurface( /*rename it so it doesnt conflict */
-HANDLE hSurface,
-HANDLE hSurfaceAttached
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdUnlock( 
-HANDLE hSurface,
-PDD_UNLOCKDATA puUnlockData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdUnlockD3D( 
-HANDLE hSurface,
-PDD_UNLOCKDATA puUnlockData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdUpdateOverlay( 
-HANDLE hSurfaceDestination,
-HANDLE hSurfaceSource,
-PDD_UPDATEOVERLAYDATA puUpdateOverlayData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD STDCALL DdWaitForVerticalBlank( 
-HANDLE hDirectDraw,
-PDD_WAITFORVERTICALBLANKDATA puWaitForVerticalBlankData
-)
-{
-       SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-       return 0;
-}
-
 /*
  * @unimplemented
  */
index b1923df..54240ff 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.80 2003/10/25 20:34:34 gvg Exp $
+# $Id: makefile,v 1.81 2003/10/28 19:30:08 gvg Exp $
 
 PATH_TO_TOP = ../..
 
@@ -72,7 +72,7 @@ DIB_OBJECTS = dib/dib.o dib/dib1bpp.o dib/dib4bpp.o dib/dib8bpp.o dib/dib16bpp.o
 
 STUBS_OBJECTS = stubs/stubs.o stubs/xpstubs.o
 
-NTDDRAW_OBJECTS = ntddraw/stubs.o
+NTDDRAW_OBJECTS = ntddraw/stubs.o ntddraw/ddraw.o
 
 TARGET_OBJECTS = \
   $(ENG_OBJECTS) $(MAIN_OBJECTS) $(MISC_OBJECTS) $(LDR_OBJECTS) \
diff --git a/reactos/subsys/win32k/ntddraw/ddraw.c b/reactos/subsys/win32k/ntddraw/ddraw.c
new file mode 100644 (file)
index 0000000..bda7125
--- /dev/null
@@ -0,0 +1,331 @@
+/* 
+ *
+ * COPYRIGHT:        See COPYING in the top level directory
+ * PROJECT:          ReactOS kernel
+ * PURPOSE:          Native DirectDraw implementation
+ * FILE:             subsys/win32k/ntddraw/ddraw.c
+ * PROGRAMER:        Peter Bajusz (hyp-x@stormregion.com)
+ * REVISION HISTORY:
+ *       25-10-2003  PB  Created
+ */
+#include <ddk/ntddk.h>
+#include <win32k/win32k.h>
+#include <win32k/gdiobj.h>
+
+#define NDEBUG
+#include <debug.h>
+
+#define GDI_OBJECT_TYPE_DIRECTDRAW    0x00600000
+#define GDI_OBJECT_TYPE_DD_SURFACE    0x00610000
+#define GDI_OBJECT_TYPE_DD_VIDEOPORT  0x00620000
+#define GDI_OBJECT_TYPE_DD_PALETTE    0x00630000
+#define GDI_OBJECT_TYPE_DD_CLIPPER    0x00640000
+#define GDI_OBJECT_TYPE_DD_MOTIONCOMP 0x00650000
+
+/************************************************************************/
+/* DIRECT DRAW OBJECT                                                   */
+/************************************************************************/
+
+typedef struct
+{
+       DD_DIRECTDRAW_LOCAL Local;
+       DD_DIRECTDRAW_GLOBAL Global;
+       // Drv callbacks
+       PGD_GETDIRECTDRAWINFO           DrvGetDirectDrawInfo;
+       PGD_DISABLEDIRECTDRAW           DrvDisableDirectDraw;
+       // DD callbacks
+       PDD_CREATESURFACE               DdCreateSurface;
+       PDD_SETCOLORKEY                 DdDrvSetColorKey; // ?????
+       PDD_WAITFORVERTICALBLANK        DdWaitForVerticalBlank;
+       PDD_CANCREATESURFACE            DdCanCreateSurface;
+       PDD_CREATEPALETTE               DdCreatePalette;
+       PDD_GETSCANLINE                 DdGetScanLine;
+       PDD_MAPMEMORY                   DdMapMemory;
+       // Surface callbacks
+       PDD_SURFCB_DESTROYSURFACE           DdDestroySurface;
+       PDD_SURFCB_FLIP                 DdFlip;
+       PDD_SURFCB_SETCLIPLIST          DdSetClipList;
+       PDD_SURFCB_LOCK                 DdLock;
+       PDD_SURFCB_UNLOCK               DdUnlock;
+       PDD_SURFCB_BLT                  DdBlt;
+       PDD_SURFCB_SETCOLORKEY          DdSetColorKey;
+       PDD_SURFCB_ADDATTACHEDSURFACE   DdAddAttachedSurface;
+       PDD_SURFCB_GETBLTSTATUS         DdGetBltStatus;
+       PDD_SURFCB_GETFLIPSTATUS        DdGetFlipStatus;
+       PDD_SURFCB_UPDATEOVERLAY        DdUpdateOverlay;
+       PDD_SURFCB_SETOVERLAYPOSITION   DdSetOverlayPosition;
+       PDD_SURFCB_SETPALETTE           DdSetPalette;
+       // Palette callbacks
+       PDD_PALCB_DESTROYPALETTE        DdDestroyPalette;
+       PDD_PALCB_SETENTRIES            DdSetEntries;
+       // D3D Device context callbacks
+       PD3DNTHAL_CONTEXTCREATECB       D3dContextCreate;
+       PD3DNTHAL_CONTEXTDESTROYCB      D3dContextDestroy;
+       // D3D Buffer callbacks
+       PDD_CANCREATESURFACE            DdCanCreateD3DBuffer;
+       PDD_CREATESURFACE               DdCreateD3DBuffer;
+       PDD_SURFCB_DESTROYSURFACE       DdDestroyD3DBuffer;
+       PDD_SURFCB_LOCK                 DdLockD3DBuffer;
+       PDD_SURFCB_UNLOCK               DdUnlockD3DBuffer;
+} DD_DIRECTDRAW, *PDD_DIRECTDRAW;
+
+static BOOL FASTCALL DirectDrawCleanup(PDD_DIRECTDRAW pDirectDraw)
+{
+       pDirectDraw->DrvDisableDirectDraw(pDirectDraw->Global.dhpdev);
+       return TRUE;
+}
+
+HANDLE STDCALL NtGdiDdCreateDirectDrawObject(      
+    HDC hdc
+)
+{
+       DD_CALLBACKS callbacks;
+       DD_SURFACECALLBACKS surface_callbacks;
+       DD_PALETTECALLBACKS palette_callbacks;
+
+       RtlZeroMemory(&callbacks, sizeof(callbacks));
+       callbacks.dwSize = sizeof(callbacks);
+       RtlZeroMemory(&surface_callbacks, sizeof(surface_callbacks));
+       surface_callbacks.dwSize = sizeof(surface_callbacks);
+       RtlZeroMemory(&palette_callbacks, sizeof(palette_callbacks));
+       palette_callbacks.dwSize = sizeof(palette_callbacks);
+
+       DC *pDC = DC_LockDc(hdc);
+       if (!pDC)
+               return NULL;
+
+       if (!pDC->DriverFunctions.EnableDirectDraw)
+       {
+               // Driver doesn't support DirectDraw
+               DC_UnlockDc(hdc);
+               return NULL;
+       }
+
+       BOOL success = pDC->DriverFunctions.EnableDirectDraw(
+               pDC->PDev, &callbacks, &surface_callbacks, &palette_callbacks);
+
+       if (!success)
+       {
+               // DirectDraw creation failed
+               DC_UnlockDc(hdc);
+               return NULL;
+       }
+
+       HANDLE hDirectDraw = GDIOBJ_AllocObj(sizeof(DD_DIRECTDRAW), GDI_OBJECT_TYPE_DIRECTDRAW, (GDICLEANUPPROC)DirectDrawCleanup);
+       PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(hDirectDraw, GDI_OBJECT_TYPE_DIRECTDRAW);
+
+       pDirectDraw->Global.dhpdev = pDC->PDev;
+       pDirectDraw->Local.lpGbl = &pDirectDraw->Global;
+
+       pDirectDraw->DrvGetDirectDrawInfo = pDC->DriverFunctions.GetDirectDrawInfo;
+       pDirectDraw->DrvDisableDirectDraw = pDC->DriverFunctions.DisableDirectDraw;
+
+       if (callbacks.dwFlags && DDHAL_CB32_CREATESURFACE)
+               pDirectDraw->DdCreateSurface = callbacks.CreateSurface;
+       if (callbacks.dwFlags && DDHAL_CB32_SETCOLORKEY)
+               pDirectDraw->DdDrvSetColorKey = callbacks.SetColorKey;
+       if (callbacks.dwFlags && DDHAL_CB32_WAITFORVERTICALBLANK)
+               pDirectDraw->DdWaitForVerticalBlank = callbacks.WaitForVerticalBlank;
+       if (callbacks.dwFlags && DDHAL_CB32_CANCREATESURFACE)
+               pDirectDraw->DdCanCreateSurface = callbacks.CanCreateSurface;
+       if (callbacks.dwFlags && DDHAL_CB32_CREATEPALETTE)
+               pDirectDraw->DdCreatePalette = callbacks.CreatePalette;
+       if (callbacks.dwFlags && DDHAL_CB32_GETSCANLINE)
+               pDirectDraw->DdGetScanLine = callbacks.GetScanLine;
+       if (callbacks.dwFlags && DDHAL_CB32_MAPMEMORY)
+               pDirectDraw->DdMapMemory = callbacks.MapMemory;
+
+       if (surface_callbacks.dwFlags && DDHAL_SURFCB32_DESTROYSURFACE)
+               pDirectDraw->DdDestroySurface = surface_callbacks.DestroySurface;
+       if (surface_callbacks.dwFlags && DDHAL_SURFCB32_FLIP)
+               pDirectDraw->DdFlip = surface_callbacks.Flip;
+       if (surface_callbacks.dwFlags && DDHAL_SURFCB32_SETCLIPLIST)
+               pDirectDraw->DdSetClipList = surface_callbacks.SetClipList;
+       if (surface_callbacks.dwFlags && DDHAL_SURFCB32_LOCK)
+               pDirectDraw->DdLock = surface_callbacks.Lock;
+       if (surface_callbacks.dwFlags && DDHAL_SURFCB32_UNLOCK)
+               pDirectDraw->DdUnlock = surface_callbacks.Unlock;
+       if (surface_callbacks.dwFlags && DDHAL_SURFCB32_BLT)
+               pDirectDraw->DdBlt = surface_callbacks.Blt;
+       if (surface_callbacks.dwFlags && DDHAL_SURFCB32_SETCOLORKEY)
+               pDirectDraw->DdSetColorKey = surface_callbacks.SetColorKey;
+       if (surface_callbacks.dwFlags && DDHAL_SURFCB32_ADDATTACHEDSURFACE)
+               pDirectDraw->DdAddAttachedSurface = surface_callbacks.AddAttachedSurface;
+       if (surface_callbacks.dwFlags && DDHAL_SURFCB32_GETBLTSTATUS)
+               pDirectDraw->DdGetBltStatus = surface_callbacks.GetBltStatus;
+       if (surface_callbacks.dwFlags && DDHAL_SURFCB32_GETFLIPSTATUS)
+               pDirectDraw->DdGetFlipStatus = surface_callbacks.GetFlipStatus;
+       if (surface_callbacks.dwFlags && DDHAL_SURFCB32_UPDATEOVERLAY)
+               pDirectDraw->DdUpdateOverlay = surface_callbacks.UpdateOverlay;
+       if (surface_callbacks.dwFlags && DDHAL_SURFCB32_SETOVERLAYPOSITION)
+               pDirectDraw->DdSetOverlayPosition = surface_callbacks.SetOverlayPosition;
+       if (surface_callbacks.dwFlags && DDHAL_SURFCB32_SETPALETTE)
+               pDirectDraw->DdSetPalette = surface_callbacks.SetPalette;
+
+       if (palette_callbacks.dwFlags && DDHAL_PALCB32_DESTROYPALETTE)
+               pDirectDraw->DdDestroyPalette = palette_callbacks.DestroyPalette;
+       if (palette_callbacks.dwFlags && DDHAL_PALCB32_SETENTRIES)
+               pDirectDraw->DdSetEntries = palette_callbacks.SetEntries;
+
+       GDIOBJ_UnlockObj(hDirectDraw, GDI_OBJECT_TYPE_DIRECTDRAW);
+       DC_UnlockDc(hdc);
+
+       return hDirectDraw;
+}
+
+BOOL STDCALL NtGdiDdDeleteDirectDrawObject(      
+    HANDLE hDirectDrawLocal
+)
+{
+       return GDIOBJ_FreeObj(hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW, 0);
+}
+
+BOOL STDCALL NtGdiDdQueryDirectDrawObject(      
+    HANDLE hDirectDrawLocal,
+    DD_HALINFO *pHalInfo,
+    DWORD *pCallBackFlags,
+    PD3DNTHAL_CALLBACKS puD3dCallbacks,
+    PD3DNTHAL_GLOBALDRIVERDATA puD3dDriverData,
+    PDD_D3DBUFCALLBACKS puD3dBufferCallbacks,
+    LPDDSURFACEDESC puD3dTextureFormats,
+    DWORD *puNumHeaps,
+    VIDEOMEMORY *puvmList,
+    DWORD *puNumFourCC,
+    DWORD *puFourCC
+)
+{
+       PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW);
+       if (!pDirectDraw)
+               return FALSE;
+
+       BOOL success = pDirectDraw->DrvGetDirectDrawInfo(
+               pDirectDraw->Global.dhpdev,
+               pHalInfo,
+               puNumHeaps,
+               puvmList,
+               puNumFourCC,
+               puFourCC);
+
+       if (!success)
+       {
+               GDIOBJ_UnlockObj(hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW);
+               return FALSE;
+       }
+
+       if (pHalInfo->lpD3DHALCallbacks)
+       {
+               RtlMoveMemory(puD3dCallbacks, pHalInfo->lpD3DHALCallbacks, sizeof(D3DNTHAL_CALLBACKS));
+               pDirectDraw->D3dContextCreate = puD3dCallbacks->ContextCreate;
+               pDirectDraw->D3dContextDestroy = puD3dCallbacks->ContextDestroy;
+       }
+
+       if (pHalInfo->lpD3DGlobalDriverData)
+       {
+               RtlMoveMemory(puD3dDriverData, pHalInfo->lpD3DGlobalDriverData, sizeof(D3DNTHAL_GLOBALDRIVERDATA));
+       }
+       
+       if (pHalInfo->lpD3DBufCallbacks)
+       {
+               RtlMoveMemory(puD3dBufferCallbacks, pHalInfo->lpD3DBufCallbacks, sizeof(DD_D3DBUFCALLBACKS));
+               pDirectDraw->DdCanCreateD3DBuffer = puD3dBufferCallbacks->CanCreateD3DBuffer;
+               pDirectDraw->DdCreateD3DBuffer = puD3dBufferCallbacks->CreateD3DBuffer;
+               pDirectDraw->DdDestroyD3DBuffer = puD3dBufferCallbacks->DestroyD3DBuffer;
+               pDirectDraw->DdLockD3DBuffer = puD3dBufferCallbacks->LockD3DBuffer;
+               pDirectDraw->DdUnlockD3DBuffer = puD3dBufferCallbacks->UnlockD3DBuffer;
+       }
+       
+       GDIOBJ_UnlockObj(hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW);
+
+       return TRUE;
+}
+
+/************************************************************************/
+/* SURFACE OBJECT                                                       */
+/************************************************************************/
+
+typedef struct
+{
+       DD_SURFACE_LOCAL Local;
+       DD_SURFACE_MORE More;
+       DD_SURFACE_GLOBAL Global;
+       DD_ATTACHLIST AttachList;
+       DD_ATTACHLIST AttachListFrom;
+       BOOL bComplete;
+} DD_SURFACE, *PDD_SURFACE;
+
+static BOOL FASTCALL DDSurfaceCleanup(PDD_SURFACE pSurface)
+{
+       //FIXME: implement
+       return TRUE;
+}
+
+HANDLE STDCALL NtGdiDdCreateSurfaceObject(      
+    HANDLE hDirectDrawLocal,
+    HANDLE hSurface,
+    PDD_SURFACE_LOCAL puSurfaceLocal,
+    PDD_SURFACE_MORE puSurfaceMore,
+    PDD_SURFACE_GLOBAL puSurfaceGlobal,
+    BOOL bComplete
+)
+{
+       PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW);
+       if (!pDirectDraw)
+               return NULL;
+
+       if (!hSurface)
+               hSurface = GDIOBJ_AllocObj(sizeof(DD_SURFACE), GDI_OBJECT_TYPE_DD_SURFACE, (GDICLEANUPPROC)DDSurfaceCleanup);
+
+       PDD_SURFACE pSurface = GDIOBJ_LockObj(hSurface, GDI_OBJECT_TYPE_DD_SURFACE);
+
+       RtlMoveMemory(&pSurface->Local, puSurfaceLocal, sizeof(DD_SURFACE_LOCAL));
+       RtlMoveMemory(&pSurface->More, puSurfaceMore, sizeof(DD_SURFACE_MORE));
+       RtlMoveMemory(&pSurface->Global, puSurfaceGlobal, sizeof(DD_SURFACE_GLOBAL));
+       pSurface->Local.lpGbl = &pSurface->Global;
+       pSurface->Local.lpSurfMore = &pSurface->More;
+       pSurface->Local.lpAttachList = NULL;
+       pSurface->Local.lpAttachListFrom = NULL;
+       pSurface->More.lpVideoPort = NULL;
+       // FIXME: figure out how to use this
+       pSurface->bComplete = bComplete;
+
+       GDIOBJ_UnlockObj(hSurface, GDI_OBJECT_TYPE_DD_SURFACE);
+       GDIOBJ_UnlockObj(hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW);
+
+       return hSurface;
+}
+
+BOOL STDCALL NtGdiDdDeleteSurfaceObject(      
+    HANDLE hSurface
+)
+{
+       return GDIOBJ_FreeObj(hSurface, GDI_OBJECT_TYPE_DD_SURFACE, 0);
+}
+
+/*
+BOOL STDCALL NtGdiDdAttachSurface(      
+    HANDLE hSurfaceFrom,
+    HANDLE hSurfaceTo
+)
+{
+       PDD_SURFACE pSurfaceFrom = GDIOBJ_LockObj(hSurfaceFrom, GDI_OBJECT_TYPE_DD_SURFACE);
+       if (!pSurfaceFrom)
+               return FALSE;
+       PDD_SURFACE pSurfaceTo = GDIOBJ_LockObj(hSurfaceTo, GDI_OBJECT_TYPE_DD_SURFACE);
+       if (!pSurfaceTo)
+       {
+               GDIOBJ_UnlockObj(hSurfaceTo, GDI_OBJECT_TYPE_DD_SURFACE);
+               return FALSE;
+       }
+
+       if (pSurfaceFrom->Local.lpAttachListFrom)
+       {
+               pSurfaceFrom->Local.lpAttachListFrom = pSurfaceFrom->AttachListFrom;
+       }
+
+       GDIOBJ_UnlockObj(hSurfaceFrom, GDI_OBJECT_TYPE_DD_SURFACE);
+       GDIOBJ_UnlockObj(hSurfaceTo, GDI_OBJECT_TYPE_DD_SURFACE);
+       return TRUE;
+}
+*/
+
+/* EOF */
index fdc4af7..a8fbe30 100644 (file)
 #include <debug.h>
 
 
-BOOL APIENTRY NtGdiD3dContextCreate(
+BOOL STDCALL NtGdiD3dContextCreate(
     HANDLE hDirectDrawLocal,
     HANDLE hSurfColor,
     HANDLE hSurfZ,
-    D3DNTHAL_CONTEXTCREATEDATA *pdcci
+    PD3DNTHAL_CONTEXTCREATEDATA pdcci
 )
 {
        UNIMPLEMENTED
@@ -27,8 +27,8 @@ BOOL APIENTRY NtGdiD3dContextCreate(
        return 0;
 }
 
-DWORD APIENTRY NtGdiD3dContextDestroy(      
-    LPD3DNTHAL_CONTEXTDESTROYDATA pContextDestroyData
+DWORD STDCALL NtGdiD3dContextDestroy(      
+    PD3DNTHAL_CONTEXTDESTROYDATA pContextDestroyData
 )
 {
        UNIMPLEMENTED
@@ -36,17 +36,18 @@ DWORD APIENTRY NtGdiD3dContextDestroy(
        return 0;
 }
 
-DWORD APIENTRY NtGdiD3dContextDestroyAll(VOID)
+DWORD STDCALL NtGdiD3dContextDestroyAll(VOID)
 {
+       /* This entry point is not supported on NT5 and ROS */
        UNIMPLEMENTED
 
        return 0;
 }
 
-DWORD APIENTRY NtGdiD3dDrawPrimitives2(      
+DWORD STDCALL NtGdiD3dDrawPrimitives2(      
     HANDLE hCmdBuf,
     HANDLE hVBuf,
-    LPD3DNTHAL_DRAWPRIMITIVES2DATA pded,
+    PD3DNTHAL_DRAWPRIMITIVES2DATA pded,
     FLATPTR *pfpVidMemCmd,
     DWORD *pdwSizeCmd,
     FLATPTR *pfpVidMemVtx,
@@ -58,8 +59,8 @@ DWORD APIENTRY NtGdiD3dDrawPrimitives2(
        return 0;
 }
 
-DWORD APIENTRY NtGdiD3dValidateTextureStageState(      
-    LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA pData
+DWORD STDCALL NtGdiD3dValidateTextureStageState(      
+    PD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA pData
 )
 {
        UNIMPLEMENTED
@@ -67,7 +68,7 @@ DWORD APIENTRY NtGdiD3dValidateTextureStageState(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdAddAttachedSurface(      
+DWORD STDCALL NtGdiDdAddAttachedSurface(      
     HANDLE hSurface,
     HANDLE hSurfaceAttached,
     PDD_ADDATTACHEDSURFACEDATA puAddAttachedSurfaceData
@@ -78,14 +79,14 @@ DWORD APIENTRY NtGdiDdAddAttachedSurface(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdAlphaBlt(VOID)
+DWORD STDCALL NtGdiDdAlphaBlt(VOID)
 {
        UNIMPLEMENTED
 
        return 0;
 }
 
-BOOL APIENTRY NtGdiDdAttachSurface(      
+BOOL STDCALL NtGdiDdAttachSurface(      
     HANDLE hSurfaceFrom,
     HANDLE hSurfaceTo
 )
@@ -95,7 +96,7 @@ BOOL APIENTRY NtGdiDdAttachSurface(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdBeginMoCompFrame(      
+DWORD STDCALL NtGdiDdBeginMoCompFrame(      
     HANDLE hMoComp,
     PDD_BEGINMOCOMPFRAMEDATA puBeginFrameData
 )
@@ -105,7 +106,7 @@ DWORD APIENTRY NtGdiDdBeginMoCompFrame(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdBlt(      
+DWORD STDCALL NtGdiDdBlt(      
     HANDLE hSurfaceDest,
     HANDLE hSurfaceSrc,
     PDD_BLTDATA puBltData
@@ -116,7 +117,7 @@ DWORD APIENTRY NtGdiDdBlt(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdCanCreateD3DBuffer(      
+DWORD STDCALL NtGdiDdCanCreateD3DBuffer(      
     HANDLE hDirectDraw,
     PDD_CANCREATESURFACEDATA puCanCreateSurfaceData
 )
@@ -126,7 +127,7 @@ DWORD APIENTRY NtGdiDdCanCreateD3DBuffer(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdCanCreateSurface(      
+DWORD STDCALL NtGdiDdCanCreateSurface(      
     HANDLE hDirectDraw,
     PDD_CANCREATESURFACEDATA puCanCreateSurfaceData
 )
@@ -136,7 +137,7 @@ DWORD APIENTRY NtGdiDdCanCreateSurface(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdColorControl(      
+DWORD STDCALL NtGdiDdColorControl(      
     HANDLE hSurface,
     PDD_COLORCONTROLDATA puColorControlData
 )
@@ -146,14 +147,14 @@ DWORD APIENTRY NtGdiDdColorControl(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdCreateD3DBuffer(      
+DWORD STDCALL NtGdiDdCreateD3DBuffer(      
     HANDLE hDirectDraw,
     HANDLE *hSurface,
     DDSURFACEDESC *puSurfaceDescription,
     DD_SURFACE_GLOBAL *puSurfaceGlobalData,
     DD_SURFACE_LOCAL *puSurfaceLocalData,
     DD_SURFACE_MORE *puSurfaceMoreData,
-    DD_CREATESURFACEDATA *puCreateSurfaceData,
+    PDD_CREATESURFACEDATA puCreateSurfaceData,
     HANDLE *puhSurface
 )
 {
@@ -162,7 +163,8 @@ DWORD APIENTRY NtGdiDdCreateD3DBuffer(
        return 0;
 }
 
-HANDLE APIENTRY NtGdiDdCreateDirectDrawObject(      
+/*
+HANDLE STDCALL NtGdiDdCreateDirectDrawObject(      
     HDC hdc
 )
 {
@@ -170,8 +172,9 @@ HANDLE APIENTRY NtGdiDdCreateDirectDrawObject(
 
        return 0;
 }
+*/
 
-HANDLE APIENTRY NtGdiDdCreateMoComp(      
+HANDLE STDCALL NtGdiDdCreateMoComp(      
     HANDLE hDirectDraw,
     PDD_CREATEMOCOMPDATA puCreateMoCompData
 )
@@ -181,14 +184,14 @@ HANDLE APIENTRY NtGdiDdCreateMoComp(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdCreateSurface(      
+DWORD STDCALL NtGdiDdCreateSurface(      
     HANDLE hDirectDraw,
     HANDLE *hSurface,
     DDSURFACEDESC *puSurfaceDescription,
     DD_SURFACE_GLOBAL *puSurfaceGlobalData,
     DD_SURFACE_LOCAL *puSurfaceLocalData,
     DD_SURFACE_MORE *puSurfaceMoreData,
-    DD_CREATESURFACEDATA *puCreateSurfaceData,
+    PDD_CREATESURFACEDATA puCreateSurfaceData,
     HANDLE *puhSurface
 )
 {
@@ -197,7 +200,7 @@ DWORD APIENTRY NtGdiDdCreateSurface(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdCreateSurfaceEx(      
+DWORD STDCALL NtGdiDdCreateSurfaceEx(      
     HANDLE hDirectDraw,
     HANDLE hSurface,
     DWORD dwSurfaceHandle
@@ -208,7 +211,8 @@ DWORD APIENTRY NtGdiDdCreateSurfaceEx(
        return 0;
 }
 
-HANDLE APIENTRY NtGdiDdCreateSurfaceObject(      
+/*
+HANDLE STDCALL NtGdiDdCreateSurfaceObject(      
     HANDLE hDirectDrawLocal,
     HANDLE hSurface,
     PDD_SURFACE_LOCAL puSurfaceLocal,
@@ -222,7 +226,7 @@ HANDLE APIENTRY NtGdiDdCreateSurfaceObject(
        return 0;
 }
 
-BOOL APIENTRY NtGdiDdDeleteDirectDrawObject(      
+BOOL STDCALL NtGdiDdDeleteDirectDrawObject(      
     HANDLE hDirectDrawLocal
 )
 {
@@ -231,7 +235,7 @@ BOOL APIENTRY NtGdiDdDeleteDirectDrawObject(
        return 0;
 }
 
-BOOL APIENTRY NtGdiDdDeleteSurfaceObject(      
+BOOL STDCALL NtGdiDdDeleteSurfaceObject(      
     HANDLE hSurface
 )
 {
@@ -239,8 +243,9 @@ BOOL APIENTRY NtGdiDdDeleteSurfaceObject(
 
        return 0;
 }
+*/
 
-DWORD APIENTRY NtGdiDdDestroyD3DBuffer(      
+DWORD STDCALL NtGdiDdDestroyD3DBuffer(      
     HANDLE hSurface
 )
 {
@@ -249,7 +254,7 @@ DWORD APIENTRY NtGdiDdDestroyD3DBuffer(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdDestroyMoComp(      
+DWORD STDCALL NtGdiDdDestroyMoComp(      
     HANDLE hMoComp,
     PDD_DESTROYMOCOMPDATA puBeginFrameData
 )
@@ -259,7 +264,7 @@ DWORD APIENTRY NtGdiDdDestroyMoComp(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdDestroySurface(      
+DWORD STDCALL NtGdiDdDestroySurface(      
     HANDLE hSurface,
     BOOL bRealDestroy
 )
@@ -269,7 +274,7 @@ DWORD APIENTRY NtGdiDdDestroySurface(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdEndMoCompFrame(      
+DWORD STDCALL NtGdiDdEndMoCompFrame(      
     HANDLE hMoComp,
     PDD_ENDMOCOMPFRAMEDATA puEndFrameData
 )
@@ -279,7 +284,7 @@ DWORD APIENTRY NtGdiDdEndMoCompFrame(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdFlip(      
+DWORD STDCALL NtGdiDdFlip(      
     HANDLE hSurfaceCurrent,
     HANDLE hSurfaceTarget,
     HANDLE hSurfaceCurrentLeft,
@@ -292,7 +297,7 @@ DWORD APIENTRY NtGdiDdFlip(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdFlipToGDISurface(      
+DWORD STDCALL NtGdiDdFlipToGDISurface(      
     HANDLE hDirectDraw,
     PDD_FLIPTOGDISURFACEDATA puFlipToGDISurfaceData
 )
@@ -302,7 +307,7 @@ DWORD APIENTRY NtGdiDdFlipToGDISurface(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdGetAvailDriverMemory(      
+DWORD STDCALL NtGdiDdGetAvailDriverMemory(      
     HANDLE hDirectDraw,
     PDD_GETAVAILDRIVERMEMORYDATA puGetAvailDriverMemoryData
 )
@@ -312,7 +317,7 @@ DWORD APIENTRY NtGdiDdGetAvailDriverMemory(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdGetBltStatus(      
+DWORD STDCALL NtGdiDdGetBltStatus(      
     HANDLE hSurface,
     PDD_GETBLTSTATUSDATA puGetBltStatusData
 )
@@ -322,7 +327,7 @@ DWORD APIENTRY NtGdiDdGetBltStatus(
        return 0;
 }
 
-HDC APIENTRY NtGdiDdGetDC(      
+HDC STDCALL NtGdiDdGetDC(      
     HANDLE hSurface,
     PALETTEENTRY *puColorTable
 )
@@ -332,7 +337,7 @@ HDC APIENTRY NtGdiDdGetDC(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdGetDriverInfo(      
+DWORD STDCALL NtGdiDdGetDriverInfo(      
     HANDLE hDirectDraw,
     PDD_GETDRIVERINFODATA puGetDriverInfoData
 )
@@ -342,7 +347,7 @@ DWORD APIENTRY NtGdiDdGetDriverInfo(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdGetDriverState(      
+DWORD STDCALL NtGdiDdGetDriverState(      
     PDD_GETDRIVERSTATEDATA pdata
 )
 {
@@ -351,7 +356,7 @@ DWORD APIENTRY NtGdiDdGetDriverState(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdGetDxHandle(      
+DWORD STDCALL NtGdiDdGetDxHandle(      
     HANDLE hDirectDraw,
     HANDLE hSurface,
     BOOL bRelease
@@ -362,7 +367,7 @@ DWORD APIENTRY NtGdiDdGetDxHandle(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdGetFlipStatus(      
+DWORD STDCALL NtGdiDdGetFlipStatus(      
     HANDLE hSurface,
     PDD_GETFLIPSTATUSDATA puGetFlipStatusData
 )
@@ -372,7 +377,7 @@ DWORD APIENTRY NtGdiDdGetFlipStatus(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdGetInternalMoCompInfo(      
+DWORD STDCALL NtGdiDdGetInternalMoCompInfo(      
     HANDLE hDirectDraw,
     PDD_GETINTERNALMOCOMPDATA puGetInternalData
 )
@@ -382,7 +387,7 @@ DWORD APIENTRY NtGdiDdGetInternalMoCompInfo(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdGetMoCompBuffInfo(      
+DWORD STDCALL NtGdiDdGetMoCompBuffInfo(      
     HANDLE hDirectDraw,
     PDD_GETMOCOMPCOMPBUFFDATA puGetBuffData
 )
@@ -392,7 +397,7 @@ DWORD APIENTRY NtGdiDdGetMoCompBuffInfo(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdGetMoCompFormats(      
+DWORD STDCALL NtGdiDdGetMoCompFormats(      
     HANDLE hDirectDraw,
     PDD_GETMOCOMPFORMATSDATA puGetMoCompFormatsData
 )
@@ -402,7 +407,7 @@ DWORD APIENTRY NtGdiDdGetMoCompFormats(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdGetMoCompGuids(      
+DWORD STDCALL NtGdiDdGetMoCompGuids(      
     HANDLE hDirectDraw,
     PDD_GETMOCOMPGUIDSDATA puGetMoCompGuidsData
 )
@@ -412,7 +417,7 @@ DWORD APIENTRY NtGdiDdGetMoCompGuids(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdGetScanLine(      
+DWORD STDCALL NtGdiDdGetScanLine(      
     HANDLE hDirectDraw,
     PDD_GETSCANLINEDATA puGetScanLineData
 )
@@ -422,7 +427,7 @@ DWORD APIENTRY NtGdiDdGetScanLine(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdLock(      
+DWORD STDCALL NtGdiDdLock(      
     HANDLE hSurface,
     PDD_LOCKDATA puLockData,
     HDC hdcClip
@@ -433,7 +438,7 @@ DWORD APIENTRY NtGdiDdLock(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdLockD3D(      
+DWORD STDCALL NtGdiDdLockD3D(      
     HANDLE hSurface,
     PDD_LOCKDATA puLockData
 )
@@ -443,12 +448,13 @@ DWORD APIENTRY NtGdiDdLockD3D(
        return 0;
 }
 
-BOOL APIENTRY NtGdiDdQueryDirectDrawObject(      
+/*
+BOOL STDCALL NtGdiDdQueryDirectDrawObject(      
     HANDLE hDirectDrawLocal,
     DD_HALINFO *pHalInfo,
     DWORD *pCallBackFlags,
-    LPD3DNTHAL_CALLBACKS puD3dCallbacks,
-    LPD3DNTHAL_GLOBALDRIVERDATA puD3dDriverData,
+    PD3DNTHAL_CALLBACKS puD3dCallbacks,
+    PD3DNTHAL_GLOBALDRIVERDATA puD3dDriverData,
     PDD_D3DBUFCALLBACKS puD3dBufferCallbacks,
     LPDDSURFACEDESC puD3dTextureFormats,
     DWORD *puNumHeaps,
@@ -461,8 +467,9 @@ BOOL APIENTRY NtGdiDdQueryDirectDrawObject(
 
        return 0;
 }
+*/
 
-DWORD APIENTRY NtGdiDdQueryMoCompStatus(      
+DWORD STDCALL NtGdiDdQueryMoCompStatus(      
     HANDLE hMoComp,
     PDD_QUERYMOCOMPSTATUSDATA puQueryMoCompStatusData
 )
@@ -472,7 +479,7 @@ DWORD APIENTRY NtGdiDdQueryMoCompStatus(
        return 0;
 }
 
-BOOL APIENTRY NtGdiDdReenableDirectDrawObject(      
+BOOL STDCALL NtGdiDdReenableDirectDrawObject(      
     HANDLE hDirectDrawLocal,
     BOOL *pubNewMode
 )
@@ -482,7 +489,7 @@ BOOL APIENTRY NtGdiDdReenableDirectDrawObject(
        return 0;
 }
 
-BOOL APIENTRY NtGdiDdReleaseDC(      
+BOOL STDCALL NtGdiDdReleaseDC(      
     HANDLE hSurface
 )
 {
@@ -491,7 +498,7 @@ BOOL APIENTRY NtGdiDdReleaseDC(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdRenderMoComp(      
+DWORD STDCALL NtGdiDdRenderMoComp(      
     HANDLE hMoComp,
     PDD_RENDERMOCOMPDATA puRenderMoCompData
 )
@@ -501,7 +508,7 @@ DWORD APIENTRY NtGdiDdRenderMoComp(
        return 0;
 }
 
-BOOL APIENTRY NtGdiDdResetVisrgn(      
+BOOL STDCALL NtGdiDdResetVisrgn(      
     HANDLE hSurface,
     HWND hwnd
 )
@@ -511,7 +518,7 @@ BOOL APIENTRY NtGdiDdResetVisrgn(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdSetColorKey(      
+DWORD STDCALL NtGdiDdSetColorKey(      
     HANDLE hSurface,
     PDD_SETCOLORKEYDATA puSetColorKeyData
 )
@@ -521,7 +528,7 @@ DWORD APIENTRY NtGdiDdSetColorKey(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdSetExclusiveMode(      
+DWORD STDCALL NtGdiDdSetExclusiveMode(      
     HANDLE hDirectDraw,
     PDD_SETEXCLUSIVEMODEDATA puSetExclusiveModeData
 )
@@ -531,7 +538,7 @@ DWORD APIENTRY NtGdiDdSetExclusiveMode(
        return 0;
 }
 
-BOOL APIENTRY NtGdiDdSetGammaRamp(      
+BOOL STDCALL NtGdiDdSetGammaRamp(      
     HANDLE hDirectDraw,
     HDC hdc,
     LPVOID lpGammaRamp
@@ -542,7 +549,7 @@ BOOL APIENTRY NtGdiDdSetGammaRamp(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdSetOverlayPosition(      
+DWORD STDCALL NtGdiDdSetOverlayPosition(      
     HANDLE hSurfaceSource,
     HANDLE hSurfaceDestination,
     PDD_SETOVERLAYPOSITIONDATA puSetOverlayPositionData
@@ -553,7 +560,7 @@ DWORD APIENTRY NtGdiDdSetOverlayPosition(
        return 0;
 }
 
-VOID APIENTRY NtGdiDdUnattachSurface(      
+VOID STDCALL NtGdiDdUnattachSurface(      
     HANDLE hSurface,
     HANDLE hSurfaceAttached
 )
@@ -561,7 +568,7 @@ VOID APIENTRY NtGdiDdUnattachSurface(
        UNIMPLEMENTED
 }
 
-DWORD APIENTRY NtGdiDdUnlock(      
+DWORD STDCALL NtGdiDdUnlock(      
     HANDLE hSurface,
     PDD_UNLOCKDATA puUnlockData
 )
@@ -571,7 +578,7 @@ DWORD APIENTRY NtGdiDdUnlock(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdUnlockD3D(      
+DWORD STDCALL NtGdiDdUnlockD3D(      
     HANDLE hSurface,
     PDD_UNLOCKDATA puUnlockData
 )
@@ -581,7 +588,7 @@ DWORD APIENTRY NtGdiDdUnlockD3D(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdUpdateOverlay(      
+DWORD STDCALL NtGdiDdUpdateOverlay(      
     HANDLE hSurfaceDestination,
     HANDLE hSurfaceSource,
     PDD_UPDATEOVERLAYDATA puUpdateOverlayData
@@ -592,7 +599,7 @@ DWORD APIENTRY NtGdiDdUpdateOverlay(
        return 0;
 }
 
-DWORD APIENTRY NtGdiDdWaitForVerticalBlank(      
+DWORD STDCALL NtGdiDdWaitForVerticalBlank(      
     HANDLE hDirectDraw,
     PDD_WAITFORVERTICALBLANKDATA puWaitForVerticalBlankData
 )
index bb8df52..fd122f3 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: dc.c,v 1.91 2003/10/25 10:59:19 gvg Exp $
+/* $Id: dc.c,v 1.92 2003/10/28 19:30:08 gvg Exp $
  *
  * DC.C - Device context functions
  *
@@ -571,6 +571,9 @@ NtGdiCreatePrimarySurface(LPCWSTR Driver,
 
   DPRINT("Building DDI Functions\n");
 
+  /*  Make sure the non existant functions are NULL  */
+  RtlZeroMemory(&PrimarySurface.DriverFunctions, sizeof(PrimarySurface.DriverFunctions));
+
   /*  Construct DDI driver function dispatch table  */
   if (!DRIVER_BuildDDIFunctions(&DED, &PrimarySurface.DriverFunctions))
   {