lite more code.
nothing works yet.
add some check see if the parama are right.
Modified: trunk/reactos/lib/ddraw/ddraw.c
_____
Modified: trunk/reactos/lib/ddraw/ddraw.c
--- trunk/reactos/lib/ddraw/ddraw.c 2005-03-19 09:37:46 UTC (rev
14190)
+++ trunk/reactos/lib/ddraw/ddraw.c 2005-03-19 10:22:52 UTC (rev
14191)
@@ -16,11 +16,15 @@
HRESULT WINAPI DirectDrawCreate(LPGUID lpGUID, LPVOID* lplpDD,
LPUNKNOWN pUnkOuter)
{
- return DDRAW_Create(lpGUID, (LPVOID*) lplpDD, pUnkOuter,
&IID_IDirectDraw, FALSE);
+ if (pUnkOuter==NULL) return DDERR_INVALIDPARAMS;
+ return DDRAW_Create(lpGUID, (LPVOID*) lplpDD, pUnkOuter,
&IID_IDirectDraw, FALSE);
}
HRESULT WINAPI DirectDrawCreateEx(LPGUID lpGUID, LPVOID* lplpDD, REFIID
iid, LPUNKNOWN pUnkOuter)
{
+ if (pUnkOuter==NULL) return DDERR_INVALIDPARAMS;
+ if (!IsEqualGUID(iid, &IID_IDirectDraw7)) return
DDERR_INVALIDPARAMS;
+
return DDRAW_Create(lpGUID, lplpDD, pUnkOuter, iid, TRUE);
}
@@ -81,14 +85,14 @@
now we will assume it is the current display driver
*/
- if (pUnkOuter != NULL) return DDERR_INVALIDPARAMS;
+ /*
desktop = GetWindowDC(GetDesktopWindow());
-
lplpDD = OsThunkDdCreateDirectDrawObject(desktop);
if (lplpDD == NULL) return DDERR_NODIRECTDRAWHW;
+ */
- return DD_OK;
+ return DDERR_NODIRECTDRAWHW;
}
BOOL WINAPI DllMain(HINSTANCE hInstance,DWORD fwdReason, LPVOID
lpvReserved)