Commit 66d912a7 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

combase: Move MTA usage functions.

parent ee080a42
......@@ -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;
......
......@@ -2402,6 +2402,27 @@ void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
}
/***********************************************************************
* 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.@)
*/
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, LPVOID reserved)
......
......@@ -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()
......
......@@ -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 */
......
......@@ -1810,27 +1810,6 @@ HRESULT WINAPI CoGetApartmentType(APTTYPE *type, APTTYPEQUALIFIER *qualifier)
}
/***********************************************************************
* 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.@]
*/
HRESULT WINAPI CoDisableCallCancellation(void *reserved)
......
......@@ -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;
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment