forked from aqrit/ddwrapper
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gama.cpp
58 lines (51 loc) · 1.56 KB
/
gama.cpp
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
51
52
53
54
55
56
57
58
#include "header.h"
namespace gama
{
struct XVTBL
{
HRESULT (__stdcall * QueryInterface)( WRAP* This, const IID& riid, void** ppvObject );
ULONG (__stdcall * AddRef)( WRAP* This );
ULONG (__stdcall * Release)( WRAP* This );
HRESULT (__stdcall * GetGammaRamp)( WRAP* This, DWORD dwFlags, LPDDGAMMARAMP lpRampData );
HRESULT (__stdcall * SetGammaRamp)( WRAP* This, DWORD dwFlags, LPDDGAMMARAMP lpRampData );
};
HRESULT __stdcall QueryInterface( WRAP* This, const IID& riid, void** ppvObject )
{
PROLOGUE;
HRESULT hResult = This->gama->lpVtbl->QueryInterface( This->gama, riid, ppvObject );
if( SUCCEEDED( hResult ) ) Wrap( This->dd_parent, iid_to_vtbl( riid ), ppvObject );
EPILOGUE( hResult );
}
ULONG __stdcall AddRef( WRAP* This )
{
PROLOGUE;
ULONG dwCount = This->gama->lpVtbl->AddRef( This->gama );
EPILOGUE( dwCount );
}
ULONG __stdcall Release( WRAP* This )
{
PROLOGUE;
ULONG dwCount = WrapRelease( This );
EPILOGUE( dwCount );
}
HRESULT __stdcall GetGammaRamp( WRAP* This, DWORD dwFlags, LPDDGAMMARAMP lpRampData )
{
PROLOGUE;
HRESULT hResult = This->gama->lpVtbl->GetGammaRamp( This->gama, dwFlags, lpRampData );
EPILOGUE( hResult );
}
HRESULT __stdcall SetGammaRamp( WRAP* This, DWORD dwFlags, LPDDGAMMARAMP lpRampData )
{
PROLOGUE;
HRESULT hResult = This->gama->lpVtbl->SetGammaRamp( This->gama, dwFlags, lpRampData );
EPILOGUE( hResult );
}
const XVTBL xVtbl =
{
QueryInterface, // 0x00
AddRef, // 0x04
Release, // 0x08
GetGammaRamp, // 0x0C
SetGammaRamp, // 0x10
};
};