aboutsummaryrefslogtreecommitdiff
path: root/Src/Winamp/AppRefCount.h
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Winamp/AppRefCount.h')
-rw-r--r--Src/Winamp/AppRefCount.h35
1 files changed, 35 insertions, 0 deletions
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 <unknwn.h>
+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