Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/combase/apartment.c | 4 ++-- dlls/combase/combase.c | 21 +++++++++++++++++++++ dlls/combase/combase.spec | 6 ++---- dlls/combase/combase_private.h | 2 ++ dlls/ole32/compobj.c | 21 --------------------- dlls/ole32/compobj_private.h | 2 -- dlls/ole32/ole32.spec | 4 ++-- 7 files changed, 29 insertions(+), 31 deletions(-)
diff --git a/dlls/combase/apartment.c b/dlls/combase/apartment.c index 81071563c09..1ce7021bef9 100644 --- a/dlls/combase/apartment.c +++ b/dlls/combase/apartment.c @@ -1187,7 +1187,7 @@ struct mta_cookie struct list entry; };
-HRESULT WINAPI apartment_increment_mta_usage(CO_MTA_USAGE_COOKIE *cookie) +HRESULT apartment_increment_mta_usage(CO_MTA_USAGE_COOKIE *cookie) { struct mta_cookie *mta_cookie;
@@ -1211,7 +1211,7 @@ HRESULT WINAPI apartment_increment_mta_usage(CO_MTA_USAGE_COOKIE *cookie) return S_OK; }
-void WINAPI apartment_decrement_mta_usage(CO_MTA_USAGE_COOKIE cookie) +void apartment_decrement_mta_usage(CO_MTA_USAGE_COOKIE cookie) { struct mta_cookie *mta_cookie = (struct mta_cookie *)cookie;
diff --git a/dlls/combase/combase.c b/dlls/combase/combase.c index cddc9e23067..7d61faefa92 100644 --- a/dlls/combase/combase.c +++ b/dlls/combase/combase.c @@ -2401,6 +2401,27 @@ void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void) unlock_init_spies(tlsdata); }
+/*********************************************************************** + * CoIncrementMTAUsage (combase.@) + */ +HRESULT WINAPI CoIncrementMTAUsage(CO_MTA_USAGE_COOKIE *cookie) +{ + TRACE("%p\n", cookie); + + return apartment_increment_mta_usage(cookie); +} + +/*********************************************************************** + * CoDecrementMTAUsage (combase.@) + */ +HRESULT WINAPI CoDecrementMTAUsage(CO_MTA_USAGE_COOKIE cookie) +{ + TRACE("%p\n", cookie); + + apartment_decrement_mta_usage(cookie); + return S_OK; +} + /*********************************************************************** * DllMain (combase.@) */ diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec index 01377c8045e..52c4ef51b2e 100644 --- a/dlls/combase/combase.spec +++ b/dlls/combase/combase.spec @@ -86,7 +86,7 @@ @ stub CoCreateObjectInContext @ stub CoDeactivateObject @ stub CoDecodeProxy -@ stdcall CoDecrementMTAUsage(ptr) ole32.CoDecrementMTAUsage +@ stdcall CoDecrementMTAUsage(ptr) @ stdcall CoDisableCallCancellation(ptr) ole32.CoDisableCallCancellation @ stub CoDisconnectContext @ stdcall CoDisconnectObject(ptr long) ole32.CoDisconnectObject @@ -122,7 +122,7 @@ @ stub CoGetSystemSecurityPermissions @ stdcall CoGetTreatAsClass(ptr ptr) @ stdcall CoImpersonateClient() -@ stdcall CoIncrementMTAUsage(ptr) ole32.CoIncrementMTAUsage +@ stdcall CoIncrementMTAUsage(ptr) @ stdcall CoInitializeEx(ptr long) @ stdcall CoInitializeSecurity(ptr long ptr ptr long long ptr long ptr) @ stdcall CoInitializeWOW(long long) ole32.CoInitializeWOW @@ -357,8 +357,6 @@ @ stdcall leave_apartment(ptr) @ stdcall apartment_get_inproc_class_object(ptr ptr ptr ptr long ptr) @ stdcall apartment_get_mta() -@ stdcall apartment_decrement_mta_usage(ptr) -@ stdcall apartment_increment_mta_usage(ptr) @ stdcall apartment_findfromoxid(int64) @ stdcall apartment_getwindow(ptr) @ stdcall apartment_global_cleanup() diff --git a/dlls/combase/combase_private.h b/dlls/combase/combase_private.h index 122522baad5..32ffba0df89 100644 --- a/dlls/combase/combase_private.h +++ b/dlls/combase/combase_private.h @@ -133,6 +133,8 @@ struct stub_manager
HRESULT WINAPI enter_apartment(struct tlsdata *data, DWORD model); void WINAPI leave_apartment(struct tlsdata *data); +HRESULT apartment_increment_mta_usage(CO_MTA_USAGE_COOKIE *cookie) DECLSPEC_HIDDEN; +void apartment_decrement_mta_usage(CO_MTA_USAGE_COOKIE cookie) DECLSPEC_HIDDEN;
/* Stub Manager */
diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index 5afacf3ee3f..5adcd94b2cd 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -1809,27 +1809,6 @@ HRESULT WINAPI CoGetApartmentType(APTTYPE *type, APTTYPEQUALIFIER *qualifier) return info->apt ? S_OK : CO_E_NOTINITIALIZED; }
-/*********************************************************************** - * CoIncrementMTAUsage [OLE32.@] - */ -HRESULT WINAPI CoIncrementMTAUsage(CO_MTA_USAGE_COOKIE *cookie) -{ - TRACE("%p\n", cookie); - - return apartment_increment_mta_usage(cookie); -} - -/*********************************************************************** - * CoDecrementMTAUsage [OLE32.@] - */ -HRESULT WINAPI CoDecrementMTAUsage(CO_MTA_USAGE_COOKIE cookie) -{ - TRACE("%p\n", cookie); - - apartment_decrement_mta_usage(cookie); - return S_OK; -} - /*********************************************************************** * CoDisableCallCancellation [OLE32.@] */ diff --git a/dlls/ole32/compobj_private.h b/dlls/ole32/compobj_private.h index e910746fefd..2c8c337c643 100644 --- a/dlls/ole32/compobj_private.h +++ b/dlls/ole32/compobj_private.h @@ -257,8 +257,6 @@ struct class_reg_data; extern HRESULT WINAPI apartment_get_inproc_class_object(struct apartment *apt, const struct class_reg_data *regdata, REFCLSID rclsid, REFIID riid, BOOL hostifnecessary, void **ppv) DECLSPEC_HIDDEN;
-extern void WINAPI apartment_decrement_mta_usage(CO_MTA_USAGE_COOKIE cookie) DECLSPEC_HIDDEN; -extern HRESULT WINAPI apartment_increment_mta_usage(CO_MTA_USAGE_COOKIE *cookie) DECLSPEC_HIDDEN; extern struct apartment * WINAPI apartment_get_mta(void) DECLSPEC_HIDDEN; extern HRESULT WINAPI apartment_get_local_server_stream(struct apartment *apt, IStream **ret) DECLSPEC_HIDDEN; extern void WINAPI apartment_global_cleanup(void) DECLSPEC_HIDDEN; diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec index e80cafd3663..7d3d1e2e6e3 100644 --- a/dlls/ole32/ole32.spec +++ b/dlls/ole32/ole32.spec @@ -14,7 +14,7 @@ @ stdcall CoCreateGuid(ptr) combase.CoCreateGuid @ stdcall CoCreateInstance(ptr ptr long ptr ptr) combase.CoCreateInstance @ stdcall CoCreateInstanceEx(ptr ptr long ptr long ptr) combase.CoCreateInstanceEx -@ stdcall CoDecrementMTAUsage(ptr) +@ stdcall CoDecrementMTAUsage(ptr) combase.CoDecrementMTAUsage @ stdcall CoDisableCallCancellation(ptr) @ stdcall CoDisconnectObject(ptr long) @ stdcall CoDosDateTimeToFileTime(long long ptr) kernel32.DosDateTimeToFileTime @@ -48,7 +48,7 @@ @ stub CoGetTIDFromIPID @ stdcall CoGetTreatAsClass(ptr ptr) combase.CoGetTreatAsClass @ stdcall CoImpersonateClient() combase.CoImpersonateClient -@ stdcall CoIncrementMTAUsage(ptr) +@ stdcall CoIncrementMTAUsage(ptr) combase.CoIncrementMTAUsage @ stdcall CoInitialize(ptr) @ stdcall CoInitializeEx(ptr long) combase.CoInitializeEx @ stdcall CoInitializeSecurity(ptr long ptr ptr long long ptr long ptr) combase.CoInitializeSecurity