Difference between revisions of "Techwiki:Win32k/EDD DIRECTDRAW GLOBAL"

From ReactOS Wiki
Jump to: navigation, search
(replace 0x00C field with LPDDVIDEOPORTCAPS)
 
(11 intermediate revisions by 3 users not shown)
Line 43: Line 43:
 
partly updated for windows xp and windows 2003, the above struct is from yaun book  
 
partly updated for windows xp and windows 2003, the above struct is from yaun book  
  
/* NOTE :
+
NOTE :
* if any of these flags are set in dwCallbackFlags (struct EDD_DIRECTDRAW_GLOBAL),
+
if any of these flags are set in dwCallbackFlags (struct EDD_DIRECTDRAW_GLOBAL),
* it means that the respective callback member for it has been filled in by a graphic driver
+
it means that the respective callback member for it has been filled in by a graphic driver
*/
 
#define EDDDGBL_MISCCALLBACKS          0x01 // ddMiscellanousCallbacks
 
#define EDDDGBL_VIDEOPORTCALLBACKS      0x02 // ddVideoPortCallback
 
#define EDDDGBL_MISC2CALLBACKS          0x80 // ddMiscellanous2Callbacks
 
  
typedef struct _EDD_DIRECTDRAW_GLOBAL
+
#define EDDDGBL_MISCCALLBACKS           0x001 // ddMiscellanousCallbacks
{
+
#define EDDDGBL_VIDEOPORTCALLBACKS      0x002 // ddVideoPortCallback
/* 0x000 */    PVOID dhpdev;           // 0x000 <-- verified to match Windows XP, dhpdev, the drv hPDev -->
+
#define EDDDGBL_COLORCONTROLCALLBACKS   0x004 // ddColorControlCallbacks
/* 0x004 */   DWORD dwReserved1;
+
#define EDDDGBL_MOTIONCOMPCALLBACKS    0x040 // ddMotionCompCallbacks
/* 0x008 */    DWORD dwReserved2;
+
#define EDDDGBL_MISC2CALLBACKS          0x080 // ddMiscellanous2Callbacks
/* 0x00C */    ULONG unk_000c[3];
+
#define EDDDGBL_DDMORECAPS             0x100 // ddMorecaps
/* 0x018 */    LONG cDriverReferences;
+
#define EDDDGBL_D3DCALLBACKS3          0x200 // d3dNtHalCallbacks3
/* 0x01C */    ULONG unk_01c;
+
#define EDDDGBL_NTCALLBACKS            0x400 // ddNtCallbacks
/* 0x020 */    DWORD dwCallbackFlags;  // 0x020 <-- verified to match Windows XP, dwCallbackFlags
+
#define EDDDGBL_PRIVATEDRIVERCAPS      0x800 // ddNtPrivateDriverCaps
                                                                             
 
/* 0x024 */    ULONG unk_024;
 
#ifdef _WIN32
 
/* 0x028 */    LARGE_INTEGER   llAssertModeTimeout;                    /* 0x028 <-- verified to match Windows XP, llAssertModeTimeout, it
 
                                                                          using regkey
 
                                                                          HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\DCI
 
                                                                          Specifies how long a DirectDraw application can keep a graphics-device frame-buffer locked
 
                                                                          in second, if this value are set to 0 it disable directdraw acclatrions.
 
                                                                          it is normal set to 7 (7 sec in windwos xp/2003)
 
                                                                        */
 
#else
 
/* 0x028 */   DWORD          llAssertModeTimeoutLowPart;
 
/* 0x02C */   DWORD          llAssertModeTimeoutHighPart;
 
#endif
 
/* 0x030 */    DWORD dwNumHeaps;                                      // 0x030 <-- verified to match Windows XP, dwNumHeaps
 
/* 0x034 */    VIDEOMEMORY *pvmList;                                  // 0x034 <-- verified to match Windows XP, pvmList
 
/* 0x038 */    DWORD dwNumFourCC;
 
/* 0x03C */    PDWORD pdwFourCC;
 
/* 0x040 */    DD_HALINFO ddHalInfo;                                  // 0x040 <-- verified to match Windows XP, ddHalInfo
 
/* 0x1E0 */    ULONG unk_1e0[46];
 
/* 0x298 */    DD_CALLBACKS ddCallbacks;                              // 0x298 <-- verified to match Windows XP, ddCallbacks
 
/* 0x2C0 */    DD_SURFACECALLBACKS ddSurfaceCallbacks;                // 0x2C4 <-- verified to match Windows XP, ddSurfaceCallbacks
 
/* 0x300 */    DD_PALETTECALLBACKS ddPaletteCallbacks;                // 0x300 <-- verified to match Windows XP, ddPaletteCallbacks
 
/* 0x314 */    ULONG unk_314[46];
 
/* 0x3D4 */    D3DNTHAL_CALLBACKS d3dNtHalCallbacks;
 
/* 0x460 */    ULONG unk_460[9];
 
/* 0x47C */    D3DNTHAL_CALLBACKS2 d3dNtHalCallbacks2;
 
/* 0x498 */    DD_VIDEOPORTCALLBACKS ddVideoPortCallback;             // 0x498 <-- verified to match Windows XP, ddVideoPortCallback
 
/* 0x4E0 */   DD_MISCELLANEOUSCALLBACKS ddMiscellanousCallbacks;      // 0x4E0 <-- verified to match Windows XP, ddMiscellanousCallbacks
 
/* 0x4EC */    DD_MISCELLANEOUS2CALLBACKS ddMiscellanous2Callbacks;    // 0x4EC <-- verified to match Windows XP, ddMiscellanous2Callbacks
 
/* 0x504 */    ULONG unk_504[10];
 
/* 0x534 */    D3DNTHAL_CALLBACKS3 d3dNtHalCallbacks3;
 
/* 0x5A4 */   ULONG unk_544;
 
/* 0x5A8 */    ULONG unk_548;
 
/* 0x54C */    ULONG unk_54c[23];
 
/* 0x5A8 */    EDD_DIRECTDRAW_LOCAL* peDirectDrawLocalList; // 0x5A8 <-- verified to match Windows XP, it is a current local struct, not a list, peDirectDrawLocalList Current
 
/* 0x5ac */    EDD_SURFACE* peSurface_LockList;
 
/* 0x5B0 */    FLONG fl;
 
/* 0x5B4 */    ULONG cSurfaceLocks;
 
/* 0x5B8 */    PKEVENT pAssertModeEvent;
 
/* 0x5Bc */    EDD_SURFACE *peSurfaceCurrent;
 
/* 0x5C0 */    EDD_SURFACE *peSurfacePrimary;
 
/* 0x5C4 */    BOOL bSuspended;                            // 0x5C4 <-- verified to match Windows XP, tells dxg to use driver's own api or return error code instead
 
/* 0x5C8 */    ULONG unk_5c8[12];
 
/* 0x5F8 */    RECTL rcbounds;
 
/* 0x608 */    ULONG unk_608;
 
/* 0x60c */    HDEV hDev;                                  // 0x60c <-- verified to match Windows XP, The real Pdev, hDev
 
  
/* Windows XP and higher */
+
typedef struct _EDD_DIRECTDRAW_GLOBAL
/* 0x610 */    ULONG unk_610[63];
+
{
/* 0x70C */    ULONG unk_70C;
+
/* 0x000 */    PVOID dhpdev;          // 0x000 <-- verified to match Windows XP, dhpdev, the drv hPDev -->
} EDD_DIRECTDRAW_GLOBAL, *PEDD_DIRECTDRAW_GLOBAL;
+
/* 0x004 */    DWORD dwReserved1;
 +
/* 0x008 */    DWORD dwReserved2;
 +
/* 0x00C */    LPDDVIDEOPORTCAPS lpDDVideoPortCaps;                    // 0x00C <-- verified to match Win2k3
 +
/* 0x010 */    ULONG unk_0010;
 +
/* 0x014 */    ULONG unk_0014;
 +
/* 0x018 */    LONG cDriverReferences;
 +
/* 0x01C */    ULONG unk_01c;
 +
/* 0x020 */    DWORD dwCallbackFlags;  // 0x020 <-- verified to match Windows XP, dwCallbackFlags
 +
                                                                               
 +
/* 0x024 */    ULONG unk_024;
 +
/* 0x028 */    PVOID  llAssertModeTimeout;                          // 0x028 <-- verified to match Windows XP, llAssertModeTimeout, it is a function call llAssertModeTimeout
 +
                                                                       
 +
/* 0x030 */    DWORD dwNumHeaps;                                      // 0x030 <-- verified to match Windows XP, dwNumHeaps
 +
/* 0x034 */    VIDEOMEMORY *pvmList;                                  // 0x034 <-- verified to match Windows XP, pvmList
 +
/* 0x038 */    DWORD dwNumFourCC;
 +
/* 0x03C */    PDWORD pdwFourCC;
 +
/* 0x040 */   DD_HALINFO ddHalInfo;                                  // 0x040 <-- verified to match Windows XP, ddHalInfo
 +
/* 0x1E0 */    ULONG unk_1e0[17];                                     // unknown DXAPI interface structure
 +
/* 0x224 */    ULONG unk_224;
 +
/* 0x228 */    VIDEO_PORT_AGP_INTERFACE_2 agpInterface;                // AGP interface structure
 +
/* 0x260 */    DDKERNELCAPS ddKernelCaps;
 +
/* 0x26C */    DD_MORECAPS ddMoreCaps;
 +
/* 0x290 */    DD_NTPRIVATEDRIVERCAPS ddNtPrivateDriverCaps;
 +
/* 0x298 */    DD_CALLBACKS ddCallbacks;                              // 0x298 <-- verified to match Windows XP, ddCallbacks
 +
/* 0x2C4 */    DD_SURFACECALLBACKS ddSurfaceCallbacks;                // 0x2C4 <-- verified to match Windows XP, ddSurfaceCallbacks
 +
/* 0x300 */    DD_PALETTECALLBACKS ddPaletteCallbacks;                // 0x300 <-- verified to match Windows XP, ddPaletteCallbacks
 +
/* 0x314 */    D3DNTHAL_GLOBALDRIVERDATA d3dNtGlobalDriverData          // 0x314 <-- verified to match Windows XP, d3dNtGlobalDriverData                         
 +
/* 0x3D4 */    D3DNTHAL_CALLBACKS d3dNtHalCallbacks;
 +
/* 0x460 */    DD_D3DBUFCALLBACKS d3dBufCallbacks;
 +
/* 0x47C */    D3DNTHAL_CALLBACKS2 d3dNtHalCallbacks2;
 +
/* 0x498 */    DD_VIDEOPORTCALLBACKS ddVideoPortCallback;              // 0x498 <-- verified to match Windows XP, ddVideoPortCallback
 +
/* 0x4E0 */    DD_MISCELLANEOUSCALLBACKS ddMiscellanousCallbacks;      // 0x4E0 <-- verified to match Windows XP, ddMiscellanousCallbacks
 +
/* 0x4EC */    DD_MISCELLANEOUS2CALLBACKS ddMiscellanous2Callbacks;    // 0x4EC <-- verified to match Windows XP, ddMiscellanous2Callbacks
 +
/* 0x504 */    DD_NTCALLBACKS ddNtCallbacks;
 +
/* 0x504 */    ULONG unk_504[10];
 +
/* 0x518 */    DD_COLORCONTROLCALLBACKS ddColorControlCallbacks;
 +
/* 0x524 */    DD_KERNELCALLBACKS ddKernelCallbacks;
 +
/* 0x534 */    D3DNTHAL_CALLBACKS3 d3dNtHalCallbacks3;
 +
/* 0x54C */    DD_MOTIONCOMPCALLBACKS ddMotionCompCallbacks;
 +
/* 0x57C */    DDMORESURFACECAPS ddMoreSurfaceCaps;
 +
/* 0x5A8 */    EDD_DIRECTDRAW_LOCAL* peDirectDrawLocalList; // 0x5A8 <-- verified to match Windows XP, it is a current local struct, not a list,  peDirectDrawLocalList Current
 +
/* 0x5AC */    EDD_SURFACE* peSurface_LockList;
 +
/* 0x5B0 */    FLONG fl;
 +
/* 0x5B4 */    ULONG cSurfaceLocks;
 +
/* 0x5B8 */    PKEVENT pAssertModeEvent;
 +
/* 0x5Bc */    EDD_SURFACE *peSurfaceCurrent;
 +
/* 0x5C0 */    EDD_SURFACE *peSurfacePrimary;
 +
/* 0x5C4 */    BOOL bSuspended;                            // 0x5C4 <-- verified to match Windows XP, tells dxg to use driver's own api or return error code instead
 +
/* 0x5C8 */    ULONG unk_5c8[12];
 +
/* 0x5F8 */    RECTL rcbounds;
 +
/* 0x608 */    ULONG unk_608;
 +
/* 0x60c */    HDEV hDev;                                  // 0x60c <-- verified to match Windows XP, The real Pdev, hDev
 +
} EDD_DIRECTDRAW_GLOBAL, *PEDD_DIRECTDRAW_GLOBAL;

