Author: greatlrd
Date: Thu Dec 13 04:55:06 2007
New Revision: 31188
URL:
http://svn.reactos.org/svn/reactos?rev=31188&view=rev
Log:
add support for IID_IDirectDrawColorControl,
IsEqualGUID(&IID_IDirectDrawGammaControl, IID_IDirectDrawSurfaceKernel
we are getting thues stubs api now from ddraw vtable now when some calls to
surface_QueryInterface api
Modified:
trunk/reactos/dll/directx/ddraw/Surface/surface_main.c
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 Thu Dec 13 04:55:06 2007
@@ -59,13 +59,12 @@
}
HRESULT WINAPI
-Main_DDrawSurface_QueryInterface(LPDDRAWI_DDRAWSURFACE_INT iface, REFIID riid,
- LPVOID* ppObj)
-{
- LPDDRAWI_DDRAWSURFACE_INT This = (LPDDRAWI_DDRAWSURFACE_INT)iface;
+Main_DDrawSurface_QueryInterface(LPDDRAWI_DDRAWSURFACE_INT This, REFIID riid, LPVOID*
ppObj)
+{
DX_WINDBG_trace();
HRESULT retVal = DD_OK;
*ppObj = NULL;
+
_SEH_TRY
{
@@ -141,6 +140,51 @@
}
}
This->lpVtbl = &DirectDrawSurface_Vtable;
+ *ppObj = This;
+ Main_DDrawSurface_AddRef(This);
+ }
+ else if (IsEqualGUID(&IID_IDirectDrawColorControl, riid))
+ {
+ if (This->lpVtbl != &DirectDrawSurface_Vtable)
+ {
+ This = internal_directdrawsurface_int_alloc(This);
+ if (!This)
+ {
+ retVal = DDERR_OUTOFVIDEOMEMORY;
+ _SEH_LEAVE;
+ }
+ }
+ This->lpVtbl = &DirectDrawColorControl_Vtable;
+ *ppObj = This;
+ Main_DDrawSurface_AddRef(This);
+ }
+ else if (IsEqualGUID(&IID_IDirectDrawGammaControl, riid))
+ {
+ if (This->lpVtbl != &DirectDrawSurface_Vtable)
+ {
+ This = internal_directdrawsurface_int_alloc(This);
+ if (!This)
+ {
+ retVal = DDERR_OUTOFVIDEOMEMORY;
+ _SEH_LEAVE;
+ }
+ }
+ This->lpVtbl = &DirectDrawGammaControl_Vtable;
+ *ppObj = This;
+ Main_DDrawSurface_AddRef(This);
+ }
+ else if (IsEqualGUID(&IID_IDirectDrawSurfaceKernel, riid))
+ {
+ if (This->lpVtbl != &DirectDrawSurface_Vtable)
+ {
+ This = internal_directdrawsurface_int_alloc(This);
+ if (!This)
+ {
+ retVal = DDERR_OUTOFVIDEOMEMORY;
+ _SEH_LEAVE;
+ }
+ }
+ This->lpVtbl = &DirectDrawSurfaceKernel_Vtable;
*ppObj = This;
Main_DDrawSurface_AddRef(This);
}