Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/combase/combase.c | 22 +++++++++++++++++----- dlls/combase/combase.spec | 2 +- dlls/ole32/compobj.c | 11 ----------- dlls/ole32/compobj_private.h | 3 --- dlls/ole32/moniker.c | 5 +++-- dlls/ole32/ole32.spec | 1 - 6 files changed, 21 insertions(+), 23 deletions(-)
diff --git a/dlls/combase/combase.c b/dlls/combase/combase.c index 228260ba214..28a63c6c7f4 100644 --- a/dlls/combase/combase.c +++ b/dlls/combase/combase.c @@ -113,8 +113,6 @@ static CRITICAL_SECTION_DEBUG psclsid_cs_debug = }; static CRITICAL_SECTION cs_registered_ps = { &psclsid_cs_debug, -1, 0, 0, 0, 0 };
-extern BOOL WINAPI InternalIsInitialized(void); - static struct init_spy *get_spy_entry(struct tlsdata *tlsdata, unsigned int id) { struct init_spy *spy; @@ -324,6 +322,20 @@ HRESULT open_appidkey_from_clsid(REFCLSID clsid, REGSAM access, HKEY *subkey) return S_OK; }
+/*********************************************************************** + * InternalIsProcessInitialized (combase.@) + */ +BOOL WINAPI InternalIsProcessInitialized(void) +{ + struct apartment *apt; + + if (!(apt = apartment_get_current_or_mta())) + return FALSE; + apartment_release(apt); + + return TRUE; +} + /*********************************************************************** * InternalTlsAllocData (combase.@) */ @@ -2020,7 +2032,7 @@ HRESULT WINAPI CoGetPSClsid(REFIID riid, CLSID *pclsid)
TRACE("%s, %p\n", debugstr_guid(riid), pclsid);
- if (!InternalIsInitialized()) + if (!InternalIsProcessInitialized()) { ERR("apartment not initialised\n"); return CO_E_NOTINITIALIZED; @@ -2078,7 +2090,7 @@ HRESULT WINAPI CoRegisterPSClsid(REFIID riid, REFCLSID rclsid)
TRACE("%s, %s\n", debugstr_guid(riid), debugstr_guid(rclsid));
- if (!InternalIsInitialized()) + if (!InternalIsProcessInitialized()) { ERR("apartment not initialised\n"); return CO_E_NOTINITIALIZED; @@ -2388,7 +2400,7 @@ HRESULT WINAPI CoGetContextToken(ULONG_PTR *token)
TRACE("%p\n", token);
- if (!InternalIsInitialized()) + if (!InternalIsProcessInitialized()) { ERR("apartment not initialised\n"); return CO_E_NOTINITIALIZED; diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec index f2f4506ae50..ea2177ca7ba 100644 --- a/dlls/combase/combase.spec +++ b/dlls/combase/combase.spec @@ -263,7 +263,7 @@ @ stdcall InternalIrotRegister(ptr ptr ptr ptr long ptr ptr) @ stdcall InternalIrotRevoke(long ptr ptr ptr) @ stub InternalIsApartmentInitialized -@ stub InternalIsProcessInitialized +@ stdcall InternalIsProcessInitialized() @ stub InternalMarshalObjRef @ stub InternalNotifyDDStartOrStop @ stub InternalOleModalLoopBlockFn diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index 45187fc8113..dfd81a8d0f5 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -1608,17 +1608,6 @@ HRESULT WINAPI CoRegisterSurrogateEx(REFGUID guid, void *reserved) return E_NOTIMPL; }
-BOOL WINAPI InternalIsInitialized(void) -{ - struct apartment *apt; - - if (!(apt = apartment_get_current_or_mta())) - return FALSE; - apartment_release(apt); - - return TRUE; -} - typedef struct { IGlobalOptions IGlobalOptions_iface; LONG ref; diff --git a/dlls/ole32/compobj_private.h b/dlls/ole32/compobj_private.h index 5fc100e8163..6e14d69e424 100644 --- a/dlls/ole32/compobj_private.h +++ b/dlls/ole32/compobj_private.h @@ -351,7 +351,4 @@ static inline HRESULT copy_formatetc(FORMATETC *dst, const FORMATETC *src) extern HRESULT EnumSTATDATA_Construct(IUnknown *holder, ULONG index, DWORD array_len, STATDATA *data, BOOL copy, IEnumSTATDATA **ppenum) DECLSPEC_HIDDEN;
-extern BOOL WINAPI InternalIsInitialized(void); -extern void WINAPI DestroyRunningObjectTable(void); - #endif /* __WINE_OLE_COMPOBJ_H */ diff --git a/dlls/ole32/moniker.c b/dlls/ole32/moniker.c index 874b58f99e7..251c3c47849 100644 --- a/dlls/ole32/moniker.c +++ b/dlls/ole32/moniker.c @@ -35,7 +35,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(ole);
- +/* Combase exports */ +BOOL WINAPI InternalIsProcessInitialized(void); HRESULT WINAPI InternalIrotRegister(const MonikerComparisonData *moniker_data, const InterfaceData *object, const InterfaceData *moniker, const FILETIME *time, DWORD flags, IrotCookie *cookie, IrotContextHandle *ctxt_handle); @@ -720,7 +721,7 @@ HRESULT WINAPI GetRunningObjectTable(DWORD reserved, IRunningObjectTable **ret) if (reserved!=0) return E_UNEXPECTED;
- if (!InternalIsInitialized()) + if (!InternalIsProcessInitialized()) return CO_E_NOTINITIALIZED;
*ret = &rot.IRunningObjectTable_iface; diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec index 9c6b9396e17..c4e7b594fb2 100644 --- a/dlls/ole32/ole32.spec +++ b/dlls/ole32/ole32.spec @@ -298,7 +298,6 @@ @ stdcall WriteFmtUserTypeStg(ptr long ptr) @ stub WriteOleStg @ stub WriteStringStream -@ stdcall InternalIsInitialized() @ stdcall InternalGetRegisteredClassObject(ptr ptr long ptr) @ stdcall InternalRevokeAllClasses(ptr) @ stdcall Internal_apartment_disconnectproxies(ptr)