mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 10:12:58 +00:00
fixing one more bugs in QueryInterface
svn path=/trunk/; revision=27210
This commit is contained in:
parent
4d6cc7d9a6
commit
588314ccad
1 changed files with 76 additions and 44 deletions
|
@ -38,6 +38,8 @@ Main_DirectDraw_QueryInterface (LPDIRECTDRAW7 iface,
|
||||||
Direct3D7
|
Direct3D7
|
||||||
*/
|
*/
|
||||||
if (IsEqualGUID(&IID_IDirectDraw7, id))
|
if (IsEqualGUID(&IID_IDirectDraw7, id))
|
||||||
|
{
|
||||||
|
if (This->lpVtbl != &DirectDraw7_Vtable)
|
||||||
{
|
{
|
||||||
LPDDRAWI_DIRECTDRAW_INT newThis;
|
LPDDRAWI_DIRECTDRAW_INT newThis;
|
||||||
DxHeapMemAlloc(newThis, sizeof(DDRAWI_DIRECTDRAW_INT));
|
DxHeapMemAlloc(newThis, sizeof(DDRAWI_DIRECTDRAW_INT));
|
||||||
|
@ -56,7 +58,15 @@ Main_DirectDraw_QueryInterface (LPDIRECTDRAW7 iface,
|
||||||
Main_DirectDraw_AddRef((LPDIRECTDRAW7)newThis);
|
Main_DirectDraw_AddRef((LPDIRECTDRAW7)newThis);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*obj = This;
|
||||||
|
Main_DirectDraw_AddRef((LPDIRECTDRAW7)This);
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (IsEqualGUID(&IID_IDirectDraw4, id))
|
else if (IsEqualGUID(&IID_IDirectDraw4, id))
|
||||||
|
{
|
||||||
|
if (This->lpVtbl != &DirectDraw4_Vtable)
|
||||||
{
|
{
|
||||||
LPDDRAWI_DIRECTDRAW_INT newThis;
|
LPDDRAWI_DIRECTDRAW_INT newThis;
|
||||||
DxHeapMemAlloc(newThis, sizeof(DDRAWI_DIRECTDRAW_INT));
|
DxHeapMemAlloc(newThis, sizeof(DDRAWI_DIRECTDRAW_INT));
|
||||||
|
@ -75,7 +85,15 @@ Main_DirectDraw_QueryInterface (LPDIRECTDRAW7 iface,
|
||||||
Main_DirectDraw_AddRef((LPDIRECTDRAW7)newThis);
|
Main_DirectDraw_AddRef((LPDIRECTDRAW7)newThis);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*obj = This;
|
||||||
|
Main_DirectDraw_AddRef((LPDIRECTDRAW7)This);
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (IsEqualGUID(&IID_IDirectDraw2, id))
|
else if (IsEqualGUID(&IID_IDirectDraw2, id))
|
||||||
|
{
|
||||||
|
if (This->lpVtbl != &DirectDraw2_Vtable)
|
||||||
{
|
{
|
||||||
LPDDRAWI_DIRECTDRAW_INT newThis;
|
LPDDRAWI_DIRECTDRAW_INT newThis;
|
||||||
DxHeapMemAlloc(newThis, sizeof(DDRAWI_DIRECTDRAW_INT));
|
DxHeapMemAlloc(newThis, sizeof(DDRAWI_DIRECTDRAW_INT));
|
||||||
|
@ -94,7 +112,15 @@ Main_DirectDraw_QueryInterface (LPDIRECTDRAW7 iface,
|
||||||
Main_DirectDraw_AddRef((LPDIRECTDRAW7)newThis);
|
Main_DirectDraw_AddRef((LPDIRECTDRAW7)newThis);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*obj = This;
|
||||||
|
Main_DirectDraw_AddRef((LPDIRECTDRAW7)This);
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (IsEqualGUID(&IID_IDirectDraw, id))
|
else if (IsEqualGUID(&IID_IDirectDraw, id))
|
||||||
|
{
|
||||||
|
if (This->lpVtbl != &DirectDraw_Vtable)
|
||||||
{
|
{
|
||||||
LPDDRAWI_DIRECTDRAW_INT newThis;
|
LPDDRAWI_DIRECTDRAW_INT newThis;
|
||||||
DxHeapMemAlloc(newThis, sizeof(DDRAWI_DIRECTDRAW_INT));
|
DxHeapMemAlloc(newThis, sizeof(DDRAWI_DIRECTDRAW_INT));
|
||||||
|
@ -114,6 +140,12 @@ Main_DirectDraw_QueryInterface (LPDIRECTDRAW7 iface,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
*obj = This;
|
||||||
|
Main_DirectDraw_AddRef((LPDIRECTDRAW7)This);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
*obj = NULL;
|
*obj = NULL;
|
||||||
DX_STUB_str("E_NOINTERFACE");
|
DX_STUB_str("E_NOINTERFACE");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue