forked from aqrit/ddwrapper
-
Notifications
You must be signed in to change notification settings - Fork 1
/
color.cpp
58 lines (51 loc) · 1.55 KB
/
color.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 color
{
struct XVTBL
{
HRESULT (__stdcall * QueryInterface)( WRAP* This, const IID& riid, void** ppvObject );
ULONG (__stdcall * AddRef)( WRAP* This );
ULONG (__stdcall * Release)( WRAP* This );
HRESULT (__stdcall * GetColorControls)( WRAP* This, LPDDCOLORCONTROL lpColorControl );
HRESULT (__stdcall * SetColorControls)( WRAP* This, LPDDCOLORCONTROL lpColorControl );
};
HRESULT __stdcall QueryInterface( WRAP* This, const IID& riid, void** ppvObject )
{
PROLOGUE;
HRESULT hResult = This->color->lpVtbl->QueryInterface( This->color, 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->color->lpVtbl->AddRef( This->color );
EPILOGUE( dwCount );
}
ULONG __stdcall Release( WRAP* This )
{
PROLOGUE;
ULONG dwCount = WrapRelease( This );
EPILOGUE( dwCount );
}
HRESULT __stdcall GetColorControls( WRAP* This, LPDDCOLORCONTROL lpColorControl )
{
PROLOGUE;
HRESULT hResult = This->color->lpVtbl->GetColorControls( This->color, lpColorControl );
EPILOGUE( hResult );
}
HRESULT __stdcall SetColorControls( WRAP* This, LPDDCOLORCONTROL lpColorControl )
{
PROLOGUE;
HRESULT hResult = This->color->lpVtbl->SetColorControls( This->color, lpColorControl );
EPILOGUE( hResult );
}
const XVTBL xVtbl =
{
QueryInterface, // 0x00
AddRef, // 0x04
Release, // 0x08
GetColorControls, // 0x0C
SetColorControls, // 0x10
};
};