From 229fed0315eda0bc4d87945d88ea322ba714918b Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Sat, 19 Mar 2005 10:22:52 +0000 Subject: [PATCH] lite more code. nothing works yet. add some check see if the parama are right. svn path=/trunk/; revision=14191 --- reactos/lib/ddraw/ddraw.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/reactos/lib/ddraw/ddraw.c b/reactos/lib/ddraw/ddraw.c index a4aa8b64521..aced4763b11 100644 --- a/reactos/lib/ddraw/ddraw.c +++ b/reactos/lib/ddraw/ddraw.c @@ -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 @@ HRESULT DDRAW_Create( 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)