-
Notifications
You must be signed in to change notification settings - Fork 8
/
disphelper.replacements
185 lines (171 loc) · 5.49 KB
/
disphelper.replacements
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
convert c: #define DISPATCH_OBJ(objName) IDispatch * objName = NULL
to fb: #define DISPATCH_OBJ(objName) dim as IDispatch ptr objName = NULL
convert c:
#define WITH0(objName, pDisp, szMember) \
{ \
DISPATCH_OBJ(objName); \
if (SUCCEEDED(dhGetValue(L"%o", &objName, pDisp, szMember))) {
to fb:
#macro WITH0(objName, pDisp, szMember)
scope
DISPATCH_OBJ(objName)
if SUCCEEDED(dhGetValue(wstr("%o"), @objName, pDisp, szMember)) then
#endmacro
convert c:
#define WITH1(objName, pDisp, szMember, arg1) \
{ \
DISPATCH_OBJ(objName); \
if (SUCCEEDED(dhGetValue(L"%o", &objName, pDisp, szMember, arg1))) {
to fb:
#macro WITH1(objName, pDisp, szMember, arg1)
scope
DISPATCH_OBJ(objName)
if SUCCEEDED(dhGetValue(wstr("%o"), @objName, pDisp, szMember, arg1)) then
#endmacro
convert c:
#define WITH2(objName, pDisp, szMember, arg1, arg2)
{
DISPATCH_OBJ(objName);
if (SUCCEEDED(dhGetValue(L"%o", &objName, pDisp, szMember, arg1, arg2))) {
to fb:
#macro WITH2(objName, pDisp, szMember, arg1, arg2)
scope
DISPATCH_OBJ(objName)
if SUCCEEDED(dhGetValue(wstr("%o"), @objName, pDisp, szMember, arg1, arg2)) then
#endmacro
convert c:
#define WITH3(objName, pDisp, szMember, arg1, arg2, arg3)
{
DISPATCH_OBJ(objName);
if (SUCCEEDED(dhGetValue(L"%o", &objName, pDisp, szMember, arg1, arg2, arg3))) {
to fb:
#macro WITH3(objName, pDisp, szMember, arg1, arg2, arg3)
scope
DISPATCH_OBJ(objName)
if SUCCEEDED(dhGetValue(wstr("%o"), @objName, pDisp, szMember, arg1, arg2, arg3)) then
#endmacro
convert c:
#define WITH4(objName, pDisp, szMember, arg1, arg2, arg3, arg4)
{
DISPATCH_OBJ(objName);
if (SUCCEEDED(dhGetValue(L"%o", &objName, pDisp, szMember, arg1, arg2, arg3, arg4))) {
to fb:
#macro WITH4(objName, pDisp, szMember, arg1, arg2, arg3, arg4)
scope
DISPATCH_OBJ(objName)
if SUCCEEDED(dhGetValue(wstr("%o"), @objName, pDisp, szMember, arg1, arg2, arg3, arg4)) then
#endmacro
convert c: #define ON_WITH_ERROR(objName) } else {
to fb: #define ON_WITH_ERROR(objName) else
convert c: #define END_WITH(objName) } SAFE_RELEASE(objName); }
to fb:
#macro END_WITH(objName)
end if
SAFE_RELEASE(objName)
end scope
#endmacro
convert c:
#define FOR_EACH0(objName, pDisp, szMember) \
{ \
IEnumVARIANT * xx_pEnum_xx = NULL; \
DISPATCH_OBJ(objName); \
if (SUCCEEDED(dhEnumBegin(&xx_pEnum_xx, pDisp, szMember))) { \
while (dhEnumNextObject(xx_pEnum_xx, &objName) == NOERROR) {
to fb:
#macro FOR_EACH0(objName, pDisp, szMember)
scope
dim as IEnumVARIANT ptr xx_pEnum_xx = NULL
DISPATCH_OBJ(objName)
if SUCCEEDED(dhEnumBegin(@xx_pEnum_xx, pDisp, szMember)) then
while dhEnumNextObject(xx_pEnum_xx, @objName) = NOERROR
#endmacro
convert c:
#define FOR_EACH1(objName, pDisp, szMember, arg1) \
{ \
IEnumVARIANT * xx_pEnum_xx = NULL; \
DISPATCH_OBJ(objName); \
if (SUCCEEDED(dhEnumBegin(&xx_pEnum_xx, pDisp, szMember, arg1))) { \
while (dhEnumNextObject(xx_pEnum_xx, &objName) == NOERROR) {
to fb:
#macro FOR_EACH1(objName, pDisp, szMember, arg1)
scope
dim as IEnumVARIANT ptr xx_pEnum_xx = NULL
DISPATCH_OBJ(objName)
if SUCCEEDED(dhEnumBegin(@xx_pEnum_xx, pDisp, szMember, arg1)) then
while dhEnumNextObject(xx_pEnum_xx, @objName) = NOERROR
#endmacro
convert c:
#define FOR_EACH2(objName, pDisp, szMember, arg1, arg2) \
{ \
IEnumVARIANT * xx_pEnum_xx = NULL; \
DISPATCH_OBJ(objName); \
if (SUCCEEDED(dhEnumBegin(&xx_pEnum_xx, pDisp, szMember, arg1, arg2))) { \
while (dhEnumNextObject(xx_pEnum_xx, &objName) == NOERROR) {
to fb:
#macro FOR_EACH2(objName, pDisp, szMember, arg1, arg2)
scope
dim as IEnumVARIANT ptr xx_pEnum_xx = NULL
DISPATCH_OBJ(objName)
if SUCCEEDED(dhEnumBegin(@xx_pEnum_xx, pDisp, szMember, arg1, arg2)) then
while dhEnumNextObject(xx_pEnum_xx, @objName) = NOERROR
#endmacro
convert c:
#define FOR_EACH3(objName, pDisp, szMember, arg1, arg2, arg3) \
{ \
IEnumVARIANT * xx_pEnum_xx = NULL; \
DISPATCH_OBJ(objName); \
if (SUCCEEDED(dhEnumBegin(&xx_pEnum_xx, pDisp, szMember, arg1, arg2, arg3))) { \
while (dhEnumNextObject(xx_pEnum_xx, &objName) == NOERROR) {
to fb:
#macro FOR_EACH3(objName, pDisp, szMember, arg1, arg2, arg3)
scope
dim as IEnumVARIANT ptr xx_pEnum_xx = NULL
DISPATCH_OBJ(objName)
if SUCCEEDED(dhEnumBegin(@xx_pEnum_xx, pDisp, szMember, arg1, arg2, arg3)) then
while dhEnumNextObject(xx_pEnum_xx, @objName) = NOERROR
#endmacro
convert c:
#define FOR_EACH4(objName, pDisp, szMember, arg1, arg2, arg3, arg4) \
{ \
IEnumVARIANT * xx_pEnum_xx = NULL; \
DISPATCH_OBJ(objName); \
if (SUCCEEDED(dhEnumBegin(&xx_pEnum_xx, pDisp, szMember, arg1, arg2, arg3, arg4))) { \
while (dhEnumNextObject(xx_pEnum_xx, &objName) == NOERROR) {
to fb:
#macro FOR_EACH4(objName, pDisp, szMember, arg1, arg2, arg3, arg4)
scope
dim as IEnumVARIANT ptr xx_pEnum_xx = NULL
DISPATCH_OBJ(objName)
if SUCCEEDED(dhEnumBegin(@xx_pEnum_xx, pDisp, szMember, arg1, arg2, arg3, arg4)) then
while dhEnumNextObject(xx_pEnum_xx, @objName) = NOERROR
#endmacro
convert c:
#define ON_FOR_EACH_ERROR(objName) \
SAFE_RELEASE(objName); \
} \
} else { \
{
to fb:
#macro ON_FOR_EACH_ERROR(objName)
SAFE_RELEASE(objName)
wend
else
while 0
#endmacro
convert c:
#define NEXT(objName) \
SAFE_RELEASE(objName); \
} \
} \
SAFE_RELEASE(objName); \
SAFE_RELEASE(xx_pEnum_xx); \
}
to fb:
#macro NEXT_(objName)
SAFE_RELEASE(objName)
wend
end if
SAFE_RELEASE(objName)
SAFE_RELEASE(xx_pEnum_xx)
end scope
#endmacro