Andrey Turkin : ole32: Add a few fields to OLE TLS area to match native memory layout.
Alexandre Julliard
julliard at winehq.org
Mon Jan 19 08:59:06 CST 2009
Module: wine
Branch: master
Commit: d0a345f914ff804b09df8072e2380a0852c73a6c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d0a345f914ff804b09df8072e2380a0852c73a6c
Author: Andrey Turkin <andrey.turkin at gmail.com>
Date: Sun Jan 18 17:18:03 2009 +0300
ole32: Add a few fields to OLE TLS area to match native memory layout.
---
dlls/ole32/compobj.c | 5 ++++-
dlls/ole32/compobj_private.h | 7 ++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c
index b291db4..4e926ec 100644
--- a/dlls/ole32/compobj.c
+++ b/dlls/ole32/compobj.c
@@ -3951,9 +3951,12 @@ HRESULT WINAPI CoGetObjectContext(REFIID riid, void **ppv)
*/
HRESULT WINAPI CoGetContextToken( ULONG_PTR *token )
{
+ struct oletls *info = COM_CurrentInfo();
static int calls;
if(!(calls++)) FIXME( "stub\n" );
- if (token) *token = 0;
+ if (!info)
+ return E_OUTOFMEMORY;
+ if (token) *token = info->context_token;
return E_NOTIMPL;
}
diff --git a/dlls/ole32/compobj_private.h b/dlls/ole32/compobj_private.h
index 8f2cc2c..38a6475 100644
--- a/dlls/ole32/compobj_private.h
+++ b/dlls/ole32/compobj_private.h
@@ -175,13 +175,18 @@ struct oletls
struct apartment *apt;
IErrorInfo *errorinfo; /* see errorinfo.c */
IUnknown *state; /* see CoSetState */
+ DWORD apt_mask; /* apartment mask (+0Ch on x86) */
IInitializeSpy *spy; /* The "SPY" from CoInitializeSpy */
DWORD inits; /* number of times CoInitializeEx called */
DWORD ole_inits; /* number of times OleInitialize called */
GUID causality_id; /* unique identifier for each COM call */
LONG pending_call_count_client; /* number of client calls pending */
LONG pending_call_count_server; /* number of server calls pending */
- IUnknown *call_state; /* current call context */
+ DWORD unknown;
+ ULONG_PTR context_token; /* (+38h on x86) */
+ IUnknown *call_state; /* current call context (+3Ch on x86) */
+ DWORD unknown2[46];
+ IUnknown *cancel_object; /* cancel object set by CoSetCancelObject (+F8h on x86) */
};
More information about the wine-cvs
mailing list