[ros-diffs] [greatlrd] 26737: fixing smaller bugs

greatlrd at svn.reactos.org greatlrd at svn.reactos.org
Fri Jun 8 17:41:38 CEST 2007


Author: greatlrd
Date: Sat May 12 22:33:28 2007
New Revision: 26737

URL: http://svn.reactos.org/svn/reactos?rev=26737&view=rev
Log:
fixing smaller bugs

Modified:
    trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c
    trunk/reactos/dll/directx/ddraw/Surface/createsurface.c

Modified: trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c?rev=26737&r1=26736&r2=26737&view=diff
==============================================================================
--- trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c (original)
+++ trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c Sat May 12 22:33:28 2007
@@ -130,10 +130,13 @@
 
    DX_WINDBG_trace();
 
+   /* FIXME vaildate input pointers or warp everthing with SEH */
+
    if (pUnkOuter)
-	   return DDERR_GENERIC;
-
-   /* FIXME vaildate input pointers or warp everthing with SEH */
+   {
+       /* FIXME send back right return code */
+        return DDERR_GENERIC;
+   }
 
    EnterCriticalSection(&ddcs);
 
@@ -164,12 +167,20 @@
        return  DDERR_INVALIDPARAMS;
    }
 
-   /* FIXME add one gbl check with one pDDSD check */
-  ret = Internal_CreateSurface(dd_int,ppSurf,&dd_desc_v2);
+   /* check if this process belong to this ddraw */
+   if ( dd_int->lcl->dwProcessId != GetCurrentProcessId() )
+   {
+       /* FIXME send back right return code */
+        return  DDERR_GENERIC;
+   }
+
+  ret = internal_CreateSurface(dd_int,dd_desc_v2,ppSurf,pUnkOuter);
 
   LeaveCriticalSection(&ddcs);
   return ret;
 }
+
+
 
 IDirectDraw7Vtbl DirectDraw7_Vtable =
 {

Modified: trunk/reactos/dll/directx/ddraw/Surface/createsurface.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/Surface/createsurface.c?rev=26737&r1=26736&r2=26737&view=diff
==============================================================================
--- trunk/reactos/dll/directx/ddraw/Surface/createsurface.c (original)
+++ trunk/reactos/dll/directx/ddraw/Surface/createsurface.c Sat May 12 22:33:28 2007
@@ -21,6 +21,7 @@
 {
     RtlZeroMemory(dst_pDesc,sizeof(DDSURFACEDESC2));
     RtlCopyMemory(dst_pDesc,src_pDesc,sizeof(DDSURFACEDESC));
+    dst_pDesc->dwSize =  sizeof(DDSURFACEDESC2);
 }
 
 




More information about the Ros-diffs mailing list