mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-10 11:59:58 -05:00
Initial community commit
This commit is contained in:
35
Src/Winamp/AppRefCount.h
Normal file
35
Src/Winamp/AppRefCount.h
Normal file
@ -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
|
Reference in New Issue
Block a user