//Global Reference Counters ULONG g_server_locks = 0; ULONG g_objcnt = 0; STDAPI DllCanUnloadNow() { if (g_server_locks == 0 || g_objcnt == 0) return TRUE; return FALSE; }
HRESULT DllCanUnloadNow();