Author: greatlrd
Date: Sat Jun 16 20:42:50 2007
New Revision: 27205
URL:
http://svn.reactos.org/svn/reactos?rev=27205&view=rev
Log:
adding allot of fix and partly implement
1. Adding table lockup for directdraw 1-6 but they are not complete
2. remove out GetDevicreIdentifer to own file it is a large functions
3. Fixed DirectDrawCreate works now
4. found out bit more how DirectDraw_QueryInterface works and comment the new found
5. add the new table to QueryInterface they are partly support now, the new IID is
IID_IDirectDraw4, IID_IDirectDraw2 and IID_IDirectDraw it partly support now.
Added:
trunk/reactos/dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c (with props)
Modified:
trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c
trunk/reactos/dll/directx/ddraw/Surface/surface_main.c
trunk/reactos/dll/directx/ddraw/Surface/surface_stubs.c
trunk/reactos/dll/directx/ddraw/ddraw.rbuild
trunk/reactos/dll/directx/ddraw/main.c
Added: trunk/reactos/dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/Ddraw/Ge…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c (added)
+++ trunk/reactos/dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c Sat Jun 16 20:42:50 2007
@@ -1,0 +1,190 @@
+/* $Id$
+ *
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS DirectX
+ * FILE: ddraw/ddraw/GetDeviceIdentifier.c
+ * PURPOSE: IDirectDraw7 Implementation
+ * PROGRAMMER: Magnus Olsen
+ *
+ */
+
+/* TODO
+ * We need adding digtial signarture detections for the drivers
+ * and count out which level the signtature driver got, the value
+ * shall be save to pDDDI->dwWHQLLevel, But I do not known how todo
+ * this part yet, That is only missing feature in this functions
+ *
+ * Write a UML digram for this api
+ */
+
+#include "rosdraw.h"
+
+#include <string.h>
+
+/* PSEH for SEH Support */
+#include <pseh/pseh.h>
+/* For DirectDraw 4 - 6 */
+HRESULT WINAPI
+Main_DirectDraw_GetDeviceIdentifier(LPDIRECTDRAW4 iface,
+ LPDDDEVICEIDENTIFIER pDDDI, DWORD dwFlags)
+{
+ HRESULT retVal = DD_OK;
+ DDDEVICEIDENTIFIER2 pDDDI2;
+
+ ZeroMemory(&pDDDI2,sizeof(DDDEVICEIDENTIFIER2));
+
+ _SEH_TRY
+ {
+ memcpy(&pDDDI2 , pDDDI, sizeof(DDDEVICEIDENTIFIER));
+
+ retVal = Main_DirectDraw_GetDeviceIdentifier7((LPDIRECTDRAW7)iface, &pDDDI2,
dwFlags);
+
+ if (IsBadWritePtr(pDDDI, sizeof(DDDEVICEIDENTIFIER)))
+ {
+ retVal = DDERR_INVALIDPARAMS;
+ }
+ else
+ {
+ memcpy(pDDDI , &pDDDI2, sizeof(DDDEVICEIDENTIFIER) );
+ }
+ }
+ _SEH_HANDLE
+ {
+ retVal = DD_FALSE;
+ }
+ _SEH_END;
+
+ return retVal;
+}
+
+HRESULT WINAPI
+Main_DirectDraw_GetDeviceIdentifier7(LPDIRECTDRAW7 iface,
+ LPDDDEVICEIDENTIFIER2 pDDDI, DWORD dwFlags)
+{
+ HRESULT retVal = DDERR_INVALIDPARAMS;
+
+ BOOL found = FALSE;
+ DWORD iDevNum = 0;
+ DISPLAY_DEVICEA DisplayDeviceA;
+ HKEY hKey;
+ DWORD lpType = 0;
+ DWORD strSize = MAX_DDDEVICEID_STRING;
+ char *pdest;
+ char* pcCnvEnd;
+ long *lpdata;
+
+ LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT) iface;
+
+ DX_WINDBG_trace();
+
+ _SEH_TRY
+ {
+ if ( (IsBadWritePtr( pDDDI, sizeof(DDDEVICEIDENTIFIER2) ) ) ||
+ (dwFlags & ~DDGDI_GETHOSTIDENTIFIER))
+ {
+ retVal = DDERR_INVALIDPARAMS;
+ _SEH_LEAVE;
+ }
+
+ /* now we can start getting the driver data */
+
+ while (1)
+ {
+ ZeroMemory(&DisplayDeviceA,sizeof(DISPLAY_DEVICEA));
+
+ DisplayDeviceA.cb = sizeof(DISPLAY_DEVICEA);
+
+ if ( EnumDisplayDevicesA( NULL, iDevNum, &DisplayDeviceA, 0) == 0)
+ {
+ retVal = DDERR_INVALIDPARAMS;
+ break;
+ }
+
+ if (!_stricmp(DisplayDeviceA.DeviceName,
This->lpLcl->lpGbl->cDriverName))
+ {
+ /* if we got another device like hardware mpeg decoder or video card or
another drv */
+ found = TRUE;
+ }
+ else if (DisplayDeviceA.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE)
+ {
+ /* double check if it primary driver we just found */
+ if (!_stricmp( This->lpLcl->lpGbl->cDriverName,
"DISPLAY"))
+ {
+ /* yeah we found it */
+ found = TRUE;
+ }
+ }
+
+ if (found == TRUE)
+ {
+ /* we found our driver now we start setup it */
+ if
(!_strnicmp(DisplayDeviceA.DeviceKey,"\\REGISTRY\\Machine\\",18))
+ {
+ if (RegOpenKeyExA(HKEY_LOCAL_MACHINE,
&DisplayDeviceA.DeviceKey[18], 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS )
+ {
+
+ if (RegQueryValueExA(hKey, "InstalledDisplayDrivers",0,
&lpType, (LPBYTE)pDDDI->szDriver, &strSize) != ERROR_SUCCESS)
+ {
+ ZeroMemory(pDDDI->szDriver,MAX_DDDEVICEID_STRING);
+ }
+ else
+ {
+ strcat(pDDDI->szDriver,".dll");
+ }
+ RegCloseKey(hKey);
+ }
+
+ strcpy( pDDDI->szDescription, DisplayDeviceA.DeviceString);
+ pDDDI->liDriverVersion.HighPart = 0;
+ pDDDI->liDriverVersion.LowPart = 0;
+
+ pdest = strstr(DisplayDeviceA.DeviceID,"REV_");
+ pDDDI->dwRevision = strtol ( &pdest[4], &pcCnvEnd, 16);
+
+ pdest = strstr(DisplayDeviceA.DeviceID,"SUBSYS_");
+ pDDDI->dwSubSysId = strtol ( &pdest[7], &pcCnvEnd, 16);
+
+ pdest = strstr(DisplayDeviceA.DeviceID,"DEV_");
+ pDDDI->dwDeviceId = strtol ( &pdest[4], &pcCnvEnd, 16);
+
+ pdest = strstr(DisplayDeviceA.DeviceID,"VEN_");
+ pDDDI->dwVendorId =strtol ( &pdest[4], &pcCnvEnd, 16);
+
+ /* Count out the guidDeviceIdentifier */
+ memcpy(&pDDDI->guidDeviceIdentifier,
&CLSID_DirectDraw,sizeof(GUID));
+
+ pDDDI->guidDeviceIdentifier.Data1 ^= pDDDI->dwVendorId;
+
+ lpdata = (long *)&pDDDI->guidDeviceIdentifier.Data2;
+ *lpdata ^= pDDDI->dwDeviceId;
+
+ lpdata = (long *)&pDDDI->guidDeviceIdentifier.Data4;
+ *lpdata = (*lpdata ^ pDDDI->dwSubSysId) ^
pDDDI->liDriverVersion.LowPart;
+
+ lpdata = (long *)&pDDDI->guidDeviceIdentifier.Data4[4];
+ *lpdata = (*lpdata ^ pDDDI->dwRevision) ^
pDDDI->liDriverVersion.HighPart;
+
+ /* FIXME pDDDI->dwWHQLLevel
+ * we leave this with no informations, I do not known
+ * if program care for it, I mark this api done, and
+ * tested, no bugs was found in it
+ */
+ pDDDI->dwWHQLLevel = 0;
+ retVal = DD_OK;
+ }
+
+ break;
+ }
+
+ iDevNum++;
+ }
+
+ }
+ _SEH_HANDLE
+ {
+ retVal = DD_FALSE;
+ }
+ _SEH_END;
+
+ return retVal;
+}
Propchange: trunk/reactos/dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/reactos/dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/Ddraw/dd…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c (original)
+++ trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c Sat Jun 16 20:42:50 2007
@@ -8,6 +8,11 @@
*
*/
+/* TODO
+ * add warper functions for dx 1 - 6
+ * map the DirectDraw4_Vtable, DirectDraw2_Vtable, DirectDraw_Vtable
+ * table to right version of the functions
+ */
#include "rosdraw.h"
@@ -34,9 +39,42 @@
*/
if (IsEqualGUID(&IID_IDirectDraw7, id))
{
+ /* FIXME linking */
+
/* DirectDraw7 Vtable */
This->lpVtbl = &DirectDraw7_Vtable;
This->lpLcl->dwLocalFlags = This->lpLcl->dwLocalFlags +
DDRAWILCL_DIRECTDRAW7;
+ *obj = &This->lpVtbl;
+ Main_DirectDraw_AddRef(iface);
+ }
+ else if (IsEqualGUID(&IID_IDirectDraw4, id))
+ {
+ /* FIXME linking */
+
+ /* DirectDraw4 Vtable */
+ This->lpVtbl = &DirectDraw4_Vtable;
+ This->lpLcl->dwLocalFlags = This->lpLcl->dwLocalFlags;
+ *obj = &This->lpVtbl;
+ Main_DirectDraw_AddRef(iface);
+ }
+ else if (IsEqualGUID(&IID_IDirectDraw2, id))
+ {
+ /* FIXME linking */
+
+
+ /* DirectDraw4 Vtable */
+ This->lpVtbl = &DirectDraw2_Vtable;
+ This->lpLcl->dwLocalFlags = This->lpLcl->dwLocalFlags;
+ *obj = &This->lpVtbl;
+ Main_DirectDraw_AddRef(iface);
+ }
+ else if (IsEqualGUID(&IID_IDirectDraw, id))
+ {
+ /* FIXME linking */
+
+ /* DirectDraw4 Vtable */
+ This->lpVtbl = &DirectDraw_Vtable;
+ This->lpLcl->dwLocalFlags = This->lpLcl->dwLocalFlags;
*obj = &This->lpVtbl;
Main_DirectDraw_AddRef(iface);
}
@@ -415,171 +453,7 @@
return ret;
}
-/* For DirectDraw 4 - 6 */
-HRESULT WINAPI
-Main_DirectDraw_GetDeviceIdentifier(LPDIRECTDRAW4 iface,
- LPDDDEVICEIDENTIFIER pDDDI, DWORD dwFlags)
-{
- HRESULT retVal = DD_OK;
- DDDEVICEIDENTIFIER2 pDDDI2;
-
- ZeroMemory(&pDDDI2,sizeof(DDDEVICEIDENTIFIER2));
-
- _SEH_TRY
- {
- memcpy(&pDDDI2 , pDDDI, sizeof(DDDEVICEIDENTIFIER));
-
- retVal = Main_DirectDraw_GetDeviceIdentifier7((LPDIRECTDRAW7)iface, &pDDDI2,
dwFlags);
-
- if (IsBadWritePtr(pDDDI, sizeof(DDDEVICEIDENTIFIER)))
- {
- retVal = DDERR_INVALIDPARAMS;
- }
- else
- {
- memcpy(pDDDI , &pDDDI2, sizeof(DDDEVICEIDENTIFIER) );
- }
- }
- _SEH_HANDLE
- {
- retVal = DD_FALSE;
- }
- _SEH_END;
-
- return retVal;
-}
-
-HRESULT WINAPI
-Main_DirectDraw_GetDeviceIdentifier7(LPDIRECTDRAW7 iface,
- LPDDDEVICEIDENTIFIER2 pDDDI, DWORD dwFlags)
-{
- HRESULT retVal = DDERR_INVALIDPARAMS;
-
- BOOL found = FALSE;
- DWORD iDevNum = 0;
- DISPLAY_DEVICEA DisplayDeviceA;
- HKEY hKey;
- DWORD lpType = 0;
- DWORD strSize = MAX_DDDEVICEID_STRING;
- char *pdest;
- char* pcCnvEnd;
- long *lpdata;
-
- LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT) iface;
-
- DX_WINDBG_trace();
-
- _SEH_TRY
- {
- if ( (IsBadWritePtr( pDDDI, sizeof(DDDEVICEIDENTIFIER2) ) ) ||
- (dwFlags & ~DDGDI_GETHOSTIDENTIFIER))
- {
- retVal = DDERR_INVALIDPARAMS;
- _SEH_LEAVE;
- }
-
- /* now we can start getting the driver data */
-
- while (1)
- {
- ZeroMemory(&DisplayDeviceA,sizeof(DISPLAY_DEVICEA));
-
- DisplayDeviceA.cb = sizeof(DISPLAY_DEVICEA);
-
- if ( EnumDisplayDevicesA( NULL, iDevNum, &DisplayDeviceA, 0) == 0)
- {
- retVal = DDERR_INVALIDPARAMS;
- break;
- }
-
- if (!_stricmp(DisplayDeviceA.DeviceName,
This->lpLcl->lpGbl->cDriverName))
- {
- /* if we got another device like hardware mpeg decoder or video card or
another drv */
- found = TRUE;
- }
- else if (DisplayDeviceA.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE)
- {
- /* double check if it primary driver we just found */
- if (!_stricmp( This->lpLcl->lpGbl->cDriverName,
"DISPLAY"))
- {
- /* yeah we found it */
- found = TRUE;
- }
- }
-
- if (found == TRUE)
- {
- /* we found our driver now we start setup it */
- if
(!_strnicmp(DisplayDeviceA.DeviceKey,"\\REGISTRY\\Machine\\",18))
- {
- if (RegOpenKeyExA(HKEY_LOCAL_MACHINE,
&DisplayDeviceA.DeviceKey[18], 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS )
- {
-
- if (RegQueryValueExA(hKey, "InstalledDisplayDrivers",0,
&lpType, (LPBYTE)pDDDI->szDriver, &strSize) != ERROR_SUCCESS)
- {
- ZeroMemory(pDDDI->szDriver,MAX_DDDEVICEID_STRING);
- }
- else
- {
- strcat(pDDDI->szDriver,".dll");
- }
- RegCloseKey(hKey);
- }
-
- strcpy( pDDDI->szDescription, DisplayDeviceA.DeviceString);
- pDDDI->liDriverVersion.HighPart = 0;
- pDDDI->liDriverVersion.LowPart = 0;
-
- pdest = strstr(DisplayDeviceA.DeviceID,"REV_");
- pDDDI->dwRevision = strtol ( &pdest[4], &pcCnvEnd, 16);
-
- pdest = strstr(DisplayDeviceA.DeviceID,"SUBSYS_");
- pDDDI->dwSubSysId = strtol ( &pdest[7], &pcCnvEnd, 16);
-
- pdest = strstr(DisplayDeviceA.DeviceID,"DEV_");
- pDDDI->dwDeviceId = strtol ( &pdest[4], &pcCnvEnd, 16);
-
- pdest = strstr(DisplayDeviceA.DeviceID,"VEN_");
- pDDDI->dwVendorId =strtol ( &pdest[4], &pcCnvEnd, 16);
-
- /* Count out the guidDeviceIdentifier */
- memcpy(&pDDDI->guidDeviceIdentifier,
&CLSID_DirectDraw,sizeof(GUID));
-
- pDDDI->guidDeviceIdentifier.Data1 ^= pDDDI->dwVendorId;
-
- lpdata = (long *)&pDDDI->guidDeviceIdentifier.Data2;
- *lpdata ^= pDDDI->dwDeviceId;
-
- lpdata = (long *)&pDDDI->guidDeviceIdentifier.Data4;
- *lpdata = (*lpdata ^ pDDDI->dwSubSysId) ^
pDDDI->liDriverVersion.LowPart;
-
- lpdata = (long *)&pDDDI->guidDeviceIdentifier.Data4[4];
- *lpdata = (*lpdata ^ pDDDI->dwRevision) ^
pDDDI->liDriverVersion.HighPart;
-
- /* FIXME pDDDI->dwWHQLLevel
- * we leave this with no informations, I do not known
- * if program care for it, I mark this api done, and
- * tested, no bugs was found in it
- */
- pDDDI->dwWHQLLevel = 0;
- retVal = DD_OK;
- }
-
- break;
- }
-
- iDevNum++;
- }
-
- }
- _SEH_HANDLE
- {
- retVal = DD_FALSE;
- }
- _SEH_END;
-
- return retVal;
-}
+
/* 5 of 31 DirectDraw7_Vtable api are working simluare to windows */
/* 8 of 31 DirectDraw7_Vtable api are under devloping / testing */
@@ -617,3 +491,94 @@
Main_DirectDraw_StartModeTest,
Main_DirectDraw_EvaluateMode
};
+
+
+IDirectDraw4Vtbl DirectDraw4_Vtable =
+{
+ Main_DirectDraw_QueryInterface,
+ Main_DirectDraw_AddRef,
+ Main_DirectDraw_Release,
+ Main_DirectDraw_Compact,
+ Main_DirectDraw_CreateClipper,
+ Main_DirectDraw_CreatePalette,
+ Main_DirectDraw_CreateSurface4,
+ Main_DirectDraw_DuplicateSurface,
+ Main_DirectDraw_EnumDisplayModes,
+ Main_DirectDraw_EnumSurfaces,
+ Main_DirectDraw_FlipToGDISurface,
+ Main_DirectDraw_GetCaps,
+ Main_DirectDraw_GetDisplayMode,
+ Main_DirectDraw_GetFourCCCodes,
+ Main_DirectDraw_GetGDISurface,
+ Main_DirectDraw_GetMonitorFrequency,
+ Main_DirectDraw_GetScanLine,
+ Main_DirectDraw_GetVerticalBlankStatus,
+ Main_DirectDraw_Initialize,
+ Main_DirectDraw_RestoreDisplayMode,
+ Main_DirectDraw_SetCooperativeLevel,
+ Main_DirectDraw_SetDisplayMode,
+ Main_DirectDraw_WaitForVerticalBlank,
+ Main_DirectDraw_GetAvailableVidMem4,
+ Main_DirectDraw_GetSurfaceFromDC,
+ Main_DirectDraw_RestoreAllSurfaces,
+ Main_DirectDraw_TestCooperativeLevel,
+ Main_DirectDraw_GetDeviceIdentifier
+};
+
+IDirectDraw2Vtbl DirectDraw2_Vtable =
+{
+ Main_DirectDraw_QueryInterface,
+ Main_DirectDraw_AddRef,
+ Main_DirectDraw_Release,
+ Main_DirectDraw_Compact,
+ Main_DirectDraw_CreateClipper,
+ Main_DirectDraw_CreatePalette,
+ Main_DirectDraw_CreateSurface,
+ Main_DirectDraw_DuplicateSurface,
+ Main_DirectDraw_EnumDisplayModes,
+ Main_DirectDraw_EnumSurfaces,
+ Main_DirectDraw_FlipToGDISurface,
+ Main_DirectDraw_GetCaps,
+ Main_DirectDraw_GetDisplayMode,
+ Main_DirectDraw_GetFourCCCodes,
+ Main_DirectDraw_GetGDISurface,
+ Main_DirectDraw_GetMonitorFrequency,
+ Main_DirectDraw_GetScanLine,
+ Main_DirectDraw_GetVerticalBlankStatus,
+ Main_DirectDraw_Initialize,
+ Main_DirectDraw_RestoreDisplayMode,
+ Main_DirectDraw_SetCooperativeLevel,
+ Main_DirectDraw_SetDisplayMode,
+ Main_DirectDraw_WaitForVerticalBlank,
+ Main_DirectDraw_GetAvailableVidMem
+};
+
+IDirectDrawVtbl DirectDraw_Vtable =
+{
+ Main_DirectDraw_QueryInterface,
+ Main_DirectDraw_AddRef,
+ Main_DirectDraw_Release,
+ Main_DirectDraw_Compact,
+ Main_DirectDraw_CreateClipper,
+ Main_DirectDraw_CreatePalette,
+ Main_DirectDraw_CreateSurface,
+ Main_DirectDraw_DuplicateSurface,
+ Main_DirectDraw_EnumDisplayModes,
+ Main_DirectDraw_EnumSurfaces,
+ Main_DirectDraw_FlipToGDISurface,
+ Main_DirectDraw_GetCaps,
+ Main_DirectDraw_GetDisplayMode,
+ Main_DirectDraw_GetFourCCCodes,
+ Main_DirectDraw_GetGDISurface,
+ Main_DirectDraw_GetMonitorFrequency,
+ Main_DirectDraw_GetScanLine,
+ Main_DirectDraw_GetVerticalBlankStatus,
+ Main_DirectDraw_Initialize,
+ Main_DirectDraw_RestoreDisplayMode,
+ Main_DirectDraw_SetCooperativeLevel,
+ Main_DirectDraw_SetDisplayMode,
+ Main_DirectDraw_WaitForVerticalBlank
+};
+
+
+
Modified: trunk/reactos/dll/directx/ddraw/Surface/surface_main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/Surface/…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/Surface/surface_main.c (original)
+++ trunk/reactos/dll/directx/ddraw/Surface/surface_main.c Sat Jun 16 20:42:50 2007
@@ -45,6 +45,18 @@
return This->dwIntRefCnt;
}
+
+HRESULT WINAPI
+Main_DDrawSurface_QueryInterface(LPDIRECTDRAWSURFACE7 iface, REFIID riid,
+ LPVOID* ppObj)
+{
+ DX_WINDBG_trace();
+
+ DX_STUB_str("Unimplement\n");
+
+ return E_NOINTERFACE;
+}
+
ULONG WINAPI Main_DDrawSurface_Release(LPDIRECTDRAWSURFACE7 iface)
@@ -670,7 +682,7 @@
{
/*** IUnknown ***/
Main_DDrawSurface_QueryInterface,
- Main_DDrawSurface_AddRef,
+ Main_DDrawSurface_AddRef, /* (Compact done) */
Main_DDrawSurface_Release,
/*** IDirectDrawSurface ***/
Main_DDrawSurface_AddAttachedSurface,
Modified: trunk/reactos/dll/directx/ddraw/Surface/surface_stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/Surface/…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/Surface/surface_stubs.c (original)
+++ trunk/reactos/dll/directx/ddraw/Surface/surface_stubs.c Sat Jun 16 20:42:50 2007
@@ -10,16 +10,7 @@
#include "rosdraw.h"
-HRESULT WINAPI
-Main_DDrawSurface_QueryInterface(LPDIRECTDRAWSURFACE7 iface, REFIID riid,
- LPVOID* ppObj)
-{
- DX_WINDBG_trace();
-
- DX_STUB_str("Unimplement\n");
-
- return E_NOINTERFACE;
-}
+
/* MSDN: "not currently implemented." */
Modified: trunk/reactos/dll/directx/ddraw/ddraw.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/ddraw.rb…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/ddraw.rbuild (original)
+++ trunk/reactos/dll/directx/ddraw/ddraw.rbuild Sat Jun 16 20:42:50 2007
@@ -27,6 +27,7 @@
<file>ddraw_main.c</file>
<file>ddraw_displaymode.c</file>
<file>ddraw_setcooperativelevel.c</file>
+ <file>GetDeviceIdentifier.c</file>
<file>ddraw_stubs.c</file>
<file>callbacks_dd_hel.c</file>
</directory>
Modified: trunk/reactos/dll/directx/ddraw/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/main.c?r…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/main.c (original)
+++ trunk/reactos/dll/directx/ddraw/main.c Sat Jun 16 20:42:50 2007
@@ -37,13 +37,31 @@
LPDIRECTDRAW* lplpDD,
LPUNKNOWN pUnkOuter)
{
+ HRESULT retVal = DDERR_GENERIC;
/*
remove this when UML digram are in place
this api is finish and is working as it should
*/
DX_WINDBG_trace();
- return DirectDrawCreateEx(lpGUID, (LPVOID*)lplpDD, &IID_IDirectDraw2,
pUnkOuter);
+ _SEH_TRY
+ {
+ /* check see if pUnkOuter is null or not */
+ if (pUnkOuter)
+ {
+ retVal = CLASS_E_NOAGGREGATION;
+ }
+ else
+ {
+ retVal = Create_DirectDraw (lpGUID, (LPDIRECTDRAW*)lplpDD,
&IID_IDirectDraw, TRUE);
+ }
+ }
+ _SEH_HANDLE
+ {
+ }
+ _SEH_END;
+
+ return retVal;
}
/*