Correct some prototypes and struct, Adding some missing struct for d3d Thx Alex Ionescu for his patch for it.
Modified: trunk/reactos/include/win32k/ntddraw.h
Modified: trunk/reactos/subsys/win32k/include/intddraw.h
Modified: trunk/reactos/subsys/win32k/ntddraw/ddraw.c
Modified: trunk/reactos/subsys/win32k/ntddraw/stubs.c
Modified: trunk/reactos/w32api/include/ddk/d3dnthal.h

Modified: trunk/reactos/include/win32k/ntddraw.h
--- trunk/reactos/include/win32k/ntddraw.h	2005-12-02 22:50:23 UTC (rev 19834)
+++ trunk/reactos/include/win32k/ntddraw.h	2005-12-03 09:09:10 UTC (rev 19835)
@@ -10,11 +10,13 @@
     HANDLE hDirectDrawLocal,
     HANDLE hSurfColor,
     HANDLE hSurfZ,
-    PD3DNTHAL_CONTEXTCREATEDATA pdcci
+    /* Is msdn wrong on D3DNTHAL_CONTEXTCREATEDATA ?? */
+    D3DNTHAL_CONTEXTCREATEDATA *pdcci
 );
 
+
 DWORD STDCALL NtGdiD3dContextDestroy(      
-    PD3DNTHAL_CONTEXTDESTROYDATA pContextDestroyData
+    LPD3DNTHAL_CONTEXTDESTROYDATA  pContextDestroyData
 );
 
 DWORD STDCALL NtGdiD3dContextDestroyAll(VOID);
