示例#1
0
STDAPI DllCanUnloadNow(void)
{
#ifdef _MERGE_PROXYSTUB
    if (S_OK != PrxDllCanUnloadNow())
        return S_FALSE;
#endif

    return _Module.GetLockCount() ? S_FALSE : S_OK;
}
示例#2
0
// Used to determine whether the DLL can be unloaded by OLE
STDAPI DllCanUnloadNow(void)
{
#ifdef _MERGE_PROXYSTUB
    HRESULT hr = PrxDllCanUnloadNow();
    if (hr != S_OK)
        return hr;
#endif
    return _AtlModule.DllCanUnloadNow();
}
示例#3
0
文件: ObjMan.cpp 项目: hkaiser/TRiAS
STDAPI DllCanUnloadNow(void)
{
#ifdef _MERGE_PROXYSTUB
	if (PrxDllCanUnloadNow() != S_OK)
		return S_FALSE;
#endif
	AFX_MANAGE_STATE(AfxGetStaticModuleState());
	return (AfxDllCanUnloadNow() && _Module.GetLockCount()==0) ? S_OK : S_FALSE;
}
示例#4
0
// Used to determine whether the DLL can be unloaded by OLE
STDAPI DllCanUnloadNow(void)
{
#ifdef _MERGE_PROXYSTUB
    HRESULT hr = PrxDllCanUnloadNow();
    if (hr != S_OK)
        return hr;
#endif
    AFX_MANAGE_STATE(AfxGetStaticModuleState());
    return (AfxDllCanUnloadNow()==S_OK && _AtlModule.GetLockCount()==0) ? S_OK : S_FALSE;
}
示例#5
0
/*----------------------------------------------------------------------------------------------
	Tests to see if the DLL can unload. This function is required by COM and must be
		exported from the DLL.
----------------------------------------------------------------------------------------------*/
STDAPI DLLEXPORT__ DllCanUnloadNow(void)
{
	ENTER_DLL();
#ifdef _MERGE_PROXYSTUB
	HRESULT hr = PrxDllCanUnloadNow();
	if (hr != S_OK)
		return hr;
#endif
	return ModuleEntry::ModuleCanUnloadNow();
}
示例#6
0
// Used to determine whether the DLL can be unloaded by OLE
STDAPI DllCanUnloadNow(void)
{
#ifdef _MERGE_PROXYSTUB
    HRESULT hr = PrxDllCanUnloadNow();
    if (hr != S_OK)
        return hr;
#endif
	if (v_hPrivateHeap) HeapDestroy(v_hPrivateHeap);

	return _AtlModule.DllCanUnloadNow();
}
STDAPI DllCanUnloadNow(void)
{
#ifdef _MERGE_PROXYSTUB
    if ( PrxDllCanUnloadNow() != S_OK )
    {
        return S_FALSE;
    }
#endif

    if ( _Module.GetLockCount() == 0 )
    {
        //
        // All references to COM objects in this DLL have been released, so
        // the DLL can now be safely unloaded. After this returns, DllMain
        // will be called with dwReason == DLL_PROCESS_DETACH.
        //
        return S_OK;
    }
    else
    {
        return S_FALSE;
    }
}