Author: greatlrd
Date: Sun Nov 16 05:04:11 2008
New Revision: 37386
URL:
http://svn.reactos.org/svn/reactos?rev=37386&view=rev
Log:
1. Fixed one Crash in DdBlt when the Dest was NULL we should return invaild param
2. Move include of pseh header to rosdraw.h
3. Ported partly old code for Hel DdBlt for ddraw
4. Fixed Bug in Hel startup process, but the code is not finish
Modified:
branches/reactx/reactos/dll/directx/ddraw/Surface/callbacks_surf_hel.c
branches/reactx/reactos/dll/directx/ddraw/Surface/surface_main.c
branches/reactx/reactos/dll/directx/ddraw/main.c
branches/reactx/reactos/dll/directx/ddraw/rosdraw.h
branches/reactx/reactos/dll/directx/ddraw/startup.c
Modified: branches/reactx/reactos/dll/directx/ddraw/Surface/callbacks_surf_hel.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/directx/ddra…
==============================================================================
--- branches/reactx/reactos/dll/directx/ddraw/Surface/callbacks_surf_hel.c [iso-8859-1]
(original)
+++ branches/reactx/reactos/dll/directx/ddraw/Surface/callbacks_surf_hel.c [iso-8859-1]
Sun Nov 16 05:04:11 2008
@@ -17,7 +17,38 @@
DWORD CALLBACK HelDdSurfBlt(LPDDHAL_BLTDATA lpBltData)
{
- DX_STUB;
+
+ if (lpBltData->dwFlags & DDBLT_COLORFILL)
+ {
+
+ HBRUSH hbr = CreateSolidBrush(lpBltData->bltFX.dwFillColor );
+
+ FillRect( (HDC)lpBltData->lpDDDestSurface->lpSurfMore->lpDD_lcl->hDC,
+ (CONST RECT *)&lpBltData->rDest,
+ hbr);
+
+ DeleteObject(hbr);
+
+ lpBltData->ddRVal = DD_OK;
+ }
+
+ else if (lpBltData->dwFlags & DDBLT_ROP)
+ {
+
+ BitBlt( (HDC)lpBltData->lpDDDestSurface->lpSurfMore->lpDD_lcl->hDC,
+ lpBltData->rDest.top,
+ lpBltData->rDest.left,
+ lpBltData->rDest.right,
+ lpBltData->rDest.bottom,
+ (HDC)lpBltData->lpDDSrcSurface->lpSurfMore->lpDD_lcl->hDC,
+ lpBltData->rSrc.top,
+ lpBltData->rSrc.right,
+ lpBltData->bltFX.dwROP);
+
+ lpBltData->ddRVal = DD_OK;
+ }
+
+ return DDHAL_DRIVER_HANDLED;
}
DWORD CALLBACK HelDdSurfDestroySurface(LPDDHAL_DESTROYSURFACEDATA lpDestroySurfaceData)
Modified: branches/reactx/reactos/dll/directx/ddraw/Surface/surface_main.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/directx/ddra…
==============================================================================
--- branches/reactx/reactos/dll/directx/ddraw/Surface/surface_main.c [iso-8859-1]
(original)
+++ branches/reactx/reactos/dll/directx/ddraw/Surface/surface_main.c [iso-8859-1] Sun Nov
16 05:04:11 2008
@@ -11,6 +11,7 @@
#include "rosdraw.h"
+
/* FIXME adding hal and hel stub
DestroySurface;
SetClipList;
@@ -272,117 +273,132 @@
return This->dwIntRefCnt;
}
+
HRESULT WINAPI Main_DDrawSurface_Blt(LPDDRAWI_DDRAWSURFACE_INT ThisDest, LPRECT rdst,
- LPDDRAWI_DDRAWSURFACE_INT ThisSrc, LPRECT rsrc, DWORD dwFlags, LPDDBLTFX lpbltfx)
-{
-
- DDHAL_BLTDATA mDdBlt;
-
- DX_WINDBG_trace();
-
- if (( ThisDest->lpLcl->lpGbl->lpDD->lpDDCBtmp->HALDDSurface.dwFlags
- & DDHAL_SURFCB32_BLT) != DDHAL_SURFCB32_BLT)
- {
- return DDERR_GENERIC;
- }
-
- ZeroMemory(&mDdBlt, sizeof(DDHAL_BLTDATA));
- ZeroMemory(&mDdBlt.bltFX, sizeof(DDBLTFX));
-
- if (!DdResetVisrgn( ThisDest->lpLcl->lpSurfMore->slist[0], NULL))
- {
- DX_STUB_str("DdResetVisrgn failed");
+ LPDDRAWI_DDRAWSURFACE_INT ThisSrc, LPRECT rsrc,
DWORD dwFlags, LPDDBLTFX lpbltfx)
+{
+ DDHAL_BLTDATA mDdBlt;
+
+ DX_WINDBG_trace();
+
+ if (ThisDest == NULL)
+ {
+ return DDERR_INVALIDPARAMS;
+ }
+
+ /* Zero out members in DDHAL_BLTDATA */
+ ZeroMemory(&mDdBlt, sizeof(DDHAL_BLTDATA));
+ ZeroMemory(&mDdBlt.bltFX, sizeof(DDBLTFX));
+
+ /* Check if we got HAL support for this api */
+ if (( ThisDest->lpLcl->lpGbl->lpDD->lpDDCBtmp->HALDDSurface.dwFlags
&
+ DDHAL_SURFCB32_BLT) == DDHAL_SURFCB32_BLT)
+ {
+ mDdBlt.Blt =
ThisDest->lpLcl->lpSurfMore->lpDD_lcl->lpGbl->lpDDCBtmp->HALDDSurface.Blt;
+ }
+ /* Check if we got HEL support for this api */
+ else if ((
ThisDest->lpLcl->lpGbl->lpDD->lpDDCBtmp->HELDDSurface.dwFlags &
+ DDHAL_SURFCB32_BLT) == DDHAL_SURFCB32_BLT)
+ {
+ mDdBlt.Blt =
ThisDest->lpLcl->lpSurfMore->lpDD_lcl->lpGbl->lpDDCBtmp->HELDDSurface.Blt;
+ }
+
+ /* check see if we got any of them */
+ if (mDdBlt.Blt == NULL)
+ {
+ return DDERR_GENERIC;
+ }
+
+ /* Prepare for draw, if we do not rest the DdResetVisrgn some graphice card will not
draw on the screen */
+ if (!DdResetVisrgn( ThisDest->lpLcl->lpSurfMore->slist[0], NULL))
+ {
+ DX_STUB_str("DdResetVisrgn failed");
+ }
+
+ mDdBlt.lpDD = ThisDest->lpLcl->lpSurfMore->lpDD_lcl->lpGbl;
+ mDdBlt.lpDDDestSurface = ThisDest->lpLcl->lpSurfMore->slist[0];
+ ThisDest->lpLcl->lpSurfMore->slist[0]->hDC =
ThisDest->lpLcl->lpSurfMore->lpDD_lcl->hDC;
+
+ /* Setup Src */
+ if (( ThisSrc != NULL ) )
+ {
+
+ mDdBlt.lpDDSrcSurface = ThisSrc->lpLcl->lpSurfMore->slist[0];
+ ThisSrc->lpLcl->lpSurfMore->slist[0]->hDC =
ThisSrc->lpLcl->lpSurfMore->lpDD_lcl->hDC;
+
+ if (rsrc != NULL)
+ {
+ memmove(&mDdBlt.rSrc, rsrc, sizeof (RECTL));
+ }
+ else
+ {
+
if(!GetWindowRect((HWND)ThisSrc->lpLcl->lpSurfMore->lpDD_lcl->hWnd,
+ (RECT *)&mDdBlt.rSrc))
+ {
+ DX_STUB_str("GetWindowRect failed");
+ }
+ }
+
+ /* FIXME
+ * compare so we do not write to far
+ * ThisDest->lpLcl->lpGbl->wWidth; <- surface max width
+ * ThisDest->lpLcl->lpGbl->wHeight <- surface max heght
+ * ThisDest->lpLcl->lpGbl->lPitch <- surface bpp
+ */
+
+ }
+
+ /* Setup dest */
+ if (rdst != NULL)
+ {
+ memmove(&mDdBlt.rDest, rdst, sizeof (RECTL));
+ }
+ else
+ {
+ if
(!GetWindowRect((HWND)ThisDest->lpLcl->lpSurfMore->lpDD_lcl->hWnd,
+ (RECT *)&mDdBlt.rDest))
+ {
+ DX_STUB_str("GetWindowRect failed");
+ }
+ }
+
+ /* FIXME
+ * compare so we do not write to far
+ * ThisDest->lpLcl->lpGbl->wWidth; <- surface max width
+ * ThisDest->lpLcl->lpGbl->wHeight <- surface max heght
+ * ThisDest->lpLcl->lpGbl->lPitch <- surface bpp
+ */
+
+
+ /* setup bltFX */
+ if (lpbltfx != NULL)
+ {
+ memmove(&mDdBlt.bltFX, lpbltfx, sizeof (DDBLTFX));
+ }
+
+ /* setup value that are not config yet */
+ mDdBlt.dwFlags = dwFlags;
+ mDdBlt.IsClipped = FALSE;
+ mDdBlt.bltFX.dwSize = sizeof(DDBLTFX);
+
+
+ /* FIXME
+ BltData.dwRectCnt
+ BltData.dwROPFlags
+ BltData.IsClipped
+ BltData.prDestRects
+ BltData.rOrigDest
+ BltData.rOrigSrc
+ BltData.ddRVal
+ */
+
+ if (mDdBlt.Blt(&mDdBlt) != DDHAL_DRIVER_HANDLED)
+ {
+ DX_STUB_str("mDdBlt DDHAL_DRIVER_HANDLED");
+ return DDERR_NOBLTHW;
}
- mDdBlt.lpDD = ThisDest->lpLcl->lpSurfMore->lpDD_lcl->lpGbl;
- mDdBlt.Blt =
ThisDest->lpLcl->lpSurfMore->lpDD_lcl->lpGbl->lpDDCBtmp->HALDDSurface.Blt;
- mDdBlt.lpDDDestSurface = ThisDest->lpLcl->lpSurfMore->slist[0];
-
- ThisDest->lpLcl->lpSurfMore->slist[0]->hDC =
- ThisDest->lpLcl->lpSurfMore->lpDD_lcl->hDC;
-
- /* Setup Src */
- if (ThisSrc != NULL)
- {
- mDdBlt.lpDDSrcSurface = ThisSrc->lpLcl->lpSurfMore->slist[0];
-
- ThisSrc->lpLcl->lpSurfMore->slist[0]->hDC =
- ThisSrc->lpLcl->lpSurfMore->lpDD_lcl->hDC;
-
- if (rsrc != NULL)
- {
- memmove(&mDdBlt.rSrc, rsrc, sizeof (RECTL));
- }
- else
- {
- if(!GetWindowRect((HWND)ThisSrc->lpLcl->lpSurfMore->lpDD_lcl->hWnd,
- (RECT *)&mDdBlt.rSrc))
- {
- DX_STUB_str("GetWindowRect failed");
- }
- }
-
- /* FIXME
- * compare so we do not write to far
- * ThisDest->lpLcl->lpGbl->wWidth; <- surface max width
- * ThisDest->lpLcl->lpGbl->wHeight <- surface max heght
- * ThisDest->lpLcl->lpGbl->lPitch <- surface bpp
- */
-
- }
-
- /* Setup dest */
- if (rdst != NULL)
- {
- memmove(&mDdBlt.rDest, rdst, sizeof (RECTL));
- }
- else
- {
- if(!GetWindowRect((HWND)ThisDest->lpLcl->lpSurfMore->lpDD_lcl->hWnd,
- (RECT *)&mDdBlt.rDest))
- {
- DX_STUB_str("GetWindowRect failed");
- }
-
- }
-
- /* FIXME
- * compare so we do not write to far
- * ThisDest->lpLcl->lpGbl->wWidth; <- surface max width
- * ThisDest->lpLcl->lpGbl->wHeight <- surface max heght
- * ThisDest->lpLcl->lpGbl->lPitch <- surface bpp
- */
-
-
- /* setup bltFX */
- if (lpbltfx != NULL)
- {
- memmove(&mDdBlt.bltFX, lpbltfx, sizeof (DDBLTFX));
- }
-
- /* setup value that are not config yet */
- mDdBlt.dwFlags = dwFlags;
- mDdBlt.IsClipped = FALSE;
- mDdBlt.bltFX.dwSize = sizeof(DDBLTFX);
-
-
- /* FIXME
- BltData.dwRectCnt
- BltData.dwROPFlags
- BltData.IsClipped
- BltData.prDestRects
- BltData.rOrigDest
- BltData.rOrigSrc
- BltData.ddRVal
- */
-
- if (mDdBlt.Blt(&mDdBlt) != DDHAL_DRIVER_HANDLED)
- {
- DX_STUB_str("mDdBlt DDHAL_DRIVER_HANDLED");
- return DDERR_NOBLTHW;
- }
-
- return mDdBlt.ddRVal;
+ return mDdBlt.ddRVal;
}
Modified: branches/reactx/reactos/dll/directx/ddraw/main.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/directx/ddra…
==============================================================================
--- branches/reactx/reactos/dll/directx/ddraw/main.c [iso-8859-1] (original)
+++ branches/reactx/reactos/dll/directx/ddraw/main.c [iso-8859-1] Sun Nov 16 05:04:11
2008
@@ -13,9 +13,6 @@
#include "rosdraw.h"
HMODULE hDllModule = 0;
-/* PSEH for SEH Support */
-#include <pseh/pseh.h>
-
CRITICAL_SECTION ddcs;
// This function is exported by the dll
@@ -99,7 +96,7 @@
*/
DX_WINDBG_trace();
- _SEH_TRY
+ _SEH_TRY
{
/* check if pUnkOuter is null or not */
if (pUnkOuter)
Modified: branches/reactx/reactos/dll/directx/ddraw/rosdraw.h
URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/directx/ddra…
==============================================================================
--- branches/reactx/reactos/dll/directx/ddraw/rosdraw.h [iso-8859-1] (original)
+++ branches/reactx/reactos/dll/directx/ddraw/rosdraw.h [iso-8859-1] Sun Nov 16 05:04:11
2008
@@ -1,13 +1,20 @@
#ifndef __DDRAW_PRIVATE
#define __DDRAW_PRIVATE
+#define WIN32_NO_STATUS
+#define NTOS_MODE_USER
+
/********* Includes *********/
#include <windows.h>
+#include <ndk/ntndk.h>
+
+
#include <stdio.h>
#include <ddraw.h>
#include <ddrawi.h>
#include <d3dhal.h>
#include <ddrawgdi.h>
+#include <pseh/pseh.h>
#include "Ddraw/ddraw.h"
#include "Surface/surface.h"
Modified: branches/reactx/reactos/dll/directx/ddraw/startup.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/directx/ddra…
==============================================================================
--- branches/reactx/reactos/dll/directx/ddraw/startup.c [iso-8859-1] (original)
+++ branches/reactx/reactos/dll/directx/ddraw/startup.c [iso-8859-1] Sun Nov 16 05:04:11
2008
@@ -190,9 +190,6 @@
ddgbl.lpDriverHandle = &ddgbl;
ddgbl.hDDVxd = -1;
-
-
-
if (reenable == FALSE)
{
if ((!IsBadReadPtr(This->lpLink,sizeof(LPDIRECTDRAW))) &&
(This->lpLink == NULL))
@@ -236,8 +233,6 @@
RtlCopyMemory(&ddgbl.cObsolete,&"DISPLAY",7);
RtlCopyMemory(&ddgbl.cDriverName,&"DISPLAY",7);
dwFlags |= DDRAWI_DISPLAYDRV | DDRAWI_GDIDRV;
-
-
}
else if (lpGuid == (LPGUID) DDCREATE_HARDWAREONLY)
{
@@ -289,7 +284,6 @@
/* Startup HEL and HAL */
This->lpLcl->lpDDCB = This->lpLcl->lpGbl->lpDDCBtmp;
This->lpLcl->dwProcessId = GetCurrentProcessId();
-
switch (devicetypes)
{
case 2:
@@ -305,8 +299,9 @@
default:
hal_ret = StartDirectDrawHal(iface, reenable);
hel_ret = StartDirectDrawHel(iface, reenable);
- }
-
+ break;
+ }
+DX_STUB_str("here\n");
if (hal_ret!=DD_OK)
{
if (hel_ret!=DD_OK)
@@ -362,18 +357,34 @@
{
LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT)iface;
- This->lpLcl->lpGbl->lpDDCBtmp->HELDD.CanCreateSurface =
HelDdCanCreateSurface;
- This->lpLcl->lpGbl->lpDDCBtmp->HELDD.CreateSurface =
HelDdCreateSurface;
- This->lpLcl->lpGbl->lpDDCBtmp->HELDD.CreatePalette =
HelDdCreatePalette;
- This->lpLcl->lpGbl->lpDDCBtmp->HELDD.DestroyDriver =
HelDdDestroyDriver;
- This->lpLcl->lpGbl->lpDDCBtmp->HELDD.FlipToGDISurface =
HelDdFlipToGDISurface;
- This->lpLcl->lpGbl->lpDDCBtmp->HELDD.GetScanLine =
HelDdGetScanLine;
- This->lpLcl->lpGbl->lpDDCBtmp->HELDD.SetColorKey =
HelDdSetColorKey;
- This->lpLcl->lpGbl->lpDDCBtmp->HELDD.SetExclusiveMode =
HelDdSetExclusiveMode;
- This->lpLcl->lpGbl->lpDDCBtmp->HELDD.SetMode =
HelDdSetMode;
- This->lpLcl->lpGbl->lpDDCBtmp->HELDD.WaitForVerticalBlank =
HelDdWaitForVerticalBlank;
-
- This->lpLcl->lpGbl->lpDDCBtmp->HELDD.dwFlags =
DDHAL_CB32_CANCREATESURFACE |
+ if (reenable == FALSE)
+ {
+ if (ddgbl.lpDDCBtmp == NULL)
+ {
+ DxHeapMemAlloc(ddgbl.lpDDCBtmp, sizeof(DDHAL_CALLBACKS));
+ if ( ddgbl.lpDDCBtmp == NULL)
+ {
+ return DD_FALSE;
+ }
+ }
+ }
+ else
+ {
+ RtlZeroMemory(ddgbl.lpDDCBtmp,sizeof(DDHAL_CALLBACKS));
+ }
+
+ ddgbl.lpDDCBtmp->HELDD.CanCreateSurface = HelDdCanCreateSurface;
+ ddgbl.lpDDCBtmp->HELDD.CreateSurface = HelDdCreateSurface;
+ ddgbl.lpDDCBtmp->HELDD.CreatePalette = HelDdCreatePalette;
+ ddgbl.lpDDCBtmp->HELDD.DestroyDriver = HelDdDestroyDriver;
+ ddgbl.lpDDCBtmp->HELDD.FlipToGDISurface = HelDdFlipToGDISurface;
+ ddgbl.lpDDCBtmp->HELDD.GetScanLine = HelDdGetScanLine;
+ ddgbl.lpDDCBtmp->HELDD.SetColorKey = HelDdSetColorKey;
+ ddgbl.lpDDCBtmp->HELDD.SetExclusiveMode = HelDdSetExclusiveMode;
+ ddgbl.lpDDCBtmp->HELDD.SetMode = HelDdSetMode;
+ ddgbl.lpDDCBtmp->HELDD.WaitForVerticalBlank = HelDdWaitForVerticalBlank;
+
+ ddgbl.lpDDCBtmp->HELDD.dwFlags = DDHAL_CB32_CANCREATESURFACE |
DDHAL_CB32_CREATESURFACE |
DDHAL_CB32_CREATEPALETTE |
DDHAL_CB32_DESTROYDRIVER |
@@ -384,23 +395,23 @@
DDHAL_CB32_SETMODE |
DDHAL_CB32_WAITFORVERTICALBLANK ;
- This->lpLcl->lpGbl->lpDDCBtmp->HELDD.dwSize =
sizeof(This->lpLcl->lpDDCB->HELDD);
-
- This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.AddAttachedSurface =
HelDdSurfAddAttachedSurface;
- This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.Blt = HelDdSurfBlt;
- This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.DestroySurface =
HelDdSurfDestroySurface;
- This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.Flip = HelDdSurfFlip;
- This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.GetBltStatus =
HelDdSurfGetBltStatus;
- This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.GetFlipStatus =
HelDdSurfGetFlipStatus;
- This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.Lock = HelDdSurfLock;
- This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.reserved4 =
HelDdSurfreserved4;
- This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.SetClipList =
HelDdSurfSetClipList;
- This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.SetColorKey =
HelDdSurfSetColorKey;
- This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.SetOverlayPosition =
HelDdSurfSetOverlayPosition;
- This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.SetPalette =
HelDdSurfSetPalette;
- This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.Unlock = HelDdSurfUnlock;
- This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.UpdateOverlay =
HelDdSurfUpdateOverlay;
- This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.dwFlags =
DDHAL_SURFCB32_ADDATTACHEDSURFACE |
+ ddgbl.lpDDCBtmp->HELDD.dwSize = sizeof(This->lpLcl->lpDDCB->HELDD);
+
+ ddgbl.lpDDCBtmp->HELDDSurface.AddAttachedSurface = HelDdSurfAddAttachedSurface;
+ ddgbl.lpDDCBtmp->HELDDSurface.Blt = HelDdSurfBlt;
+ ddgbl.lpDDCBtmp->HELDDSurface.DestroySurface = HelDdSurfDestroySurface;
+ ddgbl.lpDDCBtmp->HELDDSurface.Flip = HelDdSurfFlip;
+ ddgbl.lpDDCBtmp->HELDDSurface.GetBltStatus = HelDdSurfGetBltStatus;
+ ddgbl.lpDDCBtmp->HELDDSurface.GetFlipStatus = HelDdSurfGetFlipStatus;
+ ddgbl.lpDDCBtmp->HELDDSurface.Lock = HelDdSurfLock;
+ ddgbl.lpDDCBtmp->HELDDSurface.reserved4 = HelDdSurfreserved4;
+ ddgbl.lpDDCBtmp->HELDDSurface.SetClipList = HelDdSurfSetClipList;
+ ddgbl.lpDDCBtmp->HELDDSurface.SetColorKey = HelDdSurfSetColorKey;
+ ddgbl.lpDDCBtmp->HELDDSurface.SetOverlayPosition = HelDdSurfSetOverlayPosition;
+ ddgbl.lpDDCBtmp->HELDDSurface.SetPalette = HelDdSurfSetPalette;
+ ddgbl.lpDDCBtmp->HELDDSurface.Unlock = HelDdSurfUnlock;
+ ddgbl.lpDDCBtmp->HELDDSurface.UpdateOverlay = HelDdSurfUpdateOverlay;
+ ddgbl.lpDDCBtmp->HELDDSurface.dwFlags = DDHAL_SURFCB32_ADDATTACHEDSURFACE |
DDHAL_SURFCB32_BLT |
DDHAL_SURFCB32_DESTROYSURFACE |
DDHAL_SURFCB32_FLIP |
@@ -415,7 +426,7 @@
DDHAL_SURFCB32_UNLOCK |
DDHAL_SURFCB32_UPDATEOVERLAY;
- This->lpLcl->lpGbl->lpDDCBtmp->HELDDSurface.dwSize =
sizeof(This->lpLcl->lpDDCB->HELDDSurface);
+ ddgbl.lpDDCBtmp->HELDDSurface.dwSize =
sizeof(This->lpLcl->lpDDCB->HELDDSurface);
/*
This->lpLcl->lpDDCB->HELDDPalette.DestroyPalette = HelDdPalDestroyPalette;