Latest revision as of 18:59, 31 March 2017

typedef struct _EDD_DIRECTDRAW_GLOBAL
{
/* 0x000 */    PVOID dhpdev;           /* The assign pdev */
/* 0x004 */    DWORD dwReserved1;
/* 0x008 */    DWORD dwReserved2;
/* 0x00C */    ULONG unk_000c[3];
/* 0x018 */    LONG cDriverReferences;
/* 0x01C */    ULONG unk_01c[3];
/* 0x028 */    LONGLONG llAssertModeTimeout;
/* 0x030 */    DWORD dwNumHeaps;
/* 0x034 */    VIDEOMEMORY *pvmList;
/* 0x038 */    DWORD dwNumFourCC;
/* 0x03C */    PDWORD pdwFourCC;
/* 0x040 */    DD_HALINFO ddHalInfo;
/* 0x1E0 */    ULONG unk_1e0[44];
/* 0x290 */    DD_CALLBACKS ddCallbacks;
/* 0x2C4 */    DD_SURFACECALLBACKS ddSurfaceCallbacks;
/* 0x304 */    DD_PALETTECALLBACKS ddPaletteCallbacks;
/* 0x314 */    ULONG unk_314[48];
/* 0x3D4 */    D3DNTHAL_CALLBACKS d3dNtHalCallbacks;
/* 0x460 */    ULONG unk_460[7];
/* 0x47C */    D3DNTHAL_CALLBACKS2 d3dNtHalCallbacks2;
/* 0x498 */    ULONG unk_498[18];
/* 0x4E0 */    DD_MISCELLANEOUSCALLBACKS ddMiscellanousCallbacks;
/* 0x4EC */    ULONG unk_4ec[18];
/* 0x534 */    D3DNTHAL_CALLBACKS3 d3dNtHalCallbacks3;
/* 0x54C */    ULONG unk_54c[23];
/* 0x5A8 */    EDD_DIRECTDRAW_LOCAL* peDirectDrawLocalList;
/* 0x5ac */    EDD_SURFACE* peSurface_LockList;
/* 0x5B0 */    FLONG fl;
/* 0x5B4 */    ULONG cSurfaceLocks;
/* 0x5B8 */    PKEVENT pAssertModeEvent;
/* 0x5Bc */    EDD_SURFACE *peSurfaceCurrent;
/* 0x5C0 */    EDD_SURFACE *peSurfacePrimary;
/* 0x5C4 */    BOOL bSuspended;
/* 0x5C8 */    ULONG unk_5c8[12];
/* 0x5F8 */    RECTL rcbounds;
/* 0x608 */    HDEV hDev;
/* 0x60c */    PVOID hPDev;  
} EDD_DIRECTDRAW_GLOBAL, *PEDD_DIRECTDRAW_GLOBAL;


