-
Notifications
You must be signed in to change notification settings - Fork 11
/
IDirectInputEffect.h
50 lines (42 loc) · 1.44 KB
/
IDirectInputEffect.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#pragma once
class m_IDirectInputEffect : public IDirectInputEffect, public AddressLookupTableDinputObject
{
private:
IDirectInputEffect *ProxyInterface;
m_IDirectInputEffect *WrapperInterface;
REFIID WrapperID = IID_IDirectInputEffect;
ULONG Ref = 1;
// Requested DirectInput version - used to alter behaviour by requested version
DWORD diVersion = 0;
public:
m_IDirectInputEffect(IDirectInputEffect *aOriginal) : ProxyInterface(aOriginal), WrapperInterface(this)
{
LOG_LIMIT(3, "Creating interface " << __FUNCTION__ << " (" << this << ")");
ProxyAddressLookupTable.SaveAddress(this, ProxyInterface);
}
~m_IDirectInputEffect()
{
LOG_LIMIT(3, __FUNCTION__ << " (" << this << ")" << " deleting interface!");
ProxyAddressLookupTable.DeleteAddress(this);
}
/*** IUnknown methods ***/
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR * ppvObj);
STDMETHOD_(ULONG, AddRef)(THIS);
STDMETHOD_(ULONG, Release)(THIS);
/*** IDirectInputEffect methods ***/
STDMETHOD(Initialize)(THIS_ HINSTANCE, DWORD, REFGUID);
STDMETHOD(GetEffectGuid)(THIS_ LPGUID);
STDMETHOD(GetParameters)(THIS_ LPDIEFFECT, DWORD);
STDMETHOD(SetParameters)(THIS_ LPCDIEFFECT, DWORD);
STDMETHOD(Start)(THIS_ DWORD, DWORD);
STDMETHOD(Stop)(THIS);
STDMETHOD(GetEffectStatus)(THIS_ LPDWORD);
STDMETHOD(Download)(THIS);
STDMETHOD(Unload)(THIS);
STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE);
// Helper functions
void SetVersion(DWORD dwVersion)
{
diVersion = dwVersion;
}
};