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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
#![cfg(windows)]
extern crate winapi;
use winapi::*;
extern "system" {
pub fn SysAllocString(psz: *const OLECHAR) -> BSTR;
pub fn SysReAllocString(pbstr: *mut BSTR, psz: *const OLECHAR) -> INT;
pub fn SysAllocStringLen(strIn: *const OLECHAR, ui: UINT) -> BSTR;
pub fn SysReAllocStringLen(pbstr: *mut BSTR, psz: *const OLECHAR, len: c_uint) -> INT;
pub fn SysFreeString(bstrString: BSTR);
pub fn SysStringLen(pbstr: BSTR) -> UINT;
pub fn SysStringByteLen(bstr: BSTR) -> UINT;
pub fn SysAllocStringByteLen(psz: LPCSTR, len: UINT) -> BSTR;
pub fn DosDateTimeToVariantTime(
wDosDate: USHORT, wDosTime: USHORT, pvtime: *mut DOUBLE
) -> INT;
pub fn VariantTimeToDosDateTime(
vtime: DOUBLE, pwDosDate: *mut USHORT, pwDosTime: *mut USHORT
) -> INT;
pub fn SystemTimeToVariantTime(lpSystemTime: LPSYSTEMTIME, pvtime: *mut DOUBLE) -> INT;
pub fn VariantTimeToSystemTime(vtime: DOUBLE, lpSystemTime: LPSYSTEMTIME) -> INT;
pub fn VarUI1FromI2(sIn: SHORT, pbOut: *mut BYTE);
pub fn VarUI1FromI4(lIn: LONG, pbOut: *mut BYTE);
pub fn VarUI1FromI8(i64In: LONG64, pbOut: *mut BYTE);
pub fn VarUI1FromR4(fltIn: FLOAT, pbOut: *mut BYTE);
pub fn VarUI1FromR8(dblIn: DOUBLE, pbOut: *mut BYTE);
pub fn VarUI1FromDate(dateIn: DATE, pbOut: *mut BYTE);
pub fn VarUI1FromStr(strIn: LPCOLESTR, lcid: LCID, dwFlags: ULONG, pbOut: *mut BYTE);
pub fn VarUI1FromI1(cIn: CHAR, pbOut: *mut BYTE);
pub fn VarUI1FromUI2(uiIn: USHORT, pbOut: *mut BYTE);
pub fn VarUI1FromUI4(ulIn: ULONG, pbOut: *mut BYTE);
pub fn VarUI1FromUI8(ui64In: ULONG64, pbOut: *mut BYTE);
pub fn VarUI1FromDec(pdecIn: *const DECIMAL, pbOut: *mut BYTE);
pub fn VarI2FromUI1(bIn: BYTE, psOut: *mut SHORT);
pub fn VarI2FromI4(lIn: LONG, psOut: *mut SHORT);
pub fn VarI2FromI8(i64In: LONG64, psOut: *mut SHORT);
pub fn VarI2FromR4(fltIn: FLOAT, psOut: *mut SHORT);
pub fn VarI2FromR8(dblIn: DOUBLE, psOut: *mut SHORT);
pub fn VarI2FromDate(dateIn: DATE, psOut: *mut SHORT);
pub fn VarI2FromStr(strIn: LPCOLESTR, lcid: LCID, dwFlags: ULONG, psOut: *mut SHORT);
pub fn VarI2FromI1(cIn: CHAR, psOut: *mut SHORT);
pub fn VarI2FromUI2(uiIn: USHORT, psOut: *mut SHORT);
pub fn VarI2FromUI4(ulIn: ULONG, psOut: *mut SHORT);
pub fn VarI2FromUI8(ui64In: ULONG64, psOut: *mut SHORT);
pub fn VarI2FromDec(pdecIn: *const DECIMAL, psOut: *mut SHORT);
pub fn VarI4FromUI1(bIn: BYTE, plOut: *mut LONG);
pub fn VarI4FromI2(sIn: SHORT, plOut: *mut LONG);
pub fn VarI4FromI8(i64In: LONG64, plOut: *mut LONG);
pub fn VarI4FromR4(fltIn: FLOAT, plOut: *mut LONG);
pub fn VarI4FromR8(dblIn: DOUBLE, plOut: *mut LONG);
pub fn VarI4FromDate(dateIn: DATE, plOut: *mut LONG);
pub fn VarI4FromStr(strIn: LPCOLESTR, lcid: LCID, dwFlags: ULONG, plOut: *mut LONG);
pub fn VarI4FromI1(cIn: CHAR, plOut: *mut LONG);
pub fn VarI4FromUI2(uiIn: USHORT, plOut: *mut LONG);
pub fn VarI4FromUI4(ulIn: ULONG, plOut: *mut LONG);
pub fn VarI4FromUI8(ui64In: ULONG64, plOut: *mut LONG);
pub fn VarI4FromDec(pdecIn: *const DECIMAL, plOut: *mut LONG);
pub fn VarI8FromUI1(bIn: BYTE, pi64Out: *mut LONG64);
pub fn VarI8FromI2(sIn: SHORT, pi64Out: *mut LONG64);
pub fn VarI8FromR4(fltIn: FLOAT, pi64Out: *mut LONG64);
pub fn VarI8FromR8(dblIn: DOUBLE, pi64Out: *mut LONG64);
pub fn VarI8FromDate(dateIn: DATE, pi64Out: *mut LONG64);
pub fn VarI8FromStr(strIn: LPCOLESTR, lcid: LCID, dwFlags: ULONG, pi64Out: *mut LONG64);
pub fn VarI8FromI1(cIn: CHAR, pi64Out: *mut LONG64);
pub fn VarI8FromUI2(uiIn: USHORT, pi64Out: *mut LONG64);
pub fn VarI8FromUI4(ulIn: ULONG, pi64Out: *mut LONG64);
pub fn VarI8FromUI8(ui64In: ULONG64, pi64Out: *mut LONG64);
pub fn VarI8FromDec(pdecIn: *const DECIMAL, pi64Out: *mut LONG64);
pub fn VarR4FromUI1(bIn: BYTE, pfltOut: *mut FLOAT);
pub fn VarR4FromI2(sIn: SHORT, pfltOut: *mut FLOAT);
pub fn VarR4FromI4(lIn: LONG, pfltOut: *mut FLOAT);
pub fn VarR4FromI8(i64In: LONG64, pfltOut: *mut FLOAT);
pub fn VarR4FromR8(dblIn: DOUBLE, pfltOut: *mut FLOAT);
pub fn VarR4FromDate(dateIn: DATE, pfltOut: *mut FLOAT);
pub fn VarR4FromStr(strIn: LPCOLESTR, lcid: LCID, dwFlags: ULONG, pfltOut: *mut FLOAT);
pub fn VarR4FromI1(cIn: CHAR, pfltOut: *mut FLOAT);
pub fn VarR4FromUI2(uiIn: USHORT, pfltOut: *mut FLOAT);
pub fn VarR4FromUI4(ulIn: ULONG, pfltOut: *mut FLOAT);
pub fn VarR4FromUI8(ui64In: ULONG64, pfltOut: *mut FLOAT);
pub fn VarR4FromDec(pdecIn: *const DECIMAL, pfltOut: *mut FLOAT);
pub fn VarR8FromUI1(bIn: BYTE, pdblOut: *mut DOUBLE);
pub fn VarR8FromI2(sIn: SHORT, pdblOut: *mut DOUBLE);
pub fn VarR8FromI4(lIn: LONG, pdblOut: *mut DOUBLE);
pub fn VarR8FromI8(i64In: LONG64, pdblOut: *mut DOUBLE);
pub fn VarR8FromR4(fltIn: FLOAT, pdblOut: *mut DOUBLE);
pub fn VarR8FromDate(dateIn: DATE, pdblOut: *mut DOUBLE);
pub fn VarR8FromStr(strIn: LPCOLESTR, lcid: LCID, dwFlags: ULONG, pdblOut: *mut DOUBLE);
pub fn VarR8FromI1(cIn: CHAR, pdblOut: *mut DOUBLE);
pub fn VarR8FromUI2(uiIn: USHORT, pdblOut: *mut DOUBLE);
pub fn VarR8FromUI4(ulIn: ULONG, pdblOut: *mut DOUBLE);
pub fn VarR8FromUI8(ui64In: ULONG64, pdblOut: *mut DOUBLE);
pub fn VarR8FromDec(pdecIn: *const DECIMAL, pdblOut: *mut DOUBLE);
pub fn VarDateFromUI1(bIn: BYTE, pdateOut: *mut DATE);
pub fn VarDateFromI2(sIn: SHORT, pdateOut: *mut DATE);
pub fn VarDateFromI4(lIn: LONG, pdateOut: *mut DATE);
pub fn VarDateFromI8(i64In: LONG64, pdateOut: *mut DATE);
pub fn VarDateFromR4(fltIn: FLOAT, pdateOut: *mut DATE);
pub fn VarDateFromR8(dblIn: DOUBLE, pdateOut: *mut DATE);
pub fn VarDateFromStr(strIn: LPCOLESTR, lcid: LCID, dwFlags: ULONG, pdateOut: *mut DATE);
pub fn VarDateFromI1(cIn: CHAR, pdateOut: *mut DATE);
pub fn VarDateFromUI2(uiIn: USHORT, pdateOut: *mut DATE);
pub fn VarDateFromUI4(ulIn: ULONG, pdateOut: *mut DATE);
pub fn VarDateFromUI8(ui64In: ULONG64, pdateOut: *mut DATE);
pub fn VarDateFromDec(pdecIn: *const DECIMAL, pdateOut: *mut DATE);
pub fn VarBstrFromUI1(bVal: BYTE, lcid: LCID, dwFlags: ULONG, pbstrOut: *mut BSTR);
pub fn VarBstrFromI2(iVal: SHORT, lcid: LCID, dwFlags: ULONG, pbstrOut: *mut BSTR);
pub fn VarBstrFromI4(lIn: LONG, lcid: LCID, dwFlags: ULONG, pbstrOut: *mut BSTR);
pub fn VarBstrFromI8(i64In: LONG64, lcid: LCID, dwFlags: ULONG, pbstrOut: *mut BSTR);
pub fn VarBstrFromR4(fltIn: FLOAT, lcid: LCID, dwFlags: ULONG, pbstrOut: *mut BSTR);
pub fn VarBstrFromR8(dblIn: DOUBLE, lcid: LCID, dwFlags: ULONG, pbstrOut: *mut BSTR);
pub fn VarBstrFromDate(dateIn: DATE, lcid: LCID, dwFlags: ULONG, pbstrOut: *mut BSTR);
pub fn VarBstrFromI1(cIn: CHAR, lcid: LCID, dwFlags: ULONG, pbstrOut: *mut BSTR);
pub fn VarBstrFromUI2(uiIn: USHORT, lcid: LCID, dwFlags: ULONG, pbstrOut: *mut BSTR);
pub fn VarBstrFromUI4(ulIn: ULONG, lcid: LCID, dwFlags: ULONG, pbstrOut: *mut BSTR);
pub fn VarBstrFromUI8(ui64In: ULONG64, lcid: LCID, dwFlags: ULONG, pbstrOut: *mut BSTR);
pub fn VarBstrFromDec(
pdecIn: *const DECIMAL, lcid: LCID, dwFlags: ULONG, pbstrOut: *mut BSTR
);
pub fn VarUI2FromUI1(bIn: BYTE, puiOut: *mut USHORT);
pub fn VarUI2FromI2(uiIn: SHORT, puiOut: *mut USHORT);
pub fn VarUI2FromI4(lIn: LONG, puiOut: *mut USHORT);
pub fn VarUI2FromI8(i64In: LONG64, puiOut: *mut USHORT);
pub fn VarUI2FromR4(fltIn: FLOAT, puiOut: *mut USHORT);
pub fn VarUI2FromR8(dblIn: DOUBLE, puiOut: *mut USHORT);
pub fn VarUI2FromDate(dateIn: DATE, puiOut: *mut USHORT);
pub fn VarUI2FromStr(strIn: LPCOLESTR, lcid: LCID, dwFlags: ULONG, puiOut: *mut USHORT);
pub fn VarUI2FromI1(cIn: CHAR, puiOut: *mut USHORT);
pub fn VarUI2FromUI4(ulIn: ULONG, puiOut: *mut USHORT);
pub fn VarUI2FromUI8(i64In: ULONG64, puiOut: *mut USHORT);
pub fn VarUI2FromDec(pdecIn: *const DECIMAL, puiOut: *mut USHORT);
pub fn VarUI4FromUI1(bIn: BYTE, pulOut: *mut ULONG);
pub fn VarUI4FromI2(uiIn: SHORT, pulOut: *mut ULONG);
pub fn VarUI4FromI4(lIn: LONG, pulOut: *mut ULONG);
pub fn VarUI4FromI8(i64In: LONG64, plOut: *mut ULONG);
pub fn VarUI4FromR4(fltIn: FLOAT, pulOut: *mut ULONG);
pub fn VarUI4FromR8(dblIn: DOUBLE, pulOut: *mut ULONG);
pub fn VarUI4FromDate(dateIn: DATE, pulOut: *mut ULONG);
pub fn VarUI4FromStr(strIn: LPCOLESTR, lcid: LCID, dwFlags: ULONG, pulOut: *mut ULONG);
pub fn VarUI4FromI1(cIn: CHAR, pulOut: *mut ULONG);
pub fn VarUI4FromUI2(uiIn: USHORT, pulOut: *mut ULONG);
pub fn VarUI4FromUI8(ui64In: ULONG64, plOut: *mut ULONG);
pub fn VarUI4FromDec(pdecIn: *const DECIMAL, pulOut: *mut ULONG);
pub fn VarUI8FromUI1(bIn: BYTE, pi64Out: *mut ULONG64);
pub fn VarUI8FromI2(sIn: SHORT, pi64Out: *mut ULONG64);
pub fn VarUI8FromI4(lIn: LONG, pi64Out: *mut ULONG64);
pub fn VarUI8FromI8(ui64In: LONG64, pi64Out: *mut ULONG64);
pub fn VarUI8FromR4(fltIn: FLOAT, pi64Out: *mut ULONG64);
pub fn VarUI8FromR8(dblIn: DOUBLE, pi64Out: *mut ULONG64);
pub fn VarUI8FromDate(dateIn: DATE, pi64Out: *mut ULONG64);
pub fn VarUI8FromStr(strIn: LPCOLESTR, lcid: LCID, dwFlags: ULONG, pi64Out: *mut ULONG64);
pub fn VarUI8FromI1(cIn: CHAR, pi64Out: *mut ULONG64);
pub fn VarUI8FromUI2(uiIn: USHORT, pi64Out: *mut ULONG64);
pub fn VarUI8FromUI4(ulIn: ULONG, pi64Out: *mut ULONG64);
pub fn VarUI8FromDec(pdecIn: *const DECIMAL, pi64Out: *mut ULONG64);
pub fn VarDecFromUI1(bIn: BYTE, pdecOut: *mut DECIMAL);
pub fn VarDecFromI2(uiIn: SHORT, pdecOut: *mut DECIMAL);
pub fn VarDecFromI4(lIn: LONG, pdecOut: *mut DECIMAL);
pub fn VarDecFromI8(i64In: LONG64, pdecOut: *mut DECIMAL);
pub fn VarDecFromR4(fltIn: FLOAT, pdecOut: *mut DECIMAL);
pub fn VarDecFromR8(dblIn: DOUBLE, pdecOut: *mut DECIMAL);
pub fn VarDecFromDate(dateIn: DATE, pdecOut: *mut DECIMAL);
pub fn VarDecFromStr(strIn: LPCOLESTR, lcid: LCID, dwFlags: ULONG, pdecOut: *mut DECIMAL);
pub fn VarDecFromI1(cIn: CHAR, pdecOut: *mut DECIMAL);
pub fn VarDecFromUI2(uiIn: USHORT, pdecOut: *mut DECIMAL);
pub fn VarDecFromUI4(ulIn: ULONG, pdecOut: *mut DECIMAL);
pub fn VarDecFromUI8(ui64In: ULONG64, pdecOut: *mut DECIMAL);
pub fn VarDecAdd(pdecLeft: LPDECIMAL, pdecRight: LPDECIMAL, pdecResult: LPDECIMAL);
pub fn VarDecDiv(pdecLeft: LPDECIMAL, pdecRight: LPDECIMAL, pdecResult: LPDECIMAL);
pub fn VarDecMul(pdecLeft: LPDECIMAL, pdecRight: LPDECIMAL, pdecResult: LPDECIMAL);
pub fn VarDecSub(pdecLeft: LPDECIMAL, pdecRight: LPDECIMAL, pdecResult: LPDECIMAL);
pub fn VarDecAbs(pdecIn: LPDECIMAL, pdecResult: LPDECIMAL);
pub fn VarDecFix(pdecIn: LPDECIMAL, pdecResult: LPDECIMAL);
pub fn VarDecInt(pdecIn: LPDECIMAL, pdecResult: LPDECIMAL);
pub fn VarDecNeg(pdecIn: LPDECIMAL, pdecResult: LPDECIMAL);
pub fn VarDecRound(pdecIn: LPDECIMAL, cDecimals: c_int, pdecResult: LPDECIMAL);
pub fn VarDecCmp(pdecLeft: LPDECIMAL, pdecRight: LPDECIMAL);
pub fn VarDecCmpR8(pdecLeft: LPDECIMAL, dblRight: c_double);
pub fn VarBstrCat(bstrLeft: BSTR, bstrRight: BSTR, pbstrResult: LPBSTR);
pub fn VarBstrCmp(bstrLeft: BSTR, bstrRight: BSTR, lcid: LCID, dwFlags: ULONG);
pub fn VarR8Pow(dblLeft: c_double, dblRight: c_double, pdblResult: *mut c_double);
pub fn VarR4CmpR8(fltLeft: c_float, dblRight: c_double);
pub fn VarR8Round(dblIn: c_double, cDecimals: c_int, pdblResult: *mut c_double);
pub fn GetAltMonthNames(lcid: LCID, prgp: *mut LPOLESTR);
pub fn RevokeActiveObject(dwRegister: DWORD, pvReserved: *mut c_void);
pub fn OaBuildVersion() -> ULONG;
pub fn OaEnablePerUserTLibRegistration();
}