Author: greatlrd
Date: Sat Jun 9 14:05:41 2007
New Revision: 27084
URL:
http://svn.reactos.org/svn/reactos?rev=27084&view=rev
Log:
commit GetDeviceIdentifier and GetDeviceIdentifier7 both are under devloping, I hope I
finish this implement today
Modified:
trunk/reactos/dll/directx/ddraw/Ddraw/ddraw.h
trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c
trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_stubs.c
Modified: trunk/reactos/dll/directx/ddraw/Ddraw/ddraw.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/Ddraw/dd…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/Ddraw/ddraw.h (original)
+++ trunk/reactos/dll/directx/ddraw/Ddraw/ddraw.h Sat Jun 9 14:05:41 2007
@@ -6,7 +6,8 @@
HRESULT WINAPI Main_DirectDraw_CreateClipper(LPDIRECTDRAW7, DWORD, LPDIRECTDRAWCLIPPER *,
IUnknown *);
HRESULT WINAPI Main_DirectDraw_CreatePalette(LPDIRECTDRAW7, DWORD, LPPALETTEENTRY,
LPDIRECTDRAWPALETTE*, LPUNKNOWN);
HRESULT WINAPI Main_DirectDraw_DuplicateSurface(LPDIRECTDRAW7, LPDIRECTDRAWSURFACE7,
LPDIRECTDRAWSURFACE7*);
-HRESULT WINAPI Main_DirectDraw_GetDeviceIdentifier(LPDIRECTDRAW7, LPDDDEVICEIDENTIFIER2,
DWORD);
+HRESULT WINAPI Main_DirectDraw_GetDeviceIdentifier(LPDIRECTDRAW4, LPDDDEVICEIDENTIFIER,
DWORD);
+HRESULT WINAPI Main_DirectDraw_GetDeviceIdentifier7(LPDIRECTDRAW7, LPDDDEVICEIDENTIFIER2,
DWORD);
HRESULT WINAPI Main_DirectDraw_EnumSurfaces(LPDIRECTDRAW7, DWORD, LPDDSURFACEDESC2,
LPVOID,
LPDDENUMSURFACESCALLBACK7);
@@ -39,7 +40,7 @@
HRESULT WINAPI Main_DirectDraw_CreateSurface(LPDIRECTDRAW, LPDDSURFACEDESC,
LPDIRECTDRAWSURFACE *, IUnknown *);
HRESULT WINAPI Main_DirectDraw_CreateSurface4(LPDIRECTDRAW7, LPDDSURFACEDESC2,
LPDIRECTDRAWSURFACE7 *, IUnknown *);
HRESULT WINAPI Main_DirectDraw_DuplicateSurface(LPDIRECTDRAW7, LPDIRECTDRAWSURFACE7,
LPDIRECTDRAWSURFACE7*);
-HRESULT WINAPI Main_DirectDraw_GetDeviceIdentifier(LPDIRECTDRAW7, LPDDDEVICEIDENTIFIER2,
DWORD);
+
HRESULT WINAPI Main_DirectDraw_EnumSurfaces(LPDIRECTDRAW7, DWORD, LPDDSURFACEDESC2,
LPVOID,
LPDDENUMSURFACESCALLBACK7);
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 9 14:05:41 2007
@@ -411,6 +411,64 @@
// LeaveCriticalSection(&ddcs);
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 = DD_OK;
+ HRESULT retVal = DD_FALSE;
+ DX_WINDBG_trace();
+
+ _SEH_TRY
+ {
+ if (IsBadWritePtr( pDDDI, sizeof(DDDEVICEIDENTIFIER2) ) )
+ {
+ retVal = DDERR_INVALIDPARAMS;
+ }
+ }
+ _SEH_HANDLE
+ {
+ retVal = DD_FALSE;
+ }
+ _SEH_END;
+
+ return retVal;
}
/* 5 of 31 DirectDraw7_Vtable api are working simluare to windows */
@@ -445,7 +503,7 @@
Main_DirectDraw_GetSurfaceFromDC,
Main_DirectDraw_RestoreAllSurfaces,
Main_DirectDraw_TestCooperativeLevel,
- Main_DirectDraw_GetDeviceIdentifier,
+ Main_DirectDraw_GetDeviceIdentifier7,
Main_DirectDraw_StartModeTest,
Main_DirectDraw_EvaluateMode
};
Modified: trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/Ddraw/dd…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_stubs.c (original)
+++ trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_stubs.c Sat Jun 9 14:05:41 2007
@@ -117,12 +117,6 @@
DX_STUB;
}
-HRESULT WINAPI Main_DirectDraw_GetDeviceIdentifier(LPDIRECTDRAW7 iface,
- LPDDDEVICEIDENTIFIER2 pDDDI, DWORD dwFlags)
-{
- DX_WINDBG_trace();
- DX_STUB;
-}
HRESULT WINAPI Main_DirectDraw_StartModeTest(LPDIRECTDRAW7 iface, LPSIZE pModes,
DWORD dwNumModes, DWORD dwFlags)