@@ -22,15 +24,16 @@
 DWORD STDCALL NtGdiD3dDrawPrimitives2(      
     HANDLE hCmdBuf,
     HANDLE hVBuf,
-    PD3DNTHAL_DRAWPRIMITIVES2DATA pded,
+    LPD3DNTHAL_DRAWPRIMITIVES2DATA pded,
     FLATPTR *pfpVidMemCmd,
     DWORD *pdwSizeCmd,
     FLATPTR *pfpVidMemVtx,
     DWORD *pdwSizeVtx
+
 );
 
 DWORD STDCALL NtGdiD3dValidateTextureStageState(      
-    PD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA pData
+    LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA pData
 );
 
 DWORD STDCALL NtGdiDdAddAttachedSurface(      
@@ -233,8 +236,8 @@
     HANDLE hDirectDrawLocal,
     DD_HALINFO *pHalInfo,
     DWORD *pCallBackFlags,
-    PD3DNTHAL_CALLBACKS puD3dCallbacks,
-    PD3DNTHAL_GLOBALDRIVERDATA puD3dDriverData,
+    LPD3DNTHAL_CALLBACKS puD3dCallbacks,
+    LPD3DNTHAL_GLOBALDRIVERDATA puD3dDriverData,
     PDD_D3DBUFCALLBACKS puD3dBufferCallbacks,
     LPDDSURFACEDESC puD3dTextureFormats,
     DWORD *puNumHeaps,

Modified: trunk/reactos/subsys/win32k/include/intddraw.h
--- trunk/reactos/subsys/win32k/include/intddraw.h	2005-12-02 22:50:23 UTC (rev 19834)
+++ trunk/reactos/subsys/win32k/include/intddraw.h	2005-12-03 09:09:10 UTC (rev 19835)
@@ -1,6 +1,8 @@
 #ifndef _INT_W32k_DDRAW
 #define _INT_W32k_DDRAW
 
+#include <ddkernel.h>
+
 #define GDI_OBJECT_TYPE_DIRECTDRAW    0x00600000
 #define GDI_OBJECT_TYPE_DD_SURFACE    0x00610000
 #define GDI_OBJECT_TYPE_DD_VIDEOPORT  0x00620000
@@ -8,8 +10,6 @@
 #define GDI_OBJECT_TYPE_DD_CLIPPER    0x00640000
 #define GDI_OBJECT_TYPE_DD_MOTIONCOMP 0x00650000
 
-
-
 typedef struct
 {
 	DD_SURFACE_LOCAL Local;
@@ -49,7 +49,7 @@
 	// D3DHAL_D3DEXTENDEDCAPS           D3dHal3Ext;
 
 	// Heap Callback
-	DD_GETHEAPALIGNMENTDATA          HeapData;
+	PDD_GETHEAPALIGNMENTDATA         HeapData;
 	
 	// Kernel Callback
 	DD_KERNELCALLBACKS               Kernel;

Modified: trunk/reactos/subsys/win32k/ntddraw/ddraw.c
--- trunk/reactos/subsys/win32k/ntddraw/ddraw.c	2005-12-02 22:50:23 UTC (rev 19834)
+++ trunk/reactos/subsys/win32k/ntddraw/ddraw.c	2005-12-03 09:09:10 UTC (rev 19835)
@@ -116,8 +116,8 @@
     HANDLE hDirectDrawLocal,
     DD_HALINFO *pHalInfo,
     DWORD *pCallBackFlags,
-    PD3DNTHAL_CALLBACKS puD3dCallbacks,
-    PD3DNTHAL_GLOBALDRIVERDATA puD3dDriverData,
+    LPD3DNTHAL_CALLBACKS puD3dCallbacks,
+    LPD3DNTHAL_GLOBALDRIVERDATA puD3dDriverData,
     PDD_D3DBUFCALLBACKS puD3dBufferCallbacks,
     LPDDSURFACEDESC puD3dTextureFormats,
     DWORD *puNumHeaps,

Modified: trunk/reactos/subsys/win32k/ntddraw/stubs.c
--- trunk/reactos/subsys/win32k/ntddraw/stubs.c	2005-12-02 22:50:23 UTC (rev 19834)
+++ trunk/reactos/subsys/win32k/ntddraw/stubs.c	2005-12-03 09:09:10 UTC (rev 19835)
@@ -20,7 +20,7 @@
     HANDLE hDirectDrawLocal,
     HANDLE hSurfColor,
     HANDLE hSurfZ,
-    PD3DNTHAL_CONTEXTCREATEDATA pdcci
+    D3DNTHAL_CONTEXTCREATEDATA *pdcci
 )
 {
 	UNIMPLEMENTED
@@ -29,7 +29,7 @@
 }
 
 DWORD STDCALL NtGdiD3dContextDestroy(
-    PD3DNTHAL_CONTEXTDESTROYDATA pContextDestroyData
+    LPD3DNTHAL_CONTEXTDESTROYDATA pContextDestroyData
 )
 {
 	UNIMPLEMENTED
@@ -46,9 +46,9 @@
 }
 
 DWORD STDCALL NtGdiD3dDrawPrimitives2(
-    HANDLE hCmdBuf,
+     HANDLE hCmdBuf,
     HANDLE hVBuf,
-    PD3DNTHAL_DRAWPRIMITIVES2DATA pded,
+    LPD3DNTHAL_DRAWPRIMITIVES2DATA pded,
     FLATPTR *pfpVidMemCmd,
     DWORD *pdwSizeCmd,
     FLATPTR *pfpVidMemVtx,
@@ -61,7 +61,7 @@
 }
 
 DWORD STDCALL NtGdiD3dValidateTextureStageState(
-    PD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA pData
+    LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA pData
 )
 {
 	UNIMPLEMENTED

Modified: trunk/reactos/w32api/include/ddk/d3dnthal.h
--- trunk/reactos/w32api/include/ddk/d3dnthal.h	2005-12-02 22:50:23 UTC (rev 19834)
+++ trunk/reactos/w32api/include/ddk/d3dnthal.h	2005-12-03 09:09:10 UTC (rev 19835)
@@ -20,26 +20,89 @@
 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;
+typedef struct _D3DNTHAL_CONTEXTCREATEDATA 
+{
+    union
+    {
+        PDD_DIRECTDRAW_GLOBAL lpDDGbl;
+        PDD_DIRECTDRAW_LOCAL lpDDLcl;
+    };
+    union
+    {
+        PDD_SURFACE_LOCAL lpDDS;
+        PDD_SURFACE_LOCAL lpDDSLcl;
+    };
+    union
+    {
+        PDD_SURFACE_LOCAL lpDDSZ;
+        PDD_SURFACE_LOCAL lpDDSZLcl;
+    };
+    DWORD dwPID;
+    ULONG_PTR dwhContext;
+    HRESULT ddrval;
+} D3DNTHAL_CONTEXTCREATEDATA, *LPD3DNTHAL_CONTEXTCREATEDATA;
 
-/* DIRECT3D object callbacks */
-typedef DWORD (STDCALL *PD3DNTHAL_CONTEXTCREATECB)(PD3DNTHAL_CONTEXTCREATEDATA);
-typedef DWORD (STDCALL *PD3DNTHAL_CONTEXTDESTROYCB)(PD3DNTHAL_CONTEXTDESTROYDATA);
+typedef struct _D3DNTHAL_CONTEXTDESTROYDATA 
+{
+    ULONG_PTR dwhContext;
+    HRESULT ddrval;
+} D3DNTHAL_CONTEXTDESTROYDATA, *LPD3DNTHAL_CONTEXTDESTROYDATA;
 
-typedef struct _D3DNTHAL_CALLBACKS {
-	DWORD                      dwSize;
-	PD3DNTHAL_CONTEXTCREATECB  ContextCreate;
-	PD3DNTHAL_CONTEXTDESTROYCB ContextDestroy;
-	PVOID                      Reserved[32];
-} D3DNTHAL_CALLBACKS;
-typedef D3DNTHAL_CALLBACKS *PD3DNTHAL_CALLBACKS;
+typedef struct _D3DNTHAL_CONTEXTDESTROYALLDATA 
+{
+    DWORD dwPID;
+    HRESULT ddrval;
+} D3DNTHAL_CONTEXTDESTROYALLDATA, *LPD3DNTHAL_CONTEXTDESTROYALLDATA;
 
-/* Structures to report driver capabilities */
+typedef struct _D3DNTHAL_SCENECAPTUREDATA 
+{
+    ULONG_PTR dwhContext;
+    DWORD dwFlag;
+    HRESULT ddrval;
+} D3DNTHAL_SCENECAPTUREDATA, *LPD3DNTHAL_SCENECAPTUREDATA;
 
-typedef struct _D3DNTHAL_DEVICEDESC {
+typedef struct _D3DNTHAL_TEXTURECREATEDATA 
+{
+    ULONG_PTR dwhContext;
+    HANDLE hDDS;
+    ULONG_PTR dwHandle;
+    HRESULT ddrval;
+} D3DNTHAL_TEXTURECREATEDATA, *LPD3DNTHAL_TEXTURECREATEDATA;
+
+typedef struct _D3DNTHAL_TEXTUREDESTROYDATA 
+{
+    ULONG_PTR dwhContext;
+    ULONG_PTR dwHandle;
+    HRESULT ddrval;
+} D3DNTHAL_TEXTUREDESTROYDATA, *LPD3DNTHAL_TEXTUREDESTROYDATA;
+
+typedef struct _D3DNTHAL_TEXTURESWAPDATA 
+{
+    ULONG_PTR dwhContext;
+    ULONG_PTR dwHandle1;
+    ULONG_PTR dwHandle2;
+    HRESULT ddrval;
+} D3DNTHAL_TEXTURESWAPDATA, *LPD3DNTHAL_TEXTURESWAPDATA;
+
+typedef struct _D3DNTHAL_TEXTUREGETSURFDATA 
+{
+    ULONG_PTR dwhContext;
+    HANDLE hDDS; 
+    ULONG_PTR dwHandle;
+    HRESULT ddrval;
+} D3DNTHAL_TEXTUREGETSURFDATA, *LPD3DNTHAL_TEXTUREGETSURFDATA;
+
+typedef DWORD (APIENTRY *LPD3DNTHAL_CONTEXTCREATECB)(LPD3DNTHAL_CONTEXTCREATEDATA);
+typedef DWORD (APIENTRY *LPD3DNTHAL_CONTEXTDESTROYCB)(LPD3DNTHAL_CONTEXTDESTROYDATA);
+typedef DWORD (APIENTRY *LPD3DNTHAL_CONTEXTDESTROYALLCB)(LPD3DNTHAL_CONTEXTDESTROYALLDATA);
+typedef DWORD (APIENTRY *LPD3DNTHAL_SCENECAPTURECB)(LPD3DNTHAL_SCENECAPTUREDATA);
+typedef DWORD (APIENTRY *LPD3DNTHAL_TEXTURECREATECB)(LPD3DNTHAL_TEXTURECREATEDATA);
+typedef DWORD (APIENTRY *LPD3DNTHAL_TEXTUREDESTROYCB)(LPD3DNTHAL_TEXTUREDESTROYDATA);
+typedef DWORD (APIENTRY *LPD3DNTHAL_TEXTURESWAPCB)(LPD3DNTHAL_TEXTURESWAPDATA);
+typedef DWORD (APIENTRY *LPD3DNTHAL_TEXTUREGETSURFCB)(LPD3DNTHAL_TEXTUREGETSURFDATA);
+
+typedef struct _D3DNTHALDeviceDesc_V1 
+{
 	DWORD            dwSize;
 	DWORD            dwFlags;
 	D3DCOLORMODEL    dcmColorModel;
@@ -53,18 +116,92 @@
 	DWORD            dwDeviceZBufferBitDepth;
 	DWORD            dwMaxBufferSize;
 	DWORD            dwMaxVertexCount;
-} D3DNTHAL_DEVICEDESC, *PD3DNT_HALDEVICEDESC;
+} D3DNTHALDEVICEDESC_V1, *LPD3DNTHALDEVICEDESC_V1;
 
-typedef struct _D3DNTHAL_GLOBALDRIVERDATA {
+typedef struct _D3DNTHAL_GLOBALDRIVERDATA 
+{
 	DWORD               dwSize;
-	D3DNTHAL_DEVICEDESC hwCaps;
+    D3DNTHALDEVICEDESC_V1 hwCaps;
 	DWORD               dwNumVertices;
 	DWORD               dwNumClipVertices;
 	DWORD               dwNumTextureFormats;
 	LPDDSURFACEDESC     lpTextureFormats;
-} D3DNTHAL_GLOBALDRIVERDATA, *PD3DNTHAL_GLOBALDRIVERDATA;
+} D3DNTHAL_GLOBALDRIVERDATA, *LPD3DNTHAL_GLOBALDRIVERDATA;
 
+typedef struct _D3DNTHAL_CALLBACKS 
+{
+    DWORD dwSize;
+    LPD3DNTHAL_CONTEXTCREATECB ContextCreate;
+    LPD3DNTHAL_CONTEXTDESTROYCB ContextDestroy;
+    LPD3DNTHAL_CONTEXTDESTROYALLCB ContextDestroyAll;
+    LPD3DNTHAL_SCENECAPTURECB SceneCapture;
+    LPVOID dwReserved10;
+    LPVOID dwReserved11;
+    LPVOID dwReserved22;
+    LPVOID dwReserved23;
+    ULONG_PTR dwReserved;
+    LPD3DNTHAL_TEXTURECREATECB TextureCreate;
+    LPD3DNTHAL_TEXTUREDESTROYCB TextureDestroy;
+    LPD3DNTHAL_TEXTURESWAPCB TextureSwap;
+    LPD3DNTHAL_TEXTUREGETSURFCB TextureGetSurf;
+    LPVOID dwReserved12;
+    LPVOID dwReserved13;
+    LPVOID dwReserved14;
+    LPVOID dwReserved15;
+    LPVOID dwReserved16;
+    LPVOID dwReserved17;
+    LPVOID dwReserved18;
+    LPVOID dwReserved19;
+    LPVOID dwReserved20;
+    LPVOID dwReserved21;
+    LPVOID dwReserved24;
+    ULONG_PTR dwReserved0;
+    ULONG_PTR dwReserved1;
+    ULONG_PTR dwReserved2;
+    ULONG_PTR dwReserved3;
+    ULONG_PTR dwReserved4;
+    ULONG_PTR dwReserved5;
+    ULONG_PTR dwReserved6;
+    ULONG_PTR dwReserved7;
+    ULONG_PTR dwReserved8;
+    ULONG_PTR dwReserved9;
+} D3DNTHAL_CALLBACKS, *LPD3DNTHAL_CALLBACKS;
 
+typedef struct _D3DNTHAL_VALIDATETEXTURESTAGESTATEDATA
+{
+    ULONG_PTR dwhContext;
+    DWORD dwFlags;
+    ULONG_PTR dwReserved;
+    DWORD dwNumPasses;
+    HRESULT ddrval;
+} D3DNTHAL_VALIDATETEXTURESTAGESTATEDATA, FAR *LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA;
+
+typedef struct _D3DNTHAL_DRAWPRIMITIVES2DATA
+{
+    ULONG_PTR dwhContext;
+    DWORD dwFlags;
+    DWORD dwVertexType;
+    PDD_SURFACE_LOCAL lpDDCommands;
+    DWORD dwCommandOffset;
+    DWORD dwCommandLength;
+    union
+    {
+        PDD_SURFACE_LOCAL lpDDVertex;
+        LPVOID lpVertices;
+    };
+    DWORD dwVertexOffset;
+    DWORD dwVertexLength;
+    DWORD dwReqVertexBufSize;
+    DWORD dwReqCommandBufSize;
+    LPDWORD lpdwRStates;
+    union
+    {
+        DWORD dwVertexSize;
+        HRESULT ddrval;
+    };
+    DWORD dwErrorOffset;
+} D3DNTHAL_DRAWPRIMITIVES2DATA, FAR *LPD3DNTHAL_DRAWPRIMITIVES2DATA;
+
 #ifdef __cplusplus
 } /* extern "C" */
 #endif