partly updated for windows xp and windows 2003, the above struct is from yaun book

NOTE : if any of these flags are set in dwCallbackFlags (struct EDD_DIRECTDRAW_GLOBAL), it means that the respective callback member for it has been filled in by a graphic driver

  1. define EDDDGBL_MISCCALLBACKS 0x001 // ddMiscellanousCallbacks
  2. define EDDDGBL_VIDEOPORTCALLBACKS 0x002 // ddVideoPortCallback
  3. define EDDDGBL_COLORCONTROLCALLBACKS 0x004 // ddColorControlCallbacks
  4. define EDDDGBL_MOTIONCOMPCALLBACKS 0x040 // ddMotionCompCallbacks
  5. define EDDDGBL_MISC2CALLBACKS 0x080 // ddMiscellanous2Callbacks
  6. define EDDDGBL_DDMORECAPS 0x100 // ddMorecaps
  7. define EDDDGBL_D3DCALLBACKS3 0x200 // d3dNtHalCallbacks3
  8. define EDDDGBL_NTCALLBACKS 0x400 // ddNtCallbacks
  9. define EDDDGBL_PRIVATEDRIVERCAPS 0x800 // ddNtPrivateDriverCaps
typedef struct _EDD_DIRECTDRAW_GLOBAL
{
/* 0x000 */    PVOID dhpdev;           // 0x000 <-- verified to match Windows XP, dhpdev, the drv hPDev --> 
/* 0x004 */    DWORD dwReserved1;
/* 0x008 */    DWORD dwReserved2;
/* 0x00C */    LPDDVIDEOPORTCAPS lpDDVideoPortCaps;                     // 0x00C <-- verified to match Win2k3
/* 0x010 */    ULONG unk_0010;
/* 0x014 */    ULONG unk_0014;
/* 0x018 */    LONG cDriverReferences;
/* 0x01C */    ULONG unk_01c;
/* 0x020 */    DWORD dwCallbackFlags;  // 0x020 <-- verified to match Windows XP, dwCallbackFlags
                                                                               
/* 0x024 */    ULONG unk_024;
/* 0x028 */    PVOID   llAssertModeTimeout;                           // 0x028 <-- verified to match Windows XP, llAssertModeTimeout, it is a function call llAssertModeTimeout
                                                                        
/* 0x030 */    DWORD dwNumHeaps;                                       // 0x030 <-- verified to match Windows XP, dwNumHeaps
/* 0x034 */    VIDEOMEMORY *pvmList;                                   // 0x034 <-- verified to match Windows XP, pvmList
/* 0x038 */    DWORD dwNumFourCC;
/* 0x03C */    PDWORD pdwFourCC;
/* 0x040 */    DD_HALINFO ddHalInfo;                                   // 0x040 <-- verified to match Windows XP, ddHalInfo
/* 0x1E0 */    ULONG unk_1e0[17];                                      // unknown DXAPI interface structure
/* 0x224 */    ULONG unk_224;
/* 0x228 */    VIDEO_PORT_AGP_INTERFACE_2 agpInterface;                // AGP interface structure
/* 0x260 */    DDKERNELCAPS ddKernelCaps;
/* 0x26C */    DD_MORECAPS ddMoreCaps;
/* 0x290 */    DD_NTPRIVATEDRIVERCAPS ddNtPrivateDriverCaps;
/* 0x298 */    DD_CALLBACKS ddCallbacks;                               // 0x298 <-- verified to match Windows XP, ddCallbacks
/* 0x2C4 */    DD_SURFACECALLBACKS ddSurfaceCallbacks;                 // 0x2C4 <-- verified to match Windows XP, ddSurfaceCallbacks
/* 0x300 */    DD_PALETTECALLBACKS ddPaletteCallbacks;                 // 0x300 <-- verified to match Windows XP, ddPaletteCallbacks
/* 0x314 */    D3DNTHAL_GLOBALDRIVERDATA d3dNtGlobalDriverData           // 0x314 <-- verified to match Windows XP, d3dNtGlobalDriverData                          
/* 0x3D4 */    D3DNTHAL_CALLBACKS d3dNtHalCallbacks;
/* 0x460 */    DD_D3DBUFCALLBACKS d3dBufCallbacks;
/* 0x47C */    D3DNTHAL_CALLBACKS2 d3dNtHalCallbacks2;
/* 0x498 */    DD_VIDEOPORTCALLBACKS ddVideoPortCallback;              // 0x498 <-- verified to match Windows XP, ddVideoPortCallback
/* 0x4E0 */    DD_MISCELLANEOUSCALLBACKS ddMiscellanousCallbacks;      // 0x4E0 <-- verified to match Windows XP, ddMiscellanousCallbacks
/* 0x4EC */    DD_MISCELLANEOUS2CALLBACKS ddMiscellanous2Callbacks;    // 0x4EC <-- verified to match Windows XP, ddMiscellanous2Callbacks
/* 0x504 */    DD_NTCALLBACKS ddNtCallbacks;
/* 0x504 */    ULONG unk_504[10];
/* 0x518 */    DD_COLORCONTROLCALLBACKS ddColorControlCallbacks;
/* 0x524 */    DD_KERNELCALLBACKS ddKernelCallbacks;
/* 0x534 */    D3DNTHAL_CALLBACKS3 d3dNtHalCallbacks3;
/* 0x54C */    DD_MOTIONCOMPCALLBACKS ddMotionCompCallbacks;
/* 0x57C */    DDMORESURFACECAPS ddMoreSurfaceCaps;
/* 0x5A8 */    EDD_DIRECTDRAW_LOCAL* peDirectDrawLocalList; // 0x5A8 <-- verified to match Windows XP, it is a current local struct, not a list,  peDirectDrawLocalList Current
/* 0x5AC */    EDD_SURFACE* peSurface_LockList;
/* 0x5B0 */    FLONG fl;
/* 0x5B4 */    ULONG cSurfaceLocks;
/* 0x5B8 */    PKEVENT pAssertModeEvent;
/* 0x5Bc */    EDD_SURFACE *peSurfaceCurrent;
/* 0x5C0 */    EDD_SURFACE *peSurfacePrimary;
/* 0x5C4 */    BOOL bSuspended;                             // 0x5C4 <-- verified to match Windows XP, tells dxg to use driver's own api or return error code instead 
/* 0x5C8 */    ULONG unk_5c8[12];
/* 0x5F8 */    RECTL rcbounds;
/* 0x608 */    ULONG unk_608;
/* 0x60c */    HDEV hDev;                                   // 0x60c <-- verified to match Windows XP, The real Pdev, hDev
} EDD_DIRECTDRAW_GLOBAL, *PEDD_DIRECTDRAW_GLOBAL;