From 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d Mon Sep 17 00:00:00 2001 From: Jef Date: Tue, 24 Sep 2024 14:54:57 +0200 Subject: Initial community commit --- Src/Winamp/AppRefCount.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Src/Winamp/AppRefCount.h (limited to 'Src/Winamp/AppRefCount.h') diff --git a/Src/Winamp/AppRefCount.h b/Src/Winamp/AppRefCount.h new file mode 100644 index 00000000..8366d77c --- /dev/null +++ b/Src/Winamp/AppRefCount.h @@ -0,0 +1,35 @@ +#pragma once +#ifdef __cplusplus +#include +class ThreadRefCount : public IUnknown +{ +public: + ThreadRefCount(); + STDMETHOD(QueryInterface)(REFIID riid, PVOID *ppvObject); + STDMETHOD_(ULONG, AddRef)(void); + STDMETHOD_(ULONG, Release)(void); + + LONG refCount; +}; + +class AppRefCount : public IUnknown +{ +public: + AppRefCount(); + STDMETHOD(QueryInterface)(REFIID riid, PVOID *ppvObject); + STDMETHOD_(ULONG, AddRef)(void); + STDMETHOD_(ULONG, Release)(void); + + LONG refCount; + DWORD m_dwThread; +}; + +extern "C" { +#endif + void *InitAppRefCounterObject(DWORD threadId); + void *GetAppRefCounterObject(); + void AppRefCount_Release(); + int AppRefCount_CanQuit(); +#ifdef __cplusplus +} +#endif \ No newline at end of file -- cgit