Rob Shearman : atl:
Use the first entry in the object map in AtlInternalQueryInterface when
IUnknown is requested .
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Apr 25 07:06:35 CDT 2007
Module: wine
Branch: master
Commit: 3af74c5e5250b09bf453293214a3e3240e6a1140
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3af74c5e5250b09bf453293214a3e3240e6a1140
Author: Rob Shearman <rob at codeweavers.com>
Date: Wed Apr 25 11:21:03 2007 +0100
atl: Use the first entry in the object map in AtlInternalQueryInterface when IUnknown is requested.
---
dlls/atl/atl_main.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/atl/atl_main.c b/dlls/atl/atl_main.c
index 69d62e7..a25f747 100644
--- a/dlls/atl/atl_main.c
+++ b/dlls/atl/atl_main.c
@@ -213,19 +213,19 @@ HRESULT WINAPI AtlInternalQueryInterface(void* this, const _ATL_INTMAP_ENTRY* pE
{
int i = 0;
HRESULT rc = E_NOINTERFACE;
- TRACE("(%p, %p, %p, %p)\n",this, pEntries, iid, ppvObject);
+ TRACE("(%p, %p, %s, %p)\n",this, pEntries, debugstr_guid(iid), ppvObject);
if (IsEqualGUID(iid,&IID_IUnknown))
{
TRACE("Returning IUnknown\n");
- *ppvObject = this;
- IUnknown_AddRef((IUnknown*)this);
+ *ppvObject = ((LPSTR)this+pEntries[0].dw);
+ IUnknown_AddRef((IUnknown*)*ppvObject);
return S_OK;
}
while (pEntries[i].pFunc != 0)
{
- TRACE("Trying entry %i (%p %i %p)\n",i,pEntries[i].piid,
+ TRACE("Trying entry %i (%s %i %p)\n",i,debugstr_guid(pEntries[i].piid),
pEntries[i].dw, pEntries[i].pFunc);
if (pEntries[i].piid && IsEqualGUID(iid,pEntries[i].piid))
More information about the wine-cvs
mailing list