combase: Move CoFreeUnusedLibrariesEx().
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
ae969df3bc
commit
e540630750
|
@ -426,7 +426,7 @@ static struct apartment *apartment_construct(DWORD model)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Frees unused libraries loaded into apartment */
|
/* Frees unused libraries loaded into apartment */
|
||||||
void WINAPI apartment_freeunusedlibraries(struct apartment *apt, DWORD delay)
|
void apartment_freeunusedlibraries(struct apartment *apt, DWORD delay)
|
||||||
{
|
{
|
||||||
struct apartment_loaded_dll *entry, *next;
|
struct apartment_loaded_dll *entry, *next;
|
||||||
|
|
||||||
|
|
|
@ -2252,6 +2252,21 @@ DWORD WINAPI CoGetCurrentProcess(void)
|
||||||
return tlsdata->thread_seqid;
|
return tlsdata->thread_seqid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* CoFreeUnusedLibrariesEx (combase.@)
|
||||||
|
*/
|
||||||
|
void WINAPI DECLSPEC_HOTPATCH CoFreeUnusedLibrariesEx(DWORD unload_delay, DWORD reserved)
|
||||||
|
{
|
||||||
|
struct apartment *apt = com_get_current_apt();
|
||||||
|
if (!apt)
|
||||||
|
{
|
||||||
|
ERR("apartment not initialised\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
apartment_freeunusedlibraries(apt, unload_delay);
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* DllMain (combase.@)
|
* DllMain (combase.@)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -93,7 +93,7 @@
|
||||||
@ stdcall CoEnableCallCancellation(ptr) ole32.CoEnableCallCancellation
|
@ stdcall CoEnableCallCancellation(ptr) ole32.CoEnableCallCancellation
|
||||||
@ stdcall CoFileTimeNow(ptr)
|
@ stdcall CoFileTimeNow(ptr)
|
||||||
@ stdcall CoFreeUnusedLibraries()
|
@ stdcall CoFreeUnusedLibraries()
|
||||||
@ stdcall CoFreeUnusedLibrariesEx(long long) ole32.CoFreeUnusedLibrariesEx
|
@ stdcall CoFreeUnusedLibrariesEx(long long)
|
||||||
@ stdcall CoGetActivationState(int128 long ptr)
|
@ stdcall CoGetActivationState(int128 long ptr)
|
||||||
@ stub CoGetApartmentID
|
@ stub CoGetApartmentID
|
||||||
@ stdcall CoGetApartmentType(ptr ptr) ole32.CoGetApartmentType
|
@ stdcall CoGetApartmentType(ptr ptr) ole32.CoGetApartmentType
|
||||||
|
@ -357,7 +357,6 @@
|
||||||
@ stdcall enter_apartment(ptr long)
|
@ stdcall enter_apartment(ptr long)
|
||||||
@ stdcall leave_apartment(ptr)
|
@ stdcall leave_apartment(ptr)
|
||||||
@ stdcall apartment_get_inproc_class_object(ptr ptr ptr ptr long ptr)
|
@ stdcall apartment_get_inproc_class_object(ptr ptr ptr ptr long ptr)
|
||||||
@ stdcall apartment_freeunusedlibraries(ptr long)
|
|
||||||
@ stdcall apartment_get_mta()
|
@ stdcall apartment_get_mta()
|
||||||
@ stdcall apartment_decrement_mta_usage(ptr)
|
@ stdcall apartment_decrement_mta_usage(ptr)
|
||||||
@ stdcall apartment_increment_mta_usage(ptr)
|
@ stdcall apartment_increment_mta_usage(ptr)
|
||||||
|
|
|
@ -98,6 +98,7 @@ static inline struct apartment* com_get_current_apt(void)
|
||||||
|
|
||||||
HWND WINAPI apartment_getwindow(const struct apartment *apt) DECLSPEC_HIDDEN;
|
HWND WINAPI apartment_getwindow(const struct apartment *apt) DECLSPEC_HIDDEN;
|
||||||
HRESULT WINAPI apartment_createwindowifneeded(struct apartment *apt) DECLSPEC_HIDDEN;
|
HRESULT WINAPI apartment_createwindowifneeded(struct apartment *apt) DECLSPEC_HIDDEN;
|
||||||
|
void apartment_freeunusedlibraries(struct apartment *apt, DWORD unload_delay) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
/* RpcSs interface */
|
/* RpcSs interface */
|
||||||
HRESULT rpcss_get_next_seqid(DWORD *id) DECLSPEC_HIDDEN;
|
HRESULT rpcss_get_next_seqid(DWORD *id) DECLSPEC_HIDDEN;
|
||||||
|
|
|
@ -1449,35 +1449,6 @@ void WINAPI CoFreeAllLibraries(void)
|
||||||
/* NOP */
|
/* NOP */
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* CoFreeUnusedLibrariesEx [OLE32.@]
|
|
||||||
*
|
|
||||||
* Frees any previously unused libraries whose delay has expired and marks
|
|
||||||
* currently unused libraries for unloading. Unused are identified as those that
|
|
||||||
* return S_OK from their DllCanUnloadNow function.
|
|
||||||
*
|
|
||||||
* PARAMS
|
|
||||||
* dwUnloadDelay [I] Unload delay in milliseconds.
|
|
||||||
* dwReserved [I] Reserved. Set to 0.
|
|
||||||
*
|
|
||||||
* RETURNS
|
|
||||||
* Nothing.
|
|
||||||
*
|
|
||||||
* SEE ALSO
|
|
||||||
* CoLoadLibrary, CoFreeAllLibraries, CoFreeLibrary
|
|
||||||
*/
|
|
||||||
void WINAPI DECLSPEC_HOTPATCH CoFreeUnusedLibrariesEx(DWORD dwUnloadDelay, DWORD dwReserved)
|
|
||||||
{
|
|
||||||
struct apartment *apt = COM_CurrentApt();
|
|
||||||
if (!apt)
|
|
||||||
{
|
|
||||||
ERR("apartment not initialised\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
apartment_freeunusedlibraries(apt, dwUnloadDelay);
|
|
||||||
}
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* CoLockObjectExternal [OLE32.@]
|
* CoLockObjectExternal [OLE32.@]
|
||||||
*
|
*
|
||||||
|
|
|
@ -267,7 +267,6 @@ extern void WINAPI apartment_decrement_mta_usage(CO_MTA_USAGE_COOKIE cookie) DEC
|
||||||
extern HRESULT WINAPI apartment_increment_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 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 HRESULT WINAPI apartment_get_local_server_stream(struct apartment *apt, IStream **ret) DECLSPEC_HIDDEN;
|
||||||
extern void WINAPI apartment_freeunusedlibraries(struct apartment *apt, DWORD delay) DECLSPEC_HIDDEN;
|
|
||||||
extern void WINAPI apartment_global_cleanup(void) DECLSPEC_HIDDEN;
|
extern void WINAPI apartment_global_cleanup(void) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
HRESULT COM_GetRegisteredClassObject(const struct apartment *apt, REFCLSID rclsid,
|
HRESULT COM_GetRegisteredClassObject(const struct apartment *apt, REFCLSID rclsid,
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
@ stdcall CoFreeAllLibraries()
|
@ stdcall CoFreeAllLibraries()
|
||||||
@ stdcall CoFreeLibrary(long)
|
@ stdcall CoFreeLibrary(long)
|
||||||
@ stdcall CoFreeUnusedLibraries() combase.CoFreeUnusedLibraries
|
@ stdcall CoFreeUnusedLibraries() combase.CoFreeUnusedLibraries
|
||||||
@ stdcall CoFreeUnusedLibrariesEx(long long)
|
@ stdcall CoFreeUnusedLibrariesEx(long long) combase.CoFreeUnusedLibrariesEx
|
||||||
@ stdcall CoGetActivationState(int128 long ptr) combase.CoGetActivationState
|
@ stdcall CoGetActivationState(int128 long ptr) combase.CoGetActivationState
|
||||||
@ stdcall CoGetApartmentType(ptr ptr)
|
@ stdcall CoGetApartmentType(ptr ptr)
|
||||||
@ stdcall CoGetCallContext(ptr ptr) combase.CoGetCallContext
|
@ stdcall CoGetCallContext(ptr ptr) combase.CoGetCallContext
|
||||||
|
|
Loading…
Reference in New Issue