ole32: Use InternalIsProcessInitialized().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5a2435cfff
commit
844cb4997d
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue