[ros-diffs] [greatlrd] 26752: fixing two return code thx Ventron for the info for one of the return code

greatlrd at svn.reactos.org greatlrd at svn.reactos.org
Sun May 13 14:43:51 CEST 2007


Author: greatlrd
Date: Sun May 13 16:43:51 2007
New Revision: 26752

URL: http://svn.reactos.org/svn/reactos?rev=26752&view=rev
Log:
fixing two return code thx Ventron for the info for one of the return code

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

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=26752&r1=26751&r2=26752&view=diff
==============================================================================
--- trunk/reactos/dll/directx/ddraw/Surface/createsurface.c (original)
+++ trunk/reactos/dll/directx/ddraw/Surface/createsurface.c Sun May 13 16:43:51 2007
@@ -28,8 +28,30 @@
     if ( (pDDSD->ddsCaps.dwCaps & DDSCAPS_SYSTEMMEMORY) && 
          (pDDSD->ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY))
     {
-        /* translate the error code I got back to a name */
-        return 0x88760064;
+        return DDERR_INVALIDCAPS;
+    }
+
+    /* check if pDDSD.dwFlags DDSD_LPSURFACE is set or not */
+    if (pDDSD->dwFlags & DDSD_LPSURFACE)
+    {
+        /*
+         *  DDSD_LPSURFACE flag is set now we start vaildate see if
+         *  pDDSD->lpSurface are a pointer or not 
+         */
+        if (IsBadReadPtr(pDDSD->lpSurface,sizeof(LPVOID)))
+        {
+            return DDERR_INVALIDPARAMS;
+        }
+
+        /* more code will follow */
+    }
+    else
+    {
+        /*
+         *  DDSD_LPSURFACE flag is not set we do not handler this case yet
+         */
+
+        /* more code will follow */
     }
 
     return DDERR_GENERIC;




More information about the Ros-diffs mailing list