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
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
|
// Licensed under the Apache License, Version 2.0
// <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
// All files in the project carrying such notice may not be copied, modified, or distributed
// except according to those terms.
//! Mappings for the contents of OleAuto.h
use ctypes::{c_double, c_float, c_int, c_uint, c_void};
use shared::basetsd::{LONG64, ULONG64};
use shared::minwindef::{BYTE, DWORD, FLOAT, UINT, ULONG, USHORT, WORD};
use shared::wtypes::{BSTR, DATE, DECIMAL, LPBSTR, LPDECIMAL, VARTYPE};
use shared::wtypesbase::{DOUBLE, LPCOLESTR, LPOLESTR, OLECHAR};
use um::minwinbase::LPSYSTEMTIME;
use um::oaidl::{
DISPID_UNKNOWN, ICreateErrorInfo, IErrorInfo, ITypeLib, SAFEARRAY, VARIANT, VARIANTARG
};
use um::winnt::{CHAR, HRESULT, INT, LCID, LONG, LPCSTR, SHORT};
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 SafeArrayAccessData(
psa: *mut SAFEARRAY,
ppvData: *mut *mut c_void,
) -> HRESULT;
pub fn SafeArrayUnaccessData(
psa: *mut SAFEARRAY,
) -> HRESULT;
pub fn SafeArrayCreateVector(
vt: VARTYPE,
lLbound: LONG,
cElements: ULONG,
) -> *mut SAFEARRAY;
pub fn SafeArrayGetLBound(
psa: *mut SAFEARRAY,
nDim: UINT,
plLbound: *mut LONG
) -> HRESULT;
pub fn SafeArrayGetUBound(
psa: *mut SAFEARRAY,
nDim: UINT,
plUbound: *mut LONG
) -> HRESULT;
pub fn SafeArrayDestroy(
psa: *mut SAFEARRAY
) -> HRESULT;
pub fn VariantInit(
pvarg: *mut VARIANTARG,
);
pub fn VariantClear(
pvarg: *mut VARIANTARG,
) -> HRESULT;
pub fn VariantCopy(
pvargDest: *mut VARIANTARG,
pvargSrc: *const VARIANTARG,
) -> HRESULT;
pub fn VariantCopyInd(
pvarDest: *mut VARIANT,
pvargSrc: *const VARIANTARG,
) -> HRESULT;
pub fn VariantChangeType(
pvargDest: *mut VARIANTARG,
pvarSrc: *const VARIANTARG,
wFlags: USHORT,
vt: VARTYPE,
) -> HRESULT;
pub fn VariantChangeTypeEx(
pvargDest: *mut VARIANTARG,
pvarSrc: *const VARIANTARG,
lcid: LCID,
wFlags: USHORT,
vt: VARTYPE,
) -> HRESULT;
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 type DISPID = LONG;
pub type MEMBERID = DISPID;
pub const MEMBERID_NIL: MEMBERID = DISPID_UNKNOWN;
pub const DISPATCH_METHOD: WORD = 0x1;
pub const DISPATCH_PROPERTYGET: WORD = 0x2;
pub const DISPATCH_PROPERTYPUT: WORD = 0x4;
pub const DISPATCH_PROPERTYPUTREF: WORD = 0x8;
ENUM!{enum REGKIND {
REGKIND_DEFAULT = 0,
REGKIND_REGISTER,
REGKIND_NONE,
}}
extern "system" {
pub fn LoadTypeLibEx(
szFile: LPCOLESTR,
regkind: REGKIND,
pptlib: *mut *mut ITypeLib,
) -> HRESULT;
pub fn RevokeActiveObject(
dwRegister: DWORD,
pvReserved: *mut c_void,
);
pub fn SetErrorInfo(
dwReserved: ULONG,
perrinfo: *mut IErrorInfo,
) -> HRESULT;
pub fn GetErrorInfo(
dwReserved: ULONG,
pperrinfo: *mut *mut IErrorInfo,
) -> HRESULT;
pub fn CreateErrorInfo(
pperrinfo: *mut *mut ICreateErrorInfo,
) -> HRESULT;
pub fn OaBuildVersion() -> ULONG;
pub fn OaEnablePerUserTLibRegistration();
}
|