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
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
|
Unit ActiveX;
//+-------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// File: objidl.idl
//
// Header translation by Marco van de Voort for Free Pascal Platform
// SDK dl'ed January 2002
//
//--------------------------------------------------------------------------
{$Mode objfpc}
{$ifndef NO_SMART_LINK}
{$smartlink on}
{$endif}
Interface
Uses variants,Windows,ctypes,types;
type
{ extra types }
TOleChar = Types.TOleChar;
POleStr = Types.POleStr;
PPOleStr = Types.PPOleStr;
TBStr = POleStr;
TBStrList = array[0..(high(integer) div sizeof(TBSTR))-1] of TBstr;
PBStrList = ^TBStrList;
POleStrList = ^TOleStrList;
TOleStrList = array[0..(high(integer) div sizeof(POleStr))-1] of POleStr;
PBStr = ^TBStr;
TOleEnum = type LongWord;
LargeInt = Types.LargeInt;
LargeUInt = Types.LargeUInt;
PLargeInt = Types.PLargeInt;
PLargeUInt = Types.PLargeUInt;
FMTID = TGUID;
pFMTID = pGUID;
{ Glue types, should be linked to the proper windows unit types}
Size_t = DWord; {??, probably, like Unix, typecastable to pointer?!?}
OleChar = WChar;
LPOLESTR = ^OLECHAR;
POLECHAR = LPOLESTR;
PLPOLESTR = ^LPOLESTR;
PROPID = ULONG;
TPROPID= PROPID;
PPROPID= ^PROPID;
VARIANT_BOOL = wordbool;
_VARIANT_BOOL = VARIANT_BOOL;
PVARIANT_BOOL = ^VARIANT_BOOL;
CY = CURRENCY;
DATE = DOUBLE;
BSTR = POLESTR;
TOleDate = DATE;
POleDate = ^TOleDate;
OLE_HANDLE = UINT;
LPOLE_HANDLE = ^OLE_HANDLE;
OLE_COLOR = DWORD;
LPOLE_COLOR = ^OLE_COLOR;
TOleHandle = OLE_HANDLE;
POleHandle = LPOLE_HANDLE;
TOleColor = OLE_COLOR;
POleColor = LPOle_Color;
CONST
GUID_NULL : TGUID = '{00000000-0000-0000-0000-000000000000}';
// bit flags for IExternalConnection
CONST
EXTCONN_STRONG = $0001; // strong connection
EXTCONN_WEAK = $0002; // weak connection (table, container)
EXTCONN_CALLABLE = $0004; // table .vs. callable
{Bind Flags}
BIND_MAYBOTHERUSER = 1;
BIND_JUSTTESTEXISTENCE = 2;
MKSYS_NONE = 0;
MKSYS_GENERICCOMPOSITE = 1;
MKSYS_FILEMONIKER = 2;
MKSYS_ANTIMONIKER = 3;
MKSYS_ITEMMONIKER = 4;
MKSYS_POINTERMONIKER = 5;
// MKSYS_URLMONIKER = 6;
MKSYS_CLASSMONIKER = 7;
MKSYS_OBJREFMONIKER = 8;
MKSYS_SESSIONMONIKER = 9;
// system moniker types; returned from IsSystemMoniker.
MKRREDUCE_ONE = 3 SHL 16;
MKRREDUCE_TOUSER = 2 SHL 16;
MKRREDUCE_THROUGHUSER = 1 SHL 16;
MKRREDUCE_ALL = 0;
// Storage element types
STGTY_STORAGE = 1;
STGTY_STREAM = 2;
STGTY_LOCKBYTES = 3;
STGTY_PROPERTY = 4;
STREAM_SEEK_SET = 0;
STREAM_SEEK_CUR = 1;
STREAM_SEEK_END = 2;
LOCK_WRITE = 1;
LOCK_EXCLUSIVE = 2;
LOCK_ONLYONCE = 4;
//Advise Flags
ADVF_NODATA = 1;
ADVF_PRIMEFIRST = 2;
ADVF_ONLYONCE = 4;
ADVF_DATAONSTOP = 64;
ADVFCACHE_NOHANDLER = 8;
ADVFCACHE_FORCEBUILTIN = 16;
ADVFCACHE_ONSAVE = 32;
//****************************************************************************
//* Notification Interfaces
//****************************************************************************/
TYMED_HGLOBAL = 1;
TYMED_FILE = 2;
TYMED_ISTREAM = 4;
TYMED_ISTORAGE = 8;
TYMED_GDI = 16;
TYMED_MFPICT = 32;
TYMED_ENHMF = 64;
TYMED_NULL = 0;
// Object Definitions for EnumObjects()
OBJ_PEN = 1;
OBJ_BRUSH = 2;
OBJ_DC = 3;
OBJ_METADC = 4;
OBJ_PAL = 5;
OBJ_FONT = 6;
OBJ_BITMAP = 7;
OBJ_REGION = 8;
OBJ_METAFILE = 9;
OBJ_MEMDC = 10;
OBJ_EXTPEN = 11;
OBJ_ENHMETADC = 12;
OBJ_ENHMETAFILE = 13;
DATADIR_GET = 1;
DATADIR_SET = 2;
// call type used by IMessageFilter::HandleIncomingMessage
CALLTYPE_TOPLEVEL = 1; // toplevel call - no outgoing call
CALLTYPE_NESTED = 2; // callback on behalf of previous outgoing call - should always handle
CALLTYPE_ASYNC = 3; // aysnchronous call - can NOT be rejected
CALLTYPE_TOPLEVEL_CALLPENDING = 4; // new toplevel call with new LID
CALLTYPE_ASYNC_CALLPENDING = 5; // async call - can NOT be rejected
// status of server call - returned by IMessageFilter::HandleIncomingCall
// and passed to IMessageFilter::RetryRejectedCall
SERVERCALL_ISHANDLED = 0;
SERVERCALL_REJECTED = 1;
SERVERCALL_RETRYLATER = 2;
// Pending type indicates the level of nesting
PENDINGTYPE_TOPLEVEL = 1; // toplevel call
PENDINGTYPE_NESTED = 2; // nested call
// return values of MessagePending
PENDINGMSG_CANCELCALL = 0; // cancel the outgoing call
PENDINGMSG_WAITNOPROCESS = 1; // wait for the return and don't dispatch the message
PENDINGMSG_WAITDEFPROCESS = 2; // wait and dispatch the message
EOAC_NONE = $0;
EOAC_MUTUAL_AUTH = $1;
EOAC_STATIC_CLOAKING = $20;
EOAC_DYNAMIC_CLOAKING = $40;
EOAC_ANY_AUTHORITY = $80;
EOAC_MAKE_FULLSIC = $100;
EOAC_DEFAULT = $800;
// These are only valid for CoInitializeSecurity
EOAC_SECURE_REFS = $2;
EOAC_ACCESS_CONTROL = $4;
EOAC_APPID = $8;
EOAC_DYNAMIC = $10;
EOAC_REQUIRE_FULLSIC = $200;
EOAC_AUTO_IMPERSONATE = $400;
EOAC_NO_CUSTOM_MARSHAL = $2000;
EOAC_DISABLE_AAA = $1000;
//****************************************************************************
//* ICOMThreadingInfo and enums
//****************************************************************************/
APTTYPE_CURRENT = -1;
APTTYPE_STA = 0;
APTTYPE_MTA = 1;
APTTYPE_NA = 2;
APTTYPE_MAINSTA = 3;
THDTYPE_BLOCKMESSAGES = 0;
THDTYPE_PROCESSMESSAGES = 1;
DCOM_NONE = $0;
DCOM_CALL_COMPLETE = $1;
DCOM_CALL_CANCELED = $2;
COMBND_RPCTIMEOUT = $1; // Rpc transport-specific timeout.
//************************* Misc Enums wtypes.h ***********************************/
// Common typdefs used in API paramaters, gleamed from compobj.h
// memory context values; passed to CoGetMalloc
Const
MEMCTX_TASK = 1; // task (private) memory
MEMCTX_SHARED = 2; // shared memory (between processes)
MEMCTX_MACSYSTEM = 3; // on the mac, the system heap
// these are mostly for internal use...
MEMCTX_UNKNOWN = -1; // unknown context (when asked about it)
MEMCTX_SAME = -2; // same context (as some other pointer)
// For IRunningObjectTable::Register
ROTFLAGS_REGISTRATIONKEEPSALIVE = $1;
ROTFLAGS_ALLOWANYCLIENT = $2;
// Maximum size of comparison buffer for IROTData::GetComparisonData
ROT_COMPARE_MAX = 2048;
// class context: used to determine what scope and kind of class object to use
// NOTE: this is a bitwise enum
CLSCTX_INPROC_SERVER = $0001; // server dll (runs in same process as caller)
CLSCTX_INPROC_HANDLER = $0002; // handler dll (runs in same process as caller)
CLSCTX_LOCAL_SERVER = $0004; // server exe (runs on same machine; diff proc)
CLSCTX_INPROC_SERVER16 = $0008; // 16-bit server dll (runs in same process as caller)
CLSCTX_REMOTE_SERVER = $0010; // remote server exe (runs on different machine)
CLSCTX_INPROC_HANDLER16 = $0020; // 16-bit handler dll (runs in same process as caller)
CLSCTX_INPROC_SERVERX86 = $0040; // Wx86 server dll (runs in same process as caller)
CLSCTX_INPROC_HANDLERX86 = $0080; // Wx86 handler dll (runs in same process as caller)
CLSCTX_ESERVER_HANDLER = $0100; // handler dll (runs in the server process)
CLSCTX_RESERVED =$0200; // reserved
CLSCTX_NO_CODE_DOWNLOAD = $0400; // disallow code download from the Directory Service (if any) or the internet -rahulth
CLSCTX_NO_WX86_TRANSLATION = $0800;
CLSCTX_NO_CUSTOM_MARSHAL = $1000;
CLSCTX_ENABLE_CODE_DOWNLOAD = $2000; // allow code download from the Directory Service (if any) or the internet
CLSCTX_NO_FAILURE_LOG = $04000; // do not log messages about activation failure (should one occur) to Event Log
CLSCTX_DISABLE_AAA = $08000; // Disable EOAC_DISABLE_AAA capability for this activation only
CLSCTX_ENABLE_AAA = $10000; // Enable EOAC_DISABLE_AAA capability for this activation only
CLSCTX_FROM_DEFAULT_CONTEXT = $20000; // Begin this activation from the default context of the current apartment
CLSCTX_INPROC = (CLSCTX_INPROC_SERVER OR CLSCTX_INPROC_HANDLER);
// With DCOM, CLSCTX_REMOTE_SERVER should be included
CLSCTX_ALL = (CLSCTX_INPROC_SERVER OR CLSCTX_INPROC_HANDLER OR CLSCTX_LOCAL_SERVER {$ifdef Remote} OR CLSCTX_REMOTE_SERVER {$endif});
CLSCTX_SERVER = (CLSCTX_INPROC_SERVER OR CLSCTX_LOCAL_SERVER {$ifdef Remote} OR CLSCTX_REMOTE_SERVER {$endif});
// marshaling flags; passed to CoMarshalInterface
MSHLFLAGS_NORMAL = 0; // normal marshaling via proxy/stub
MSHLFLAGS_TABLESTRONG = 1; // keep object alive; must explicitly release
MSHLFLAGS_TABLEWEAK = 2; // doesn't hold object alive; still must release
MSHLFLAGS_NOPING = 4; // remote clients dont 'ping' to keep objects alive
MSHLFLAGS_RESERVED1 = 8; // reserved
MSHLFLAGS_RESERVED2 = 16; // reserved
MSHLFLAGS_RESERVED3 = 32; // reserved
MSHLFLAGS_RESERVED4 = 64; // reserved
// marshal context: determines the destination context of the marshal operation
MSHCTX_LOCAL = 0; // unmarshal context is local (eg.shared memory)
MSHCTX_NOSHAREDMEM = 1; // unmarshal context has no shared memory access
MSHCTX_DIFFERENTMACHINE = 2; // unmarshal context is on a different machine
MSHCTX_INPROC = 3; // unmarshal context is on different thread
MSHCTX_CROSSCTX = 4; // unmarshal context is on different context
// #########################################################################
//
// VARTYPE
//
// #########################################################################
{
VARENUM usage key,
* [V] - may appear in a VARIANT
* [T] - may appear in a TYPEDESC
* [P] - may appear in an OLE property set
* [S] - may appear in a Safe Array
VT_EMPTY [V] [P] nothing
VT_NULL [V] [P] SQL style Null
VT_I2 [V][T][P][S] 2 byte signed int
VT_I4 [V][T][P][S] 4 byte signed int
VT_R4 [V][T][P][S] 4 byte real
VT_R8 [V][T][P][S] 8 byte real
VT_CY [V][T][P][S] currency
VT_DATE [V][T][P][S] date
VT_BSTR [V][T][P][S] OLE Automation string
VT_DISPATCH [V][T] [S] IDispatch *
VT_ERROR [V][T][P][S] SCODE
VT_BOOL [V][T][P][S] True=-1, False=0
VT_VARIANT [V][T][P][S] VARIANT *
VT_UNKNOWN [V][T] [S] IUnknown *
VT_DECIMAL [V][T] [S] 16 byte fixed point
VT_RECORD [V] [P][S] user defined type
VT_I1 [V][T][P][s] signed char
VT_UI1 [V][T][P][S] unsigned char
VT_UI2 [V][T][P][S] unsigned short
VT_UI4 [V][T][P][S] unsigned long
VT_I8 [T][P] signed 64-bit int
VT_UI8 [T][P] unsigned 64-bit int
VT_INT [V][T][P][S] signed machine int
VT_UINT [V][T] [S] unsigned machine int
VT_INT_PTR [T] signed machine register size width
VT_UINT_PTR [T] unsigned machine register size width
VT_VOID [T] C style void
VT_HRESULT [T] Standard return type
VT_PTR [T] pointer type
VT_SAFEARRAY [T] (use VT_ARRAY in VARIANT)
VT_CARRAY [T] C style array
VT_USERDEFINED [T] user defined type
VT_LPSTR [T][P] null terminated string
VT_LPWSTR [T][P] wide null terminated string
VT_FILETIME [P] FILETIME
VT_BLOB [P] Length prefixed bytes
VT_STREAM [P] Name of the stream follows
VT_STORAGE [P] Name of the storage follows
VT_STREAMED_OBJECT [P] Stream contains an object
VT_STORED_OBJECT [P] Storage contains an object
VT_VERSIONED_STREAM [P] Stream with a GUID version
VT_BLOB_OBJECT [P] Blob contains an object
VT_CF [P] Clipboard format
VT_CLSID [P] A Class ID
VT_VECTOR [P] simple counted array
VT_ARRAY [V] SAFEARRAY*
VT_BYREF [V] void* for local use
VT_BSTR_BLOB Reserved for system use
}
// VARENUM's
VT_EMPTY = 0;
VT_NULL = 1;
VT_I2 = 2;
VT_I4 = 3;
VT_R4 = 4;
VT_R8 = 5;
VT_CY = 6;
VT_DATE = 7;
VT_BSTR = 8;
VT_DISPATCH = 9;
VT_ERROR = 10;
VT_BOOL = 11;
VT_VARIANT = 12;
VT_UNKNOWN = 13;
VT_DECIMAL = 14;
// VBA reserves 15 for future use
VT_I1 = 16;
VT_UI1 = 17;
VT_UI2 = 18;
VT_UI4 = 19;
VT_I8 = 20;
VT_UI8 = 21;
VT_INT = 22;
VT_UINT = 23;
VT_VOID = 24;
VT_HRESULT = 25;
VT_PTR = 26;
VT_SAFEARRAY = 27;
VT_CARRAY = 28;
VT_USERDEFINED = 29;
VT_LPSTR = 30;
VT_LPWSTR = 31;
// VBA reserves 32-35 for future use
VT_RECORD = 36;
VT_INT_PTR = 37;
VT_UINT_PTR = 38;
VT_FILETIME = 64;
VT_BLOB = 65;
VT_STREAM = 66;
VT_STORAGE = 67;
VT_STREAMED_OBJECT = 68;
VT_STORED_OBJECT = 69;
VT_BLOB_OBJECT = 70;
VT_CF = 71;
VT_CLSID = 72;
VT_VERSIONED_STREAM = 73;
VT_BSTR_BLOB = $0fff;
VT_VECTOR = $1000;
VT_ARRAY = $2000;
VT_BYREF = $4000;
VT_RESERVED = $8000;
VT_ILLEGAL = $ffff;
VT_ILLEGALMASKED = $0fff;
VT_TYPEMASK = $0fff;
//
// Common typedefs for paramaters used in data view API's, gleamed
// from dvobj.h
//
// Data/View aspect; specifies the desired aspect of the object when
// drawing or getting data.
DVASPECT_CONTENT = 1;
DVASPECT_THUMBNAIL = 2;
DVASPECT_ICON = 4;
DVASPECT_DOCPRINT = 8;
//****** Storage types *************************************************
// Storage commit types
STGC_DEFAULT = 0;
STGC_OVERWRITE = 1;
STGC_ONLYIFCURRENT = 2;
STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE = 4;
STGC_CONSOLIDATE = 8;
STGMOVE_MOVE = 0;
STGMOVE_COPY = 1;
STGMOVE_SHALLOWCOPY = 2;
STATFLAG_DEFAULT = 0;
STATFLAG_NONAME = 1;
STATFLAG_NOOPEN = 2;
// #########################################################################
//
// Constants for the call context
//
WDT_INPROC_CALL = ULONG($48746457);
WDT_REMOTE_CALL = ULONG($52746457);
WDT_INPROC64_CALL = ULONG($50746457);
COLE_DEFAULT_PRINCIPAL {: pOleStr?} = pOleStr(-1);
COLE_DEFAULT_AUTHINFO {: pointer?} = pointer(-1);
// DISPID reserved to indicate an \"unknown\" name
// only reserved for data members (properties); reused as a method dispid below
DISPID_UNKNOWN = -1;
// DISPID reserved for the \"value\" property
DISPID_VALUE = 0;
// The following DISPID is reserved to indicate the param")
// that is the right-hand-side (or \"put\" value) of a PropertyPut")
DISPID_PROPERTYPUT = -3;
// DISPID reserved for the standard \"NewEnum\" method
DISPID_NEWENUM = -4;
// DISPID reserved for the standard \"Evaluate\" method
DISPID_EVALUATE = -5;
DISPID_CONSTRUCTOR = -6;
DISPID_DESTRUCTOR = -7;
DISPID_COLLECT = -8;
DISPATCH_METHOD = $1;
DISPATCH_PROPERTYGET = $2;
DISPATCH_PROPERTYPUT = $4;
DISPATCH_PROPERTYPUTREF = $8;
USERCLASSTYPE_FULL = 1;
USERCLASSTYPE_SHORT = 2;
USERCLASSTYPE_APPNAME = 3;
// The range -500 through -999 is reserved for Controls
// The range 0x80010000 through 0x8001FFFF is reserved for Controls
// The range -5000 through -5499 is reserved for ActiveX Accessability
// The range -2000 through -2499 is reserved for VB5
// The range -3900 through -3999 is reserved for Forms
// The range -5500 through -5550 is reserved for Forms
// The remainder of the negative DISPIDs are reserved for future use
DESCKIND_NONE = 0;
DESCKIND_FUNCDESC = 1;
DESCKIND_VARDESC = 2;
DESCKIND_TYPECOMP = 3;
DESCKIND_IMPLICITAPPOBJ = 4;
DESCKIND_MAX = 5;
SYS_WIN16 = 0;
SYS_WIN32 = 1;
SYS_MAC = 2;
SYS_WIN64 = 3;
REGKIND_DEFAULT = 0;
REGKIND_REGISTER = 1;
REGKIND_NONE = 2;
INTERFACESAFE_FOR_UNTRUSTED_CALLER = $00000001; // Caller of interface may be untrusted
INTERFACESAFE_FOR_UNTRUSTED_DATA = $00000002; // Data passed into interface may be untrusted
INTERFACE_USES_DISPEX = $00000004; // Object knows to use IDispatchEx
INTERFACE_USES_SECURITY_MANAGER = $00000008; // Object knows to use IInternetHostSecurityManager
LIBFLAG_FRESTRICTED = $01;
LIBFLAG_FCONTROL = $02;
LIBFLAG_FHIDDEN = $04;
LIBFLAG_FHASDISKIMAGE = $08;
TYPEFLAG_FAPPOBJECT = $01;
TYPEFLAG_FCANCREATE = $02;
TYPEFLAG_FLICENSED = $04;
TYPEFLAG_FPREDECLID = $08;
TYPEFLAG_FHIDDEN = $10;
TYPEFLAG_FCONTROL = $20;
TYPEFLAG_FDUAL = $40;
TYPEFLAG_FNONEXTENSIBLE = $80;
TYPEFLAG_FOLEAUTOMATION = $100;
TYPEFLAG_FRESTRICTED = $200;
TYPEFLAG_FAGGREGATABLE = $400;
TYPEFLAG_FREPLACEABLE = $800;
TYPEFLAG_FDISPATCHABLE = $1000;
TYPEFLAG_FREVERSEBIND = $2000;
TYPEFLAG_FPROXY = $4000;
FUNCFLAG_FRESTRICTED = $1;
FUNCFLAG_FSOURCE = $2;
FUNCFLAG_FBINDABLE = $4;
FUNCFLAG_FREQUESTEDIT = $8;
FUNCFLAG_FDISPLAYBIND = $10;
FUNCFLAG_FDEFAULTBIND = $20;
FUNCFLAG_FHIDDEN = $40;
FUNCFLAG_FUSESGETLASTERROR = $80;
FUNCFLAG_FDEFAULTCOLLELEM = $100;
FUNCFLAG_FUIDEFAULT = $200;
FUNCFLAG_FNONBROWSABLE = $400;
FUNCFLAG_FREPLACEABLE = $800;
FUNCFLAG_FIMMEDIATEBIND = $1000;
VARFLAG_FREADONLY = $1;
VARFLAG_FSOURCE = $2;
VARFLAG_FBINDABLE = $4;
VARFLAG_FREQUESTEDIT = $8;
VARFLAG_FDISPLAYBIND = $10;
VARFLAG_FDEFAULTBIND = $20;
VARFLAG_FHIDDEN = $40;
VARFLAG_FRESTRICTED = $80;
VARFLAG_FDEFAULTCOLLELEM = $100;
VARFLAG_FUIDEFAULT = $200;
VARFLAG_FNONBROWSABLE = $400;
VARFLAG_FREPLACEABLE = $800;
VARFLAG_FIMMEDIATEBIND = $1000;
FADF_AUTO = USHORT($0001); // array is allocated on the stack
FADF_STATIC = USHORT($0002); // array is staticly allocated
FADF_EMBEDDED = USHORT($0004); // array is embedded in a structure
FADF_FIXEDSIZE = USHORT($0010); // may not be resized or reallocated
FADF_RECORD = USHORT($0020); // an array of records
FADF_HAVEIID = USHORT($0040); // with FADF_DISPATCH, FADF_UNKNOWN
// array has an IID for interfaces
FADF_HAVEVARTYPE = USHORT($0080); // array has a VT type
FADF_BSTR = USHORT($0100); // an array of BSTRs
FADF_UNKNOWN = USHORT($0200); // an array of IUnknown*
FADF_DISPATCH = USHORT($0400); // an array of IDispatch*
FADF_VARIANT = USHORT($0800); // an array of VARIANTs
FADF_RESERVED = USHORT($F008); // reserved bits
// IMPLTYPE Flags
IMPLTYPEFLAG_FDEFAULT = USHORT($1);
IMPLTYPEFLAG_FSOURCE = USHORT($2);
IMPLTYPEFLAG_FRESTRICTED = USHORT($4);
IMPLTYPEFLAG_FDEFAULTVTABLE = USHORT($8);
PARAMFLAG_NONE = USHORT($00);
PARAMFLAG_FIN = USHORT($01);
PARAMFLAG_FOUT = USHORT($02);
PARAMFLAG_FLCID = USHORT($04);
PARAMFLAG_FRETVAL = USHORT($08);
PARAMFLAG_FOPT = USHORT($10);
PARAMFLAG_FHASDEFAULT = USHORT($20);
PARAMFLAG_FHASCUSTDATA = USHORT($40);
VAR_PERINSTANCE = 0;
VAR_STATIC = 1;
VAR_CONST = 2;
VAR_DISPATCH = 3;
// notification messages used by the dynamic typeinfo protocol.
CHANGEKIND_ADDMEMBER = 0;
CHANGEKIND_DELETEMEMBER = 1;
CHANGEKIND_SETNAMES = 2;
CHANGEKIND_SETDOCUMENTATION = 3;
CHANGEKIND_GENERAL = 4;
CHANGEKIND_INVALIDATE = 5;
CHANGEKIND_CHANGEFAILED = 6;
CHANGEKIND_MAX = 7;
INVOKE_FUNC = 1;
INVOKE_PROPERTYGET = 2;
INVOKE_PROPERTYPUT = 4;
INVOKE_PROPERTYPUTREF = 8;
TKIND_ENUM = 0;
TKIND_RECORD = 1;
TKIND_MODULE = 2;
TKIND_INTERFACE = 3;
TKIND_DISPATCH = 4;
TKIND_COCLASS = 5;
TKIND_ALIAS = 6;
TKIND_UNION = 7;
TKIND_MAX = 8; // end of enum marker
SF_ERROR = VT_ERROR;
SF_I1 = VT_I1;
SF_I2 = VT_I2;
SF_I4 = VT_I4;
SF_I8 = VT_I8;
SF_BSTR = VT_BSTR;
SF_UNKNOWN = VT_UNKNOWN;
SF_DISPATCH = VT_DISPATCH;
SF_VARIANT = VT_VARIANT;
SF_RECORD = VT_RECORD;
SF_HAVEIID = VT_UNKNOWN OR VT_RESERVED;
IDLFLAG_NONE = PARAMFLAG_NONE;
IDLFLAG_FIN = PARAMFLAG_FIN;
IDLFLAG_FOUT = PARAMFLAG_FOUT;
IDLFLAG_FLCID = PARAMFLAG_FLCID;
IDLFLAG_FRETVAL = PARAMFLAG_FRETVAL;
CC_FASTCALL = 0;
CC_CDECL = 1;
CC_MSCPASCAL = 2;
CC_PASCAL = CC_MSCPASCAL;
CC_MACPASCAL = 3;
CC_STDCALL = 4;
CC_FPFASTCALL = 5;
CC_SYSCALL = 6;
CC_MPWCDECL = 7;
CC_MPWPASCAL = 8;
CC_MAX = 9; // end of enum marker
FUNC_VIRTUAL = 0;
FUNC_PUREVIRTUAL = 1;
FUNC_NONVIRTUAL = 2;
FUNC_STATIC = 3;
FUNC_DISPATCH = 4;
// objbase.h
MARSHALINTERFACE_MIN = 500; // minimum number of bytes for interface marshl
//
// Common typedefs for paramaters used in Storage API's, gleamed from storage.h
// Also contains Storage error codes, which should be moved into the storage
// idl files.
//
CWCSTORAGENAME = 32;
// Storage instantiation modes
STGM_DIRECT = $00000000;
STGM_TRANSACTED = $00010000;
STGM_SIMPLE = $08000000;
STGM_READ = $00000000;
STGM_WRITE = $00000001;
STGM_READWRITE = $00000002;
STGM_SHARE_DENY_NONE = $00000040;
STGM_SHARE_DENY_READ = $00000030;
STGM_SHARE_DENY_WRITE = $00000020;
STGM_SHARE_EXCLUSIVE = $00000010;
STGM_PRIORITY = $00040000;
STGM_DELETEONRELEASE = $04000000;
STGM_NOSCRATCH = $00100000; {WINNT+}
STGM_CREATE = $00001000;
STGM_CONVERT = $00020000;
STGM_FAILIFTHERE = $00000000;
STGM_NOSNAPSHOT = $00200000;
STGM_DIRECT_SWMR = $00400000; { Win2000+}
// flags for internet asyncronous and layout docfile
ASYNC_MODE_COMPATIBILITY = $00000001;
ASYNC_MODE_DEFAULT = $00000000;
STGTY_REPEAT = $00000100;
STG_TOEND = $FFFFFFFF;
STG_LAYOUT_SEQUENTIAL = $00000000;
STG_LAYOUT_INTERLEAVED = $00000001;
STGFMT_STORAGE = 0;
STGFMT_NATIVE = 1;
STGFMT_FILE = 3;
STGFMT_ANY = 4;
STGFMT_DOCFILE = 5;
// This is a legacy define to allow old component to builds
STGFMT_DOCUMENT = 0;
// COM initialization flags; passed to CoInitialize.
COINIT_APARTMENTTHREADED = $2; // Apartment model
// These constants are only valid on Windows NT 4.0
COINIT_MULTITHREADED = $0; // OLE calls objects on any thread.
COINIT_DISABLE_OLE1DDE = $4; // Don't use DDE for Ole1 support.
COINIT_SPEED_OVER_MEMORY = $8; // Trade memory for speed.
SMEXF_SERVER = $01; // server side aggregated std marshaler
SMEXF_HANDLER = $02; // client side (handler) agg std marshaler
COWAIT_WAITALL = 1;
COWAIT_ALERTABLE = 2;
DOCMISC_CANCREATEMULTIPLEVIEWS = 1;
DOCMISC_SUPPORTCOMPLEXRECTANGLES = 2;
DOCMISC_CANTOPENEDIT = 4; // fails the IOleDocumentView::Open method
DOCMISC_NOFILESUPPORT = 8; // does not support read/writing to a file
PID_DICTIONARY = PROPID($00000000);
PID_CODEPAGE = PROPID($00000001);
PID_FIRST_USABLE = PROPID($00000002);
PID_FIRST_NAME_DEFAULT = PROPID($00000fff);
PID_LOCALE = PROPID($80000000);
PID_MODIFY_TIME = PROPID($80000001);
PID_SECURITY = PROPID($80000002);
PID_BEHAVIOR = PROPID($80000003);
PID_ILLEGAL = PROPID($ffffffff);
PID_MIN_READONLY = PROPID($80000000);
PID_MAX_READONLY = PROPID($bfffffff);
PIDDI_THUMBNAIL = DWORD($00000002);// VT_BLOB
PIDSI_TITLE = DWORD($00000002); // VT_LPSTR
PIDSI_SUBJECT = DWORD($00000003); // VT_LPSTR
PIDSI_AUTHOR = DWORD($00000004); // VT_LPSTR
PIDSI_KEYWORDS = DWORD($00000005); // VT_LPSTR
PIDSI_COMMENTS = DWORD($00000006); // VT_LPSTR
PIDSI_TEMPLATE = DWORD($00000007); // VT_LPSTR
PIDSI_LASTAUTHOR = DWORD($00000008); // VT_LPSTR
PIDSI_REVNUMBER = DWORD($00000009); // VT_LPSTR
PIDSI_EDITTIME = DWORD($0000000a); // VT_FILETIME
PIDSI_LASTPRINTED = DWORD($0000000b); // VT_FILETIME
PIDSI_CREATE_DTM = DWORD($0000000c); // VT_FILETIME
PIDSI_LASTSAVE_DTM = DWORD($0000000d); // VT_FILETIME
PIDSI_PAGECOUNT = DWORD($0000000e); // VT_I4
PIDSI_WORDCOUNT = DWORD($0000000f); // VT_I4
PIDSI_CHARCOUNT = DWORD($00000010); // VT_I4
PIDSI_THUMBNAIL = DWORD($00000011); // VT_CF
PIDSI_APPNAME = DWORD($00000012); // VT_LPSTR
PIDSI_DOC_SECURITY = DWORD($00000013); // VT_I4
PIDDSI_CATEGORY = $00000002; // VT_LPSTR
PIDDSI_PRESFORMAT = $00000003; // VT_LPSTR
PIDDSI_BYTECOUNT = $00000004; // VT_I4
PIDDSI_LINECOUNT = $00000005; // VT_I4
PIDDSI_PARCOUNT = $00000006; // VT_I4
PIDDSI_SLIDECOUNT = $00000007; // VT_I4
PIDDSI_NOTECOUNT = $00000008; // VT_I4
PIDDSI_HIDDENCOUNT = $00000009; // VT_I4
PIDDSI_MMCLIPCOUNT = $0000000A; // VT_I4
PIDDSI_SCALE = $0000000B; // VT_BOOL
PIDDSI_HEADINGPAIR = $0000000C; // VT_VARIANT |VT_VECTOR
PIDDSI_DOCPARTS = $0000000D; // VT_LPSTR |VT_VECTOR
PIDDSI_MANAGER = $0000000E; // VT_LPSTR
PIDDSI_COMPANY = $0000000F; // VT_LPSTR
PIDDSI_LINKSDIRTY = $00000010; // VT_BOOL
// FMTID_MediaFileSummaryInfo - Property IDs
PIDMSI_EDITOR = DWord($00000002); // VT_LPWSTR
PIDMSI_SUPPLIER = DWord($00000003); // VT_LPWSTR
PIDMSI_SOURCE = DWord($00000004); // VT_LPWSTR
PIDMSI_SEQUENCE_NO = DWord($00000005); // VT_LPWSTR
PIDMSI_PROJECT = DWord($00000006); // VT_LPWSTR
PIDMSI_STATUS = DWord($00000007); // VT_UI4
PIDMSI_OWNER = DWord($00000008); // VT_LPWSTR
PIDMSI_RATING = DWord($00000009); // VT_LPWSTR
PIDMSI_PRODUCTION = DWord($0000000A); // VT_FILETIME (UTC)
PIDMSI_COPYRIGHT = DWord($0000000B); // VT_LPWSTR
PRSPEC_INVALID = ULONG($ffffffff);
PRSPEC_LPWSTR = ULONG(0);
PRSPEC_PROPID = ULONG(1);
PROPSETFLAG_DEFAULT = DWORD(0);
PROPSETFLAG_NONSIMPLE = DWORD(1);
PROPSETFLAG_ANSI = DWORD(2);
TYPE
VARTYPE = USHORT;
//TypeInfo stuff.
DISPID = Long ;
SCODE = Long;
pSCODE = ^SCODE;
lpDISPID = ^DISPID;
MEMBERID = DispId;
HREFTYPE = DWord;
TResultList = array[0..high(integer) div 4-50] of HResult;
PResultList = ^TResultList;
PSYSINT = ^SYSINT;
SYSINT = LongInt;
PSYSUINT = ^SYSUINT;
SYSUINT = LongWord;
// Enums
VARKIND = DWord;
DESCKIND = DWord;
SYSKIND = DWord;
TSYSKIND = SYSKIND;
REGKIND = DWord;
TREGKIND = REGKIND;
FUNCKIND = DWord;
CHANGEKIND = DWord;
CALLCONV = DWord;
PIDMSI_STATUS_VALUE = (
PIDMSI_STATUS_NORMAL = 0,
PIDMSI_STATUS_NEW,
PIDMSI_STATUS_PRELIM,
PIDMSI_STATUS_DRAFT,
PIDMSI_STATUS_INPROGRESS,
PIDMSI_STATUS_EDIT,
PIDMSI_STATUS_REVIEW,
PIDMSI_STATUS_PROOF,
PIDMSI_STATUS_FINAL,
PIDMSI_STATUS_OTHER = $7FFF
);
TPIDMSI_STATUS_VALUE= PIDMSI_STATUS_Value;
PCOAUTHIDENTITY = ^TCOAUTHIDENTITY;
_COAUTHIDENTITY = Record
User : PUSHORT;
UserLength : ULONG;
Domain : PUSHORT;
DomainLength : ULong;
Password : PUSHORT;
PassWordLength : ULong;
Flags : ULong;
End;
COAUTHIDENTITY = _COAUTHIDENTITY;
TCOAUTHIDENTITY = _COAUTHIDENTITY;
PCOAUTHINFO = ^TCOAUTHINFO;
COAuthInfo = Record
AuthnSvc : DWord;
AuthzSvc : DWord;
ServerPrincName : LPWSTR;
AuthnLevel : DWord;
ImpersonationLevel : DWord;
AuthIdentityData : PCOAUTHIDENTITY;
Capabilities : DWord;
END;
TCOAUTHINFO = COAUTHINFO;
PCOSERVERINFO = ^TCOSERVERINFO;
_COSERVERINFO = Record
dwReserved1 : DWord;
pwszName : LPWSTR;
pAuthInfo : PCoAuthInfo;
dwReserved2 : DWord;
end;
TCOSERVERINFO = _COSERVERINFO;
PMultiQI = ^Multi_QI;
tagMULTI_QI = Record
iid: piid; // pass this one in
itf: IUnknown; // get these out (you must set to NULL before calling)
hr : HResult;
END;
MULTI_QI = TagMULTI_QI;
PMulti_QI = PMultiQI;
TMultiQI = tagMULTI_QI;
PMultiQIArray = ^TMultiQIArray;
TMultiQIArray = array[0..65535] of TMultiQI;
HContext = Pointer;
ApartmentID = DWord;
//****** Critical Section Wrappers ***********************************
// LCID = WORD;
// LANGID = USHORT;
// #######################################################################
//
// User marshal support for Windows data types.
//
// Frequently used helpers: sized blobs
//
// Never put [user_marshal] or [wire_marshal] on the helpers directly.
//
// Flagged blobs.
_FLAGGED_BYTE_BLOB = Record
fFlags : ULong;
clSize : ULong;
abdata : array[0..0] of byte;
End;
FLAGGED_BYTE_BLOB = _FLAGGED_BYTE_BLOB;
UP_FLAGGED_BYTE_BLOB = ^FLAGGED_BYTE_BLOB;
_FLAGGED_WORD_BLOB = Record
fFlags : ULong;
clSize : ULong;
abdata : array[0..0] of USHORT;
End;
FLAGGED_WORD_BLOB = _FLAGGED_WORD_BLOB;
UP_FLAGGED_WORD_BLOB = ^FLAGGED_WORD_BLOB;
_FLAGGED_DWORD_BLOB = Record
fFlags : ULong;
clSize : ULong;
abdata : array[0..0] of ULONG;
End;
FLAGGED_DWORD_BLOB = _FLAGGED_DWORD_BLOB;
FLAGGED_UP_DWORD_BLOB = ^FLAGGED_DWORD_BLOB;
// Simple blobs.
_BYTE_BLOB = Record
clSize : ULong;
abdata : array[0..0] of byte;
End;
BYTE_BLOB = _BYTE_BLOB;
UP_BYTE_BLOB = ^BYTE_BLOB;
_WORD_BLOB = Record
clSize : ULong;
abdata : array[0..0] of USHORT;
End;
WORD_BLOB = _WORD_BLOB;
UP_WORD_BLOB = ^WORD_BLOB;
_DWORD_BLOB = Record
clSize : ULong;
abdata : array[0..0] of ULONG;
End;
DWORD_BLOB = _DWORD_BLOB;
UP_DWORD_BLOB = ^DWORD_BLOB;
// Frequently used helpers with sized pointers.
_BYTE_SIZEDARR = Record
clsize : ULong;
Data : PByte;
End;
BYTE_SIZEDARR = _BYTE_SIZEDARR;
_SHORT_SIZEDARR = Record
clsize : ULong;
Data : PSHORT;
End;
SHORT_SIZEDARR = _SHORT_SIZEDARR;
_LONG_SIZEDARR = Record
clsize : ULong;
Data : PLONG;
End;
LONG_SIZEDARR = _LONG_SIZEDARR;
HYPER = LONGLONG;
PHYPER = ^HYPER;
_HYPER_SIZEDARR = Record
clsize : ULong;
Data : PHYPER;
End;
HYPER_SIZEDARR = _HYPER_SIZEDARR;
// #########################################################################
//
// CLIPFORMAT
//
userCLIPFORMAT = Record
FContext : Long;
CASE INTEGER OF
0 : (dwvalue : DWORD);
1 : (szName : poleStr);
End;
wireCLIPFORMAT = ^userCLIPFORMAT;
// #########################################################################
//
// Good for most of the gdi handles.
_GDI_NONREMOTE = Record
FContext : Long;
Case Integer Of
0 : (HInProc : Long);
1 : (HRemote : DWORD_BLOB);
END;
GDI_NONREMOTE = _GDI_NONREMOTE;
// #########################################################################
//
// HGLOBAL
//
// A global may be Null or may be non-NULL with 0 length.
_userHGLOBAL = Record
FContext : Long;
CASE Integer OF
0 : (hInproc : Long);
1 : (hRemote : UP_FLAGGED_BYTE_BLOB);
2 : (hInproc64: int64);
End;
userHGlobal = _userHGLOBAL;
wireHGLOBAL = ^userHGLOBAL;
// #########################################################################
//
// HMETAFILE
//
_userHMETAFILE = Record
fContext : Long;
Case Integer OF
0 : (hInproc : Long);
1 : (hRemote : up_byte_blob);
2 : (hInProc64 : Int64);
End;
userHMETAFILE = _userHMETAFILE;
puserHMETAFILE = ^userHMETAFILE;
// #########################################################################
//
// HMETAFILEPICT
//
_remoteMETAFILEPICT = Record
mm : Long;
xExt : Long;
yExt : Long;
mgf : puserHMETAFILE;
End;
remoteMETAFILEPICT = _remoteMETAFILEPICT;
premoteMETAFILEPICT = ^remoteMETAFILEPICT;
_userHMETAFILEPICT = Record
fContext : Long;
Case Integer OF
0 : (hInproc : Long);
1 : (hRemote : premoteMETAFILEPICT);
2 : (hInProc64 : Int64);
End;
userHMETAFILEPICT = _userHMETAFILEPICT;
// #########################################################################
//
// HENHMETAFILE
//
_userHENHMETAFILE = Record
fContext : Long;
Case Integer OF
0 : (hInproc : Long);
1 : (hRemote : up_byte_blob);
2 : (hInProc64 : Int64);
End;
userHENHMETAFILE = _userHENHMETAFILE;
puserHENHMETAFILE = ^userHENHMETAFILE;
// #########################################################################
//
// HBITMAP
//
// RemHBITMAP was just a byte blob, but the whole bitmap structure was copied
// at the beginning of the buffer.
// So, we take BITMAP fields from wingdi.x
_userBITMAP = Record
bmType,
bmWidth,
bmHeight,
bmWidthBytes : Long;
bmPlanes,
bmBitsPixel : Word;
cvsize : ULONG;
buffer : pbyte;
End;
userBITMAP = _userBITMAP;
puserBITMAP = ^userBITMAP;
_userHBITMAP = Record
fContext : Long;
Case Integer OF
0 : (hInproc : Long);
1 : (hRemote : puserBITMAP);
2 : (hInProc64 : Int64);
End;
userHBITMAP = _userHBITMAP;
puserHBITMAP = ^userHBITMAP;
// #########################################################################
//
// HPALETTE
//
// PALETTEENTRY is in wingdi.x, it is a struct with 4 bytes.
// LOGPALETTE is in wingdi.x, it is a conf struct with paletteentries and
// a version field
_userHpalette = Record
fContext : Long;
Case Integer OF
0 : (hInproc : Long);
1 : (hRemote : logpalette);
2 : (hInProc64 : Int64);
End;
userHpalette = _userHpalette;
puserHpalette = ^userHpalette;
// #########################################################################
//
// Handles passed locally as longs.
//
_RemotableHandle = Record
fContext : Long;
Case Integer OF
0 : (hInproc : Long);
1 : (hRemote : Long);
End;
RemotableHandle = _RemotableHandle;
wireHWND = ^RemotableHandle;
wireHMENU = ^RemotableHandle;
wireHACCEL = ^RemotableHandle;
wireHBRUSH = ^RemotableHandle;
wireHFONT = ^RemotableHandle;
wireHDC = ^RemotableHandle;
wireHICON = ^RemotableHandle;
HCursor = HICON;
tagTEXTMETRICW = Record
tmHeight,
tmAscent,
tmDescent,
tmInternalLeading,
tmExternalLeading,
tmAveCharWidth,
tmMaxCharWidth,
tmWeight,
tmOverhang,
tmDigitizedAspectX,
tmDigitizedAspectY : Long;
tmFirstChar,
tmLastChar,
tmDefaultChar,
tmBreakChar : WCHAR;
tmItalic,
tmUnderlined,
tmStruckOut,
tmPitchAndFamily,
tmCharSet : BYTE;
End;
TEXTMETRICW = tagTEXTMETRICW;
PTEXTMETRICW = ^TEXTMETRICW;
LPTEXTMETRICW = PTEXTMETRICW;
wireHBITMAP = ^userHBITMAP;
wireHPALETTE = ^userHPALETTE;
wireHENHMETAFILE = ^userHENHMETAFILE;
wireHMETAFILE = ^userHMETAFILE;
wireHMETAFILEPICT = ^userHMETAFILEPICT;
HMetaFilePict = Pointer;
HLOCAL = HGLOBAL;
// Date = Double;
{****************************************************************************
* Binding Interfaces
****************************************************************************}
tagBIND_OPTS = Record
cvStruct, // sizeof(BIND_OPTS)
grfFlags,
grfMode,
dwTickCountDeadline : DWord;
End;
TBind_Opts = tagBIND_OPTS;
PBind_Opts = ^TBind_Opts;
TBindOpts = tagBIND_OPTS;
PBindOpts = ^TBindOpts;
Bind_Opts = tagBind_opts;
tagBIND_OPTS2_CPP = Record
dwTrackFlags,
dwClassContext : Dword;
Locale : LCID;
ServerInfo : pCoServerInfo;
End;
TBind_Opts2_CPP = tagBIND_OPTS2_CPP;
PBind_Opts2_CPP = ^TBind_Opts2_CPP;
tagBind_OPTS2 = Record
cvStruct, // sizeof(BIND_OPTS)
grfFlags,
grfMode,
dwTickCountDeadline : DWord;
dwTrackFlags,
dwClassContext : DWord;
Locale : LCID;
ServerInfo : pCoServerInfo;
End;
TBind_Opts2 = tagBIND_OPTS2;
PBind_Opts2 = ^TBind_Opts2;
// ****************************************************************************
// * Structured Storage Interfaces
// ****************************************************************************
tagSTATSTG = types.tagSTATSTG;
TStatStg = tagSTATSTG;
PStatStg = types.PStatStg;
STATSTG = TStatStg;
{ TagRemSNB = Record
ulCntStr : ULong;
ulCntChar : ULong;
[size_is(ulCntChar)] OLECHAR rgString[];
End;
RemSNB=TagRemSNB
WireSNB=^RemSNB}
SNB = ^PoleStr;
tagDVTARGETDEVICE = Record
tdSize : DWord;
tdDriverNameOffset,
tdDeviceNameOffset,
tdPortNameOffset,
tdExtDevmodeOffset : Word;
Data : Record End;
End;
DVTARGETDEVICE = TagDVTARGETDEVICE;
PDVTARGETDEVICE = ^tagDVTARGETDEVICE;
LPCLIPFORMAT = ^TCLIPFORMAT;
TCLIPFORMAT = Word;
CLIPFORMAT = TCLIPFORMAT;
PClipFormat = LPCLIPFORMAT;
tagFORMATETC = Record
CfFormat : Word {TCLIPFORMAT};
Ptd : PDVTARGETDEVICE;
dwAspect : DWORD;
lindex : Long;
tymed : DWORD;
End;
FORMATETC = TagFORMATETC;
TFORMATETC = FORMATETC;
LPFORMATETC = ^FORMATETC;
PFormatEtc = LPFORMATETC;
// Stats for data; used by several enumerations and by at least one
// implementation of IDataAdviseHolder; if a field is not used, it
// will be NULL.
tagRemSTGMEDIUM = Record
tymed : DWord;
dwHandleType : DWord;
pData,
pUnkForRelease,
cbData : ULong;
Data : Record end;
End;
RemSTGMEDIUM = TagRemSTGMedium;
TagSTGMEDIUM = Record
Tymed : DWord;
Case Integer Of
0 : (HBITMAP : hBitmap; PUnkForRelease : Pointer {IUnknown});
1 : (HMETAFILEPICT : hMetaFilePict );
2 : (HENHMETAFILE : hEnhMetaFile );
3 : (HGLOBAL : hGlobal );
4 : (lpszFileName : LPOLESTR );
5 : (pstm : Pointer{IStream} );
6 : (pstg : Pointer{IStorage} );
End;
USTGMEDIUM = TagSTGMEDIUM;
STGMEDIUM = USTGMEDIUM;
TStgMedium = TagSTGMEDIUM;
PStgMedium = ^TStgMedium;
//
// wireSTGMEDIUM
//
// These flags are #defined (not enumerated) in wingdi.
// We need to repeat #defines to avoid conflict in the generated file.
//
_GDI_OBJECT = Record
ObjectType : DWord;
Case Integer Of
0 : (HBitmap : WireHBITMAP);
1 : (hPalette: wireHPALETTE);
2 : (hGeneric: wireHGLOBAL);
END;
GDI_OBJECT = _GDI_OBJECT;
_userSTGMEDIUM = Record
tymed : DWORD;
Case Integer OF
0 : (hMetaFilePict : wireHMETAFILEPICT;punkforrelease:Pointer {IUnknown});
1 : (hHEnhMetaFile : wireHENHMETAFILE);
2 : (hGdiHandle : ^GDI_OBJECT);
3 : (HGlobal : wireHGLOBAL);
4 : (lpszFileName : LPOLESTR);
5 : (pstm : ^BYTE_BLOB);
6 : (pstg : ^BYTE_BLOB);
END;
userSTGMEDIUM = _userSTGMEDIUM;
LPSTGMEDIUM = ^STGMEDIUM;
_userFLAG_STGMEDIUM = Record
ContextFlags,
fPassOwnership : Long;
stgmed : userSTGMEDIUM;
End;
userFLAG_STGMEDIUM = _userFLAG_STGMEDIUM;
wireFLAG_STGMEDIUM = ^userFLAG_STGMEDIUM;
_FLAG_STGMEDIUM = Record
ContextFlags,
fPassOwnership : Long;
Stgmed : STGMEDIUM;
End;
FLAG_STGMEDIUM = _FLAG_STGMEDIUM;
VARIANTARG = VARIANT;
LPVARIANT = ^VARIANT;
LPVARIANTARG = ^VARIANT;
// parameter description
tagPARAMDESCEX = Record
cBytes : ULong; // size of this structure
varDefaultValue: VariantARG; // default value of this parameter
End;
PARAMDESCEX = tagPARAMDESCEX;
LPPARAMDESCEX = ^PARAMDESCEX;
tagPARAMDESC = Record
pparamdescex: LPPARAMDESCEX ; // valid if PARAMFLAG_FHASDEFAULT bit is set
wParamFlags : UShort ; // IN, OUT, etc
End;
PARAMDESC = tagPARAMDESC;
LPPARAMDESC = ^PARAMDESC;
tagSAFEARRAYBOUND = Record
cElements : ULong;
lLbound : Long;
End;
SAFEARRAYBOUND = tagSAFEARRAYBOUND;
LPSAFEARRAYBOUND = ^SAFEARRAYBOUND;
tagSAFEARRAY = record
cDims: USHORT;
fFeatures: USHORT;
cbElements: ULONG;
cLocks: ULONG;
pvData: PVOID;
rgsabound: array[0..0] of SAFEARRAYBOUND;
end;
TSafeArray = tagSAFEARRAY;
SAFEARRAY = TSafeArray;
PSafeArray = ^TSafeArray;
// additional interface information about the incoming call
tagINTERFACEINFO = Record
Unk : Pointer {IUnknown}; // the pointer to the object
IID : Tiid; // interface id
wMethod : WORD; // interface method
End;
INTERFACEINFO = tagINTERFACEINFO;
LPINTERFACEINFO = ^INTERFACEINFO;
RPCOLEDATAREP = ULong;
tagRPCOLEMESSAGE = Record
Reserved1 : Pointer;
DataRepresentation : RPCOLEDATAREP;
Buffer : Pointer;
cbBuffer,
IMethod : ULong;
Reserved2 : Array[0..4] Of Pointer;
rpcFlags : ULong;
End;
RPCOLEMESSAGE = tagRPCOLEMESSAGE;
PRPCOLEMESSAGE = ^RPCOLEMESSAGE;
tagStorageLayout = Record
LayoutType : Dword;
pwcsElementName : POleStr;
cOffset,
cBytes : Large_Integer;
End;
StorageLayout = tagStorageLayout;
tagSTATDATA = Record
// field used by:
FORMATETC : Tformatetc; // EnumAdvise, EnumData (cache), EnumFormats
advf : DWord; // EnumAdvise, EnumData (cache)
padvSink : Pointer {IAdviseSink}; // EnumAdvise
dwConnection: DWord; // EnumAdvise
End;
STATDATA = TagStatData;
LPStatData = ^StatData;
pARRAYDESC = ^ARRAYDESC;
pTYPEDESC = ^TYPEDESC;
tagTYPEKIND = Dword;
TYPEKIND = tagTYPEKIND;
TTYPEKIND = TYPEKIND;
INVOKEKIND = Dword;
tagTYPEDESC = Record
Case Integer OF
VT_PTR,
VT_SAFEARRAY : (lptdesc : PTYPEDESC;vt : VARTYPE);
VT_CARRAY : (lpadesc : PARRAYDESC);
VT_USERDEFINED : (hreftype : HREFTYPE);
End;
TYPEDESC = tagTYPEDESC;
tagARRAYDESC = Record
tdescElem : TYPEDESC; // element type
cDims : USHORT;
rgbounds : ARRAY [0..0] OF SAFEARRAYBOUND; // dimension count
End;
ARRAYDESC = tagARRAYDESC;
tagIDLDESC = Record
dwReserved : pULONG;
wIDLFlags : USHORT; // IN, OUT, etc
End;
IDLDESC = tagIDLDESC;
LPIDLDESC = ^IDLDESC;
tagELEMDESC = Record
tdesc : TYPEDESC;
case Integer Of
0 : (idldesc : IDLDESC);
1 : (paramdesc : PARAMDESC);
END;
ELEMDESC = tagELEMDESC;
LPELEMDESC = ^ELEMDESC;
tagVARDESC = Record
memId : MEMBERID;
lpstrSchema : pOleStr;
CASE Integer OF
VAR_PERINSTANCE,
VAR_DISPATCH,
VAR_STATIC : (oInst : ULong; // offset of variable within the instance
ElemdescVar : ELEMDESC;
wVarFlags : WORD;
varkind : VARKIND);
VAR_CONST : (lpvarValue : PVARIANT); // the value of the constant
End;
VARDESC = tagVARDESC;
LPVARDESC = ^VARDESC;
pVARDESC = LPVARDESC;
tagDISPPARAMS = Record
rgvarg : lpVARIANTARG;
rgdispidNamedArgs : lpDISPID;
cArgs,
cNamedArgs : UINT;
End;
DISPPARAMS = tagDISPPARAMS;
TDispParams = tagDISPPARAMS;
PDispParams = ^TDispParams;
PExcepInfo = ^TExcepInfo;
TFNDeferredFillIn = function(info : PExcepInfo): HRESULT;stdcall;
tagEXCEPINFO = Record
wCode, // An error code describing the error.
wReserved : Word;
Source, // A source of the exception
Description, // A description of the error
HelpFile : WideString; // Fully qualified drive, path, and file name
dwHelpContext : ULONG; // help context of topic within the help file
// We can use ULONG_PTR here, because EXCEPINFO is marshalled by RPC
// RPC will marshal pfnDeferredFillIn.
pvReserved : pointer;
pfnDeferredFillIn : TFNDeferredFillIn;
SCODE : scode;
End;
EXCEPINFO = tagEXCEPINFO;
TExcepInfo = tagEXCEPINFO;
tagTYPEATTR = Record
GUID : Tguid; // the GUID of the TypeInfo
LCID : lcid; // locale of member names and doc strings
dwReserved : DWord;
memidConstructor, // ID of constructor, MEMBERID_NIL if none
memidDestructor : MemberID; // ID of destructor, MEMBERID_NIL if none
lpstrSchema : pOleStr;
cbSizeInstance : ULong; // the size of an instance of this type
typekind : TYPEKIND; // the kind of type this typeinfo describes
cFuncs, // number of functions
cVars, // number of variables / data members
cImplTypes, // number of implemented interfaces
cbSizeVft, // the size of this types virtual func table
cbAlignment, { specifies the alignment requirements for
an instance of this type,
0 = align on 64k boundary
1 = byte align
2 = word align
4 = dword align... }
wTypeFlags,
wMajorVerNum, // major version number
wMinorVerNum : Word; // minor version number
tdescAlias : TYPEDESC; { if typekind == TKIND_ALIAS this field
specifies the type for which this type
is an alias }
idldescType : IDLDESC; // IDL attributes of the described type
END;
TYPEATTR = tagTYPEATTR;
LPTYPEATTR = ^TYPEATTR;
PTYPEAttr = LPTYPEATTR;
tagTLIBATTR = Record
GUID : guid;
LCID : lcid;
SYSKIND : syskind;
wMajorVerNum,
wMinorVerNum,
wLibFlags : Word
End;
TLIBATTR = tagTLIBATTR;
LPTLIBATTR = ^tagTLIBATTR;
PTLIBAttr = LPTLIBATTR;
LPFUNCDESC = ^FUNCDESC;
PFUNCDESC = LPFUNCDESC;
tagFUNCDESC = Record
memid : MEMBERID;
lprgscode : PResultList;
lprgelemdescParam : lpELEMDESC; // array of param types
FUNCKIND : funckind;
invkind : INVOKEKIND;
callconv : CALLCONV;
cParams,
cParamsOpt,
oVft,
cScodes : SHORT;
elemdescFunc : ELEMDESC;
wFuncFlags : WORD;
End;
FUNCDESC = tagFUNCDESC;
tagBINDPTR = Record
case integer Of
0 : (lpfuncdesc : LPFUNCDESC);
1 : (lpvardesc : LPVARDESC);
2 : (lptcomp : Pointer {ITypeComp} );
End;
BINDPTR = tagBINDPTR;
LPBINDPTR = ^BINDPTR;
tagCUSTDATAITEM = Record
GUID : TGuid; // guid identifying this custom data item
varValue : VARIANTARG; // value of this custom data item
End;
CUSTDATAITEM = tagCUSTDATAITEM;
LPCUSTDATAITEM = ^CUSTDATAITEM;
tagCUSTDATA = Record
cCustData : DWord; // number of custom data items in rgCustData
prgCustData : LPCUSTDATAITEM; // array of custom data items
End;
CUSTDATA = tagCUSTDATA;
LPCUSTDATA = ^CUSTDATA;
PPROPVARIANT = ^TPROPVARIANT;
tagPROPSPEC = record
ulKind : ULONG ;
case boolean of
false : ( propid:propid);
true : (lpwstr: LPOLEStr);
end;
PROPSPEC= tagPROPSPEC;
TPROPSPEC = PROPSPEC;
PPROPSPEC = ^TPROPSPEC;
tagSTATPROPSTG = record
lpwstrName : LPOLESTR ;
propid:PROPID ;
vt : VARTYPE;
end;
STATPROPSTG = tagSTATPROPSTG;
TSTATPROPSTG = STATPROPSTG;
PSTATPROPSTG = ^TSTATPROPSTG;
tagSTATPROPSETSTG = record
fmtid : FMTID;
clsid : CLSID;
grfFlags : DWORD;
mtime : FILETIME;
ctime : FILETIME;
atime : FILETIME;
dwOSVersion : DWORD;
end;
STATPROPSETSTG = tagSTATPROPSETSTG;
TSTATPROPSETSTG = STATPROPSETSTG;
PSTATPROPSETSTG = ^STATPROPSETSTG;
tagVersionedStream = record
guidVersion : TGUID;
pStream : pointer; {IStream}
end;
VERSIONEDSTREAM = tagVersionedStream;
TVERSIONEDSTREAM = tagVersionedStream;
LPVERSIONEDSTREAM = tagVersionedStream;
PVERSIONEDSTREAM = ^TagVersionedStream;
LPSAFEARRAY = ^SAFEARRAY;
tagDEC = record // simpler remoting variant without nested unions. see wtypes.h
wReserved : ushort;
scale,
sign : byte;
hi32 : ULONG;
lo64 : ULONGLONG;
end;
TDECIMAL=tagDEC;
PDecimal=^TDECIMAL;
tagCAC = record
cElems : ULONG;
pElems : pCHAR;
end;
CAC = tagCAC;
TCAC = tagCAC;
tagCAUB = record
cElems : ULONG;
pElems : pUCHAR;
end;
CAUB = tagCAUB;
TCAUB = tagCAUB;
tagCAI = record
cElems : ULONG;
pElems : pSHORT;
end;
CAI = tagCAI;
TCAI = tagCAI;
tagCAUI = record
cElems : ULONG;
pElems : pUSHORT;
end;
CAUI = tagCAUI;
TCAUI = tagCAUI;
tagCAL = record
cElems : ULONG;
pElems : pLONG;
end;
CAL = tagCAL;
TCAL = tagCAL;
tagCAUL = record
cElems : ULONG;
pElems : pULONG;
end;
CAUL = tagCAUL;
TCAUL = tagCAUL;
tagCAFLT = record
cElems : ULONG;
pElems : pSingle;
end;
CAFLT = tagCAFLT;
TCAFLT = tagCAFLT;
tagCADBL = record
cElems : ULONG;
pElems : ^DOUBLE;
end;
CADBL = tagCADBL;
TCADBL = tagCADBL;
tagCACY = record
cElems : ULONG;
pElems : ^CY;
end;
CACY = tagCACY;
TCACY = tagCACY;
tagCADATE = record
cElems : ULONG;
pElems : ^DATE;
end;
CADATE = tagCADATE;
TCADATE = tagCADATE;
tagCABSTR = record
cElems : ULONG;
pElems : ^BSTR;
end;
CABSTR = tagCABSTR;
TCABSTR = tagCABSTR;
tagCABSTRBLOB = record
cElems : ULONG;
pElems : ^BSTRBLOB;
end;
CABSTRBLOB = tagCABSTRBLOB;
TCABSTRBLOB = tagCABSTRBLOB;
tagCABOOL = record
cElems : ULONG;
pElems : ^VARIANT_BOOL;
end;
CABOOL = tagCABOOL;
TCABOOL = tagCABOOL;
tagCASCODE = record
cElems : ULONG;
pElems : ^SCODE;
end;
CASCODE = tagCASCODE;
TCASCODE = tagCASCODE;
tagCAPROPVARIANT = record
cElems : ULONG;
pElems : ^PROPVARIANT;
end;
CAPROPVARIANT = tagCAPROPVARIANT;
TCAPROPVARIANT = tagCAPROPVARIANT;
tagCAH = record
cElems : ULONG;
pElems : ^LARGE_INTEGER;
end;
CAH = tagCAH;
TCAH = tagCAH;
tagCAUH = record
cElems : ULONG;
pElems : ^ULARGE_INTEGER;
end;
CAUH = tagCAUH;
TCAUH = tagCAUH;
tagCALPSTR = record
cElems : ULONG;
pElems : ^LPSTR;
end;
CALPSTR = tagCALPSTR;
TCALPSTR = tagCALPSTR;
tagCALPWSTR = record
cElems : ULONG;
pElems : ^LPWSTR;
end;
CALPWSTR = tagCALPWSTR;
TCALPWSTR = tagCALPWSTR;
tagCAFILETIME = record
cElems : ULONG;
pElems : ^FILETIME;
end;
CAFILETIME = tagCAFILETIME;
TCAFILETIME = tagCAFILETIME;
tagCACLIPDATA = record
cElems : ULONG;
pElems : ^CLIPDATA;
end;
CACLIPDATA = tagCACLIPDATA;
TCACLIPDATA = tagCACLIPDATA;
tagCACLSID = record
cElems : ULONG;
pElems : ^CLSID;
end;
CACLSID = tagCACLSID;
TCACLSID = tagCACLSID;
PROPVAR_PAD1 = WORD;
PROPVAR_PAD2 = WORD;
PROPVAR_PAD3 = WORD;
// Forward interfaces.
IStream = Types.IStream;
IMoniker = Interface;
IEnumMoniker = Interface;
IEnumString = Interface;
IRunningObjectTable = Interface;
IStorage = Interface;
IEnumSTATSTG = Interface;
IAdviseSink = Interface;
IBindCtx = Interface;
IAsyncManager = Interface;
ICallFactory = Interface;
ISynchronize = Interface;
ITypeLib = Interface;
IPropertyStorage = Interface;
IEnumSTATPROPSETSTG = interface;
TPROPVARIANT = record
vt : VARTYPE;
wReserved1 : PROPVAR_PAD1;
wReserved2 : PROPVAR_PAD2;
wReserved3 : PROPVAR_PAD3;
case longint of
0 : ( cVal : CHAR );
1 : ( bVal : UCHAR );
2 : ( iVal : SHORT );
3 : ( uiVal : USHORT );
4 : ( lVal : LONG );
5 : ( ulVal : ULONG );
6 : ( intVal : longINT );
7 : ( uintVal : UINT );
8 : ( hVal : LARGE_INTEGER );
9 : ( uhVal : ULARGE_INTEGER );
10 : ( fltVal : SINGLE );
11 : ( dblVal : DOUBLE );
12 : ( boolVal : VARIANT_BOOL );
13 : ( bool : _VARIANT_BOOL );
14 : ( scode : SCODE );
15 : ( cyVal : CY );
16 : ( date : DATE );
17 : ( filetime : FILETIME );
18 : ( puuid : ^CLSID );
19 : ( pclipdata : ^CLIPDATA );
20 : ( bstrVal : BSTR );
21 : ( bstrblobVal : BSTRBLOB );
22 : ( blob : BLOB );
23 : ( pszVal : LPSTR );
24 : ( pwszVal : LPWSTR );
25 : ( punkVal : pointer; { IUnknown to avoid Data types which require initialization/finalization can't be used in variant records});
26 : ( pdispVal : pointer; {IDispatch} );
27 : ( pStream : pointer {IStream} );
28 : ( pStorage : pointer{IStorage} );
29 : ( pVersionedStream : LPVERSIONEDSTREAM );
30 : ( parray : LPSAFEARRAY );
31 : ( cac : CAC );
32 : ( caub : CAUB );
33 : ( cai : CAI );
34 : ( caui : CAUI );
35 : ( cal : CAL );
36 : ( caul : CAUL );
37 : ( cah : CAH );
38 : ( cauh : CAUH );
39 : ( caflt : CAFLT );
40 : ( cadbl : CADBL );
41 : ( cabool : CABOOL );
42 : ( cascode : CASCODE );
43 : ( cacy : CACY );
44 : ( cadate : CADATE );
45 : ( cafiletime : CAFILETIME );
46 : ( cauuid : CACLSID );
47 : ( caclipdata : CACLIPDATA );
48 : ( cabstr : CABSTR );
49 : ( cabstrblob : CABSTRBLOB );
50 : ( calpstr : CALPSTR );
51 : ( calpwstr : CALPWSTR );
52 : ( capropvar : CAPROPVARIANT );
53 : ( pcVal : pCHAR );
54 : ( pbVal : pUCHAR );
55 : ( piVal : pSHORT );
56 : ( puiVal : pUSHORT );
57 : ( plVal : pLONG );
58 : ( pulVal : pULONG );
59 : ( pintVal : plongint );
60 : ( puintVal : pUINT );
61 : ( pfltVal : psingle );
62 : ( pdblVal : pDOUBLE );
63 : ( pboolVal : ^VARIANT_BOOL );
64 : ( pdecVal : pDECIMAL );
65 : ( pscode : ^SCODE );
66 : ( pcyVal : ^CY );
67 : ( pdate : ^DATE );
68 : ( pbstrVal : ^TBSTR );
69 : ( ppunkVal : ^IUnknown );
70 : ( ppdispVal : ^IDispatch );
71 : ( pparray : ^LPSAFEARRAY );
72 : ( pvarVal : ^PROPVARIANT );
end;
PROPVARIANT=TPROPVARIANT;
TagPROPVARIANT = TPROPVARIANT;
// Unknwn.idl
// IUnknown is in classesh.inc
AsyncIUnknown = Interface(IUnknown)
['{000e0000-0000-0000-C000-000000000046}']
Function Begin_QueryInterface(Const riid : TIID): HResult; StdCall;
Function Finish_QueryInterface(Out ppvObject : Pointer):HResult;StdCall;
Function Begin_AddRef:HResult;StdCall;
Function Finish_AddRef:ULong;StdCall;
Function Begin_Release:HResult;StdCall;
Function Finish_Release:ULong;StdCall;
End;
IClassFactory = Interface(IUnknown)
['{00000001-0000-0000-C000-000000000046}']
Function CreateInstance(Const unkOuter:IUnknown;Const riid : TIID;Out vObject):HResult; StdCall;
Function LockServer(fLock : Bool):HResult;StdCall;
End;
PLicInfo = ^TLicInfo;
tagLICINFO = record
cbLicInfo : ULONG;
fRuntimeKeyAvail : BOOL;
fLicVerified : BOOL;
end;
TLicInfo = tagLICINFO;
LICINFO = TLicInfo;
IClassFactory2 = interface(IClassFactory)
['{B196B28F-BAB4-101A-B69C-00AA00341D07}']
function GetLicInfo(var licInfo: TLicInfo): HResult; stdcall;
function RequestLicKey(dwResrved: DWORD; out bstrKey: WideString): HResult; stdcall;
function CreateInstanceLic(const unkOuter: IUnknown; const unkReserved: IUnknown;
const iid: TIID; const bstrKey: WideString; out vObject): HResult; stdcall;
end;
// objidl.idl
{****************************************************************************
* Component Object Interfaces
****************************************************************************}
IMarshal = Interface(IUnknown)
['{00000003-0000-0000-C000-000000000046}']
Function GetUnmarshalClass ( Const riid: TIID; pv:Pointer; Const dwDestContext:DWord;
pvDestContext:Pointer; Const mshlflags:DWORD;out LCid : TCLSID ):HResult;Stdcall;
Function GetMarshalSizeMax ( Const Riid: TIID; {in, unique} pv:Pointer; Const dwDestContext : DWord;
{in, unique} pvDestContext:Pointer; Const mshlflags : DWord; out pSize : PDWord ): HResult;Stdcall;
Function MarshalInterface ( Const {in, unique} pStm: IStream; Const riid: TIID; {in, unique} pv:Pointer;
Const dwDestContext:DWord; {in, unique} pvDestContext:Pointer; Const mshlflags:DWord ): HRESULT;Stdcall;
Function UnmarshalInterface ( {[in, unique]} Const pStm:IStream; Const riid: TIID;
out ppv ): HResult;Stdcall;
Function ReleaseMarshalData ( {[in, unique]} Const Strm: IStream ):HResult;Stdcall;
Function DisconnectObject ( Const dwReserved:DWord ):HRESULT;Stdcall;
END;
IMarshal2 = Interface(IMarshal)
['{000001cf-0000-0000-C000-000000000046}']
End;
IMalloc = Interface(IUnknown)
['{00000002-0000-0000-C000-000000000046}']
Function Alloc(cb :size_t):Pointer; Stdcall;
Function Realloc (pv :pointer;cb:size_t):Pointer;stdcall;
Procedure Free({[in]} pv: pointer); Stdcall;
Function GetSize(pv:pointer):size_t;stdcall;
Function DidAlloc(pv:pointer):Longint;stdcall;
procedure HeapMinimize; stdcall;
End;
IMallocSpy = Interface(IUnknown)
['{0000001d-0000-0000-C000-000000000046}']
Function PreAlloc(cbrequest:Size_t):Longint; StdCall;
function PostAlloc(Pactual:Pointer):Pointer;StdCall;
Function PreFree(pRequest:Pointer;fSpyed:bool):pointer;StdCall;
Procedure PostFree(fspyed:Bool);Stdcall;
Function PreRealloc(pRequest:Pointer;cbRequest:Size_t;Out ppNewRequest:Pointer;
fSpyed:Bool):Size_t;Stdcall;
Function PostRealloc(pactual:Pointer;fspyed:Bool):pointer;Stdcall;
Function PreGetSize(pRequest:pointer;fSpyed:Bool):Pointer;StdCall;
Function PostGetSize(cbactual:Size_t;fSpyed:Bool):Size_t;StdCall;
Function PreDidAlloc(pRequest:pointer;fSpyed:Bool):pointer;stdcall;
Function PostDidAlloc(pRequest:pointer;fSpyed:Bool;Factual:Longint):pointer;stdcall;
Procedure PreHeapMinimize;StdCall;
Procedure PostHeapMinimize;StdCall;
End;
IStdMarshalInfo = Interface(IUnknown)
['{00000018-0000-0000-C000-000000000046}']
Function GetClassForHandler (dwDestContext : DWord;pvDestContext:pointer;out Clsid : Pclsid ):HResult;Stdcall;
End;
IExternalConnection = Interface(IUnknown)
['{00000019-0000-0000-C000-000000000046}']
Function AddConnection (ExtConn: DWord; Reserved: DWord):DWord;Stdcall;
Function ReleaseConnection(extconn: DWord; Reserved: Dword;FLastReleaseCloses: Bool):DWord;StdCall;
End;
IMultiQI = Interface(IUnknown)
['{00000020-0000-0000-C000-000000000046}']
//if (__midl >= 500)
// async_uuid(000e0020-0000-0000-C000-000000000046)
//endif
Function QueryMultipleInterfaces(cMQIs:Ulong;pMQIs:pMultiQI):HResult;StdCall;
END;
IInternalUnknown=Interface(IUnknown)
['{00000021-0000-0000-C000-000000000046}']
Function QueryInternalInterface(const riid:TIID;Out ppv:Pointer):HResult;StdCall;
END;
IEnumUnknown = Interface(IUnknown)
['{00000100-0000-0000-C000-000000000046}']
// pointer_default(unique)
Function Next(Celt:Ulong;out rgelt;out pCeltFetched:pulong):HRESULT;StdCall;
// HRESULT RemoteNext( [in] ULONG celt, [out, size_is(celt), length_is( *pceltFetched)] IUnknown **rgelt, [out] ULONG *pceltFetched);
Function Skip(Celt:Ulong):HResult;StdCall;
Function Reset():HResult;
Function Close(Out ppenum: IEnumUnknown):HResult;
END;
IBindCtx = Interface (IUnknown)
['{0000000e-0000-0000-C000-000000000046}']
Function RegisterObjectBound(Const punk:IUnknown):HResult; stdCall;
Function RevokeObjectBound (Const Punk:IUnknown):HResult; stdCall;
Function ReleaseBoundObjects :HResult; StdCall;
Function SetBindOptions(Const bindOpts:TBind_Opts):HResult; stdCall;
// Function RemoteSetBindOptions(Const bind_opts: TBind_Opts2):HResult;StdCall;
Function GetBindOptions(var BindOpts:TBind_Opts):HResult; stdCall;
// Function RemoteGetBindOptions(Var bind_opts: TBind_Opts2):HResult;StdCall;
Function GetRunningObjectTable(Out rot : IRunningObjectTable):Hresult; StdCall;
Function RegisterObjectParam(Const pszkey:LPOleStr;const punk:IUnknown):HResult;
Function GetObjectParam(Const pszkey:LPOleStr; out punk: IUnknown):HResult; StdCall;
Function EnumObjectParam (out enum:IEnumString):Hresult;StdCall;
Function RevokeObjectParam(pszKey:LPOleStr):HResult;StdCall;
End;
IEnumMoniker = Interface (IUnknown)
['{00000102-0000-0000-C000-000000000046}']
Function Next(celt:ULong; out Elt;out celftfetched: ULong):HResult; StdCall;
// Function RemoteNext(Celt:ULong; Out rgelt;out celtfetched :ULong):Hresult; StdCall;
Function Skip(celt:Ulong):HResult; StdCall;
Function Reset:HResult; StdCall;
Function Close(out penum:IEnumMoniker):HResult;StdCall;
End;
IRunnableObject = Interface(IUnknown)
['{00000126-0000-0000-C000-000000000046}']
Function GetRunningClass(Out clsid:Tclsid):Hresult; StdCall;
Function Run(Const pb: IBindCtx):HResult; StdCall;
Function IsRunning:Bool; StdCall;
// Function RemoteIsRunning:Bool; StdCall;
Function LockRunning(FLock,FLastUnlockClose:BOOL):HResult; StdCall;
Function SetContainedObject(fContained:Bool):Hresult;Stdcall;
End;
IRunningObjectTable = Interface (IUnknown)
['{00000010-0000-0000-C000-000000000046}']
Function Register (grfFlags :DWord;const unkobject:IUnknown;Const mkObjectName:IMoniker;Out dwregister:DWord):HResult;StdCall;
Function Revoke (dwRegister:DWord):HResult; StdCall;
Function IsRunning (Const mkObjectName: IMoniker):HResult;StdCall;
Function GetObject (Const mkObjectName: IMoniker; Out punkObject:IUnknown):HResult; StdCall;
Function NoteChangeTime(dwRegister :DWord;Const FileTime: TFileTime):HResult;StdCall;
Function GetTimeOfLastChange(Const mkObjectName:IMoniker;Out filetime:TFileTime):HResult; StdCall;
Function EnumRunning (Out enumMoniker: IEnumMoniker):HResult; StdCall;
End;
IPersist = Interface (IUnknown)
['{0000010c-0000-0000-C000-000000000046}']
Function GetClassId(out clsid:TClsId):HResult; StdCall;
End;
IPersistStream = Interface(IPersist)
['{00000109-0000-0000-C000-000000000046}']
Function IsDirty:HResult; StdCall;
Function Load(Const stm: IStream):HResult; StdCall;
Function Save(Const stm: IStream;fClearDirty:Bool):HResult;StdCall;
Function GetSizeMax(Out cbSize:ULarge_Integer):HResult; StdCall;
End;
PIMoniker = ^IMoniker;
IMoniker = Interface (IPersistStream)
['{0000000f-0000-0000-C000-000000000046}']
Function BindToObject (const pbc:IBindCtx;const mktoleft:IMoniker; const RiidResult:TIID;Out vresult):HResult;StdCall;
// Function RemoteBindToObject (const pbc:IBindCtx;const mktoleft:IMoniker;const RiidResult:TIID;Out vresult):HResult;StdCall;
Function BindToStorage(Const Pbc:IBindCtx;Const mktoLeft:IMoniker; const Riid:TIID;Out vobj):HResult; StdCall;
// Function RemoteBindToStorage(Const Pbc:IBindCtx;Const mktoLeft:IMoniker;const Riid:TIID;Out vobj):HResult; StdCall;
Function Reduce (const pbc:IBindCtx; dwReduceHowFar:DWord; mktoLeft: PIMoniker; Out mkReduced:IMoniker):HResult; StdCall;
Function ComposeWith(Const MkRight:IMoniker;fOnlyIfNotGeneric:BOOL; OUT mkComposite:IMoniker):HResult; StdCall;
Function Enum(fForward:Bool;Out enumMoniker:IEnumMoniker):HResult;StdCall;
Function IsEqual(Const mkOtherMoniker:IMoniker):HResult;StdCall;
Function Hash (Out dwHash:Dword):HResult;StdCall;
Function IsRunning(Const bc:IBindCtx;Const MkToLeft:IMoniker;Const mknewlyRunning:IMoniker):HResult;StdCall;
Function GetTimeOfLastChange(Const bc:IBindCtx;Const mkToLeft:IMoniker; out ft : FileTime):HResult; StdCall;
Function Inverse(out mk : IMoniker):HResult; StdCall;
Function CommonPrefixWith (Const mkOther:IMoniker):HResult; StdCall;
Function RelativePathTo(Const mkother:IMoniker; Out mkRelPath : IMoniker):HResult;StdCall;
Function GetDisplayName(Const bc:IBindCtx;const mktoleft:IMoniker;Out szDisplayName: pOleStr):HResult; StdCall;
Function ParseDisplayName(Const bc:IBindCtx;Const mkToLeft:IMoniker;szDisplayName:POleStr;out cheaten:ULong;out mkOut:IMoniker):HResult; StdCall;
Function IsSystemMoniker(Out dwMkSys:DWord):HResult;StdCall;
End;
IROTData = Interface (IUnknown)
['{f29f6bc0-5021-11ce-aa15-00006901293f}']
Function GetComparisonData(out data; cbMax:ULong;out cbData:ULong):HResult;StdCall;
End;
IEnumString = Interface (IUnknown)
['{00000101-0000-0000-C000-000000000046}']
Function Next(Celt:ULong;Out xcelt;Out Celtfetched:ULong):HResult; StdCall;
// Function RemoteNext(Celt:ULong; Out celt;Out Celtfetched:ULong):HResult; StdCall;
Function Skip (Celt:ULong):Hresult;StdCall;
Function Reset:HResult;StdCall;
Function Clone(Out penum:IEnumString):HResult;StdCall;
End;
ISequentialStream = Types.ISequentialStream;
(*interface(IUnknown)
['{0c733a30-2a1c-11ce-ade5-00aa0044773d}']
function Read(pv : Pointer;cb : ULONG;pcbRead : PULONG) : HRESULT;stdcall;
function Write(pv : Pointer;cb : ULONG;pcbWritten : PULONG): HRESULT;stdcall;
end;
*)
(* defined above by pulling it in from types IStream = interface(ISequentialStream)
['{0000000C-0000-0000-C000-000000000046}']
function Seek(dlibMove : LargeInt; dwOrigin: Longint;
out libNewPosition : LargeInt): HResult; stdcall;
function SetSize(libNewSize : LargeInt) : HRESULT;stdcall;
function CopyTo(stm: IStream;cb : LargeInt;out cbRead : LargeInt;
out cbWritten: LargeInt) : HRESULT;stdcall;
function Commit(grfCommitFlags : Longint) : HRESULT; stdcall;
function Revert : HRESULT; stdcall;
function LockRegion(libOffset : LargeInt;cb : LargeInt;
dwLockType: Longint) : HRESULT;stdcall;
function UnlockRegion(libOffset: LargeInt;cb: LargeInt;
dwLockType: Longint) : HRESULT;stdcall;
Function Stat(out statstg : TStatStg; grfStatFlag: Longint): HRESULT;stdcall;
function Clone(out stm : IStream) : HRESULT; stdcall;
end;
*)
IEnumSTATSTG = Interface (IUnknown)
['{0000000d-0000-0000-C000-000000000046}']
Function Next (Celt:ULong;Out xcelt;pceltfetched : PUlong):HResult; StdCall;
// Function RemoteNext(Celt:Ulong; Out Celt;pceltfetched : PUlong);
Function Skip(Celt:ULong):HResult; StdCall;
Function Reset:HResult; StdCall;
Function Clone(Out penum:IEnumStatSTG):HResult; StdCall;
End;
IStorage = Interface (IUnknown)
['{0000000b-0000-0000-C000-000000000046}']
Function CreateStream(pwcsname:POleStr;GrfMode,Reserved1,Reserved2 : DWord; Out stm : IStream):HResult; StdCall;
Function OpenStream(pwcsname:POleStr;Reserved1:Pointer;GrfMode,Reserved2 : DWord; Out stm : IStream):HResult; StdCall;
// Function RemouteOpenStream(pwcsname:POleStr;cbReserved1:ULong;reserved1:pbyte;GrfMode,Reserved2 : DWord; Out stm : IStream):HResult; StdCall;
Function CreateStorage(pwcsname:POleStr;GrfMode,Reserved1,Reserved2 : DWord; Out stm : IStorage):HResult; StdCall;
Function OpenStorage(pwcsname:POleStr;Const stgPriority:IStorage;grfmode : DWord;Const SNBExclude :SNB;reserved:DWord;Out stm : IStorage):HResult; StdCall;
Function CopyTo(ciidExclude:DWord; rgiidexclude:piid; const snbexclude:SNB;const pstg : IStorage):HResult;StdCall;
Function MoveElementTo(wcsName:POleStr;Const pstgDest : IStorage;
wcvsNewName:POleStr; GrfFlags:DWord):Hresult; StdCall;
Function Commit(grfCommitFlags:Dword):Hresult; StdCall;
Function Revert:HResult; StdCall;
Function EnumElements(Reserved1 :Dword;Reserved2:Pointer;Reserved3:DWord;Out penum:IEnumStatStg):HResult;StdCall;
Function RemoteEnumElements(Reserved1 :Dword;cbReserved2:ULong;Reserved2:pbyte;reserved3:DWord;Out penum:IEnumStatStg):HResult;StdCall;
Function DestroyElement(wcsName: POleStr):HResult;StdCall;
Function RenameElement(wcsoldName: POleStr;wcsnewName: POleStr):HResult;StdCall;
Function SetElementTimes(wcsName:POleStr; Const pctime,patime,pmtime : FileTime):HResult;StdCall;
Function SetClass(Const ClasId: TClsID):HResult;StdCall;
Function SetStateBits(grfStateBits:DWord;grfMask:DWord):HResult;StdCall;
Function Stat(Out pStatStg:StatStg;grfStatFlag:DWord):HResult;StdCall;
End;
IPersistFile = Interface (IPersist)
['{0000010b-0000-0000-C000-000000000046}']
Function IsDirty:HResult;StdCall;
Function Load(FileName:POleStr;dwMode:DWord):HResult;StdCall;
Function Save(FileName:POleStr;fremember:Bool):HResult;StdCall;
Function SaveCompleted(FileName:POleStr):HResult;StdCall;
Function GetCurFIle(Out FileName:POleStr):HResult;StdCall;
End;
IPersistStorage = Interface (IPersist)
['{0000010a-0000-0000-C000-000000000046}']
Function IsDirty:HResult;StdCall;
Function InitNew(const pstg:IStorage):HResult;StdCall;
Function Load(const pstg:IStorage):HResult;StdCall;
Function Save(const pstg:IStorage;FSameAsLoad:Boolean):HResult;StdCall;
Function SaveCompleted(const pstg:IStorage):HResult;StdCall;
Function HandsOffStorage:HResult;StdCall;
End;
ILockBytes = Interface (IUnknown)
['{0000000a-0000-0000-C000-000000000046}']
Function ReadAt(ulOffset:ULarge_Integer;pv:Pointer;cb:Ulong; Out pcbRead:ULong):HResult; StdCall;
// Function RemoteReadAt(ulOffset:ULarge_Integer;pv:Pointer;cb:Ulong; Out pcbRead:ULong):HResult; StdCall;
Function WriteAt(ulOffset:ULarge_Integer;pv:Pointer;cb:Ulong; Out pcbWritten:ULong):HResult; StdCall;
// Function RemoteWriteAt(ulOffset:ULarge_Integer;pv:Pointer;cb:Ulong; Out pcbWritten:ULong):HResult; StdCall;
Function Flush:HResult;StdCall;
Function SetSize(cb:ULarge_Integer):HResult;StdCall;
Function LockRegion(LibOffSet:ULarge_Integer;cb:ULarge_Integer;dwLockType:DWord):HResult;StdCall;
Function UnlockRegion(LibOffSet:ULarge_Integer;cb:ULarge_Integer;dwLockType:DWord):HResult;StdCall;
Function Stat(Out pstatstg:STATSTG;grfstatFlag:DWord):HResult;StdCall;
End;
IEnumFORMATETC = Interface (IUnknown)
['{00000103-0000-0000-C000-000000000046}']
Function Next(Celt:ULong;Out Rgelt:FormatEtc;pceltFetched:pULong=nil):HResult; StdCall;
// Function RemoteNext(Celt:ULong;Out Rgelt:FormatEtc; pceltFetched:pULong=nil):HResult; StdCall;
Function Skip(Celt:ULong):HResult;StdCall;
Function Reset:HResult;StdCall;
Function Clone(out penum:IEnumFORMATETC):HResult;StdCall;
End;
IEnumSTATDATA = Interface (IUnknown)
['{00000105-0000-0000-C000-000000000046}']
Function Next(Celt:ULong;Out Rgelt:statdata; pceltFetched:pULong=nil):HResult; StdCall;
// Function RemoteNext(Celt:ULong;Out Rgelt:statdata;Out pceltFetched:ULong):HResult; StdCall;
Function Skip(Celt:ULong):HResult;StdCall;
Function Reset:HResult;StdCall;
Function Clone(out penum:IEnumstatdata):HResult;StdCall;
End;
IRootStorage = Interface (IUnknown)
['{00000012-0000-0000-C000-000000000046}']
Function SwitchToFile(pszfile:PoleStr):HResult;StdCall;
End;
IAdviseSink = Interface (IUnknown)
['{0000010f-0000-0000-C000-000000000046}']
{$ifdef midl500} ['{00000150-0000-0000-C000-000000000046}'] {$endif}
Procedure OnDataChange (Const pformatetc : Formatetc;const pstgmed : STGMEDIUM); StdCall;
Procedure OnViewChange (dwAspect : DWord; lindex : Long); StdCall;
Procedure OnRename (Const pmk : IMoniker); StdCall;
Procedure OnSave; StdCall;
Procedure OnClose; StdCall;
End;
IAdviseSink2 = Interface (IAdviseSink)
['{00000125-0000-0000-C000-000000000046}']
Procedure OnLinkSrcChange(Const Pmk: IMoniker); StdCall;
End;
IDataObject = Interface (IUnknown)
['{0000010e-0000-0000-C000-000000000046}']
Function GetData(Const formatetcIn : FORMATETC;Out medium : STGMEDIUM):HRESULT; STDCALL;
Function GetDataHere(CONST pformatetc : FormatETC; Out medium : STGMEDIUM):HRESULT; STDCALL;
Function QueryGetData(const pformatetc : FORMATETC):HRESULT; STDCALL;
Function GetCanonicalFormatEtc(const pformatetcIn : FORMATETC;Out pformatetcOut : FORMATETC):HResult; STDCALl;
Function SetData (Const pformatetc : FORMATETC;const medium:STGMEDIUM;FRelease : BOOL):HRESULT; StdCall;
Function EnumFormatEtc(dwDirection : DWord; OUT enumformatetcpara : IENUMFORMATETC):HRESULT; StdCall;
Function DAdvise(const formatetc : FORMATETC;advf :DWORD; CONST AdvSink : IAdviseSink;OUT dwConnection:DWORD):HRESULT;StdCall;
Function DUnadvise(dwconnection :DWord) :HRESULT;StdCall;
Function EnumDAdvise(Out enumAdvise : IEnumStatData):HResult;StdCall;
End;
IDataAdviseHolder = Interface (IUnknown)
['{00000110-0000-0000-C000-000000000046}']
Function Advise (CONST pdataObject : IDataObject;CONST fetc:FORMATETC;advf : DWORD;Const pAdvise:IAdviseSink;Out DwConnection:DWord):HResult; StdCall;
Function Unadvise (dwConnection:Dword):HResult; StdCall;
Function EnumAdvise(out penumAdvise : IEnumStatData):HResult;StdCall;
Function SendOnDataChange(const pDataObject :IDataObject;DwReserved,advf : DWord):HResult; StdCall;
End;
IMessageFilter = Interface (IUnknown)
['{00000016-0000-0000-C000-000000000046}']
Function HandleInComingCall(dwCallType :DWord;htaskCaller : HTASK; dwTickCount: DWORD;CONST sinterfaceinfo:InterfaceInfo):DWord; StdCall;
Function RetryRejectedCall (htaskCallee:HTASK; dwTickCount : DWord; dwRejectType : Dword):DWord; StdCall;
Function MessagePending (htaskCallee:HTASK; dwTickCount : DWord; dwPendingType : Dword):DWord; StdCall;
End;
//****************************************************************************
//* Object Remoting Interfaces
//****************************************************************************
IRpcChannelBuffer = Interface (IUnknown)
['{D5F56B60-593B-101A-B569-08002B2DBF7A}']
Function GetBuffer (Const pMesasge : RPCOLEMESSAGE;Const riid :TIId):HResult; StdCall;
Function SendReceive(Var pMessage : RPCOLEMESSAGE; Out PStatus : ULong):HResult; StdCall;
Function FreeBuffer(Const pMessage : RPCOLEMESSAGE):HResult; StdCall;
Function GetDestCTX(Out dwDestContext : DWord;Out pvDestContext : Pointer):HResult; StdCall;
Function IsConnected:HResult; StdCall;
End;
IRpcChannelBuffer2 = Interface (IRpcChannelBuffer)
['{594f31d0-7f19-11d0-b194-00a0c90dc8bf}']
Function GetProtocolVersion(Var dwVersion : DWord):HResult; StdCall;
End;
IAsyncRpcChannelBuffer = Interface (IRpcChannelBuffer2)
['{a5029fb6-3c34-11d1-9c99-00c04fb998aa}']
Function Send(Var Msg: RPCOLEMESSAGE;Const pSync : ISynchronize;Out PulStatus : ULong):HResult; StdCall;
Function Receive(Var Msg: RPCOLEMESSAGE;Out PulStatus : ULong):HResult; StdCall;
Function GetDestCTXEx(Out MSG : RPCOLEMESSAGE;Out vDestContext : DWord;Out pvDestContext : Pointer ):HResult;StdCall;
End;
IRpcChannelBuffer3 = Interface (IRpcChannelBuffer2)
['{25B15600-0115-11d0-BF0D-00AA00B8DFD2}']
Function Send(Var msg : RPCOLEMESSAGE;Out ulStatus : ULONG):HResult; StdCall;
Function Receive(Var msg : RPCOLEMESSAGE;ulSize : ULong;Out ulStatus : ULONG):HResult; StdCall;
Function Cancel (Const msg : RPCOLEMESSAGE):HResult; StdCall;
Function GetCallContext(Const msg : RPCOLEMESSAGE; Const riid : TIID; Out pInterface : Pointer):HResult; StdCall;
Function GetDestCTXEx(Const Msg : RPCOLEMESSAGE;Out vDestContext : DWord;Out pvDestContext : Pointer ):HResult;StdCall;
Function GetState(Const Msg : RPCOLEMESSAGE;Out State: DWord):HResult;StdCall;
Function RegisterAsync(Const Msg : RPCOLEMESSAGE;Const asyncmgr : IAsyncManager):HResult;StdCall;
End;
IRpcSyntaxNegotiate = Interface (IUnknown)
['{58a08519-24c8-4935-b482-3fd823333a4f}']
Function NegotiateSyntax ( Var msg : RPCOLEMESSAGE):HResult; StdCall;
End;
IRpcProxyBuffer = Interface (IUnknown)
['{D5F56A34-593B-101A-B569-08002B2DBF7A}']
Function Connect(Const rpcchannelbuffer : IRpcChannelBuffer):HResult; StdCall;
Procedure Disconnect;
End;
IRpcStubBuffer = Interface (IUnknown)
['{D5F56AFC-593B-101A-B569-08002B2DBF7A}']
Function COnnect ( Const UnkServer : IUnknown):HResult; StdCall;
Procedure Disconnect; StdCall;
Function Invoke(Const rpcmsg : RPCOLEMESSAGE;Const RpcChanBuf : IRpcChannelBuffer):HResult; StdCall;
Function IsIIDSupported (Const riid : TIID):Pointer {IRpcStubBuffer}; StdCall;
Function CountRefs :ULong; StdCall;
Function DebugServerQueryInterface(CONST pv : Pointer):HResult; StdCall;
Procedure DebugServerRelease (pv : Pointer); StdCall;
End;
IPSFactoryBuffer = Interface (IUnknown)
['{D5F569D0-593B-101A-B569-08002B2DBF7A}']
Function CreateProxy(Const UnkOuter : IUnknown;const riid : TIID; Out proxy: IRpcProxyBuffer; Out Pv :Pointer):HResult; StdCall;
Function CreateStub (Const riid : TIID; Const UnkServer : IUnknown; Out pstub : IRpcStubBuffer):HResult; StdCall;
End;
{$ifdef NT4_greater_Or_DCOM}
// This interface is only valid on Windows NT 4.0
// This structure contains additional data for hooks. As a backward
// compatability hack, the entire structure is passed in place of the
// RIID parameter on all hook methods. Thus the IID must be the first
// parameter. As a forward compatability hack the second field is the
// current size of the structure.
SChannelHookCallInfo= Record;
IID : iid;
cbSize : Dword;
uCausality : GUID;
dwServerPid,
iMethod : DWord;
pObject : Pointer;
End;
IChannelHook = Interface (IUnknown)
['{1008c4a0-7613-11cf-9af1-0020af6e72f4}']
Procedure ClientGetSize(Const uExtent : TGuid; CONST riid : TIID; Out datasize :ULong); StdCall;
Procedure ClientFillBuffer(Const uExtent : TGuid; CONST riid : TIID; Var datasize :ULong;Buffer :Pointer); StdCall;
Procedure ClientNotify(Const uExtent : TGuid; CONST riid : TIID; datasize :ULong;Buffer :Pointer;hrfault:HResult); StdCall;
Procedure ServerNotify(Const uExtent : TGuid; CONST riid : TIID; datasize :ULong;Buffer :Pointer;DataRep:DWord); StdCall;
Procedure ServerGetSize(Const uExtent : TGuid; CONST riid : TIID;hrFault :HResult; Out datasize :ULong); StdCall;
Procedure ServerFillBuffer(Const uExtent : TGuid; CONST riid : TIID; Var datasize :ULong;Buffer :Pointer;HrFault:HResult); StdCall;
End;
{$Endif}
// Well-known Property Set Format IDs
//FMTID_SummaryInformation = {CONST} FMTID;
//FMTID_DocSummaryInformation = {CONST} FMTID;
//FMTID_UserDefinedProperties = {CONST} FMTID;
//FMTID_DiscardableInformation = {CONST} FMTID;
//FMTID_ImageSummaryInformation = {CONST} FMTID;
//FMTID_AudioSummaryInformation = {CONST} FMTID;
//FMTID_VideoSummaryInformation = {CONST} FMTID;
//FMTID_MediaFileSummaryInformation = {CONST} FMTID;
//****************************************************************************
// * Connection Point Interfaces
// ****************************************************************************/
//#ifdef __INCLUDE_CPIFS
IConnectionPointContainer = Interface;
//interface IConnectionPoint;
//interface IEnumConnections;
IEnumConnectionPoints = Interface;
IEnumConnections = Interface;
IConnectionPoint = Interface (IUnknown)
['{B196B286-BAB4-101A-B69C-00AA00341D07}']
Function GetConnectionInterface(out piid : TIID):HResult;StdCall;
Function GetConnectionPointContainer(CPC : IConnectionPointContainer):HResult;StdCall;
Function Advise(unkSink : IUnknown;Out dwCookie : DWord):HResult;StdCall;
Function UnAdvise(dwCookie : DWord):HResult;StdCall;
Function EnumConnection(out pEnum : IEnumConnections):HResult;stdCall;
End;
IConnectionPointContainer = Interface (IUnknown)
['{B196B284-BAB4-101A-B69C-00AA00341D07}']
Function EnumConnectionPoints(out pEnum : IEnumConnectionPoints):HResult;StdCall;
Function FindConnectionPoint(Const RIID : TIID;Out ppcp : IConnectionPoint):HResult;StdCall;
End;
tagCONNECTDATA = Record
unk : Pointer; {IUnknown}
dwCookie : DWord;
End;
ConnectData = tagCONNECTDATA;
IEnumConnections = Interface (IUnknown)
['{B196B287-BAB4-101A-B69C-00AA00341D07}']
Function Next(cConnections : ULong; Out rgcd : ConnectData; lpcFetched : pULong=nil):HResult;StdCall;
Function Skip(cConnections : ULong):HResult;StdCall;
Function Reset:HResult;StdCall;
Function Clone(Out pEnum : IEnumConnections):HResult; StdCall;
End;
IEnumConnectionPoints = Interface (IUnknown)
['{B196B285-BAB4-101A-B69C-00AA00341D07}']
Function Next(cConnections : ULong; Out rgpcm : IConnectionPoint; lpcFetched : pULong=nil):HResult;StdCall;
Function Skip(cConnections : ULong):HResult;StdCall;
Function Reset:HResult;StdCall;
Function Clone(Out pEnum : IEnumConnectionPoints):HResult;StdCall;
End;
tagSOLE_AUTHENTICATION_SERVICE = Record
dwAuthnSvc,
dwAuthzSvc : DWord;
pPrincipalName : POleStr;
hr : HResult;
End;
SOLE_AUTHENTICATION_SERVICE = tagSOLE_AUTHENTICATION_SERVICE;
PSOLE_AUTHENTICATION_SERVICE = ^SOLE_AUTHENTICATION_SERVICE;
tagSOLE_AUTHENTICATION_INFO = Record
dwAuthnSvc,
dwAuthzSvc : DWord;
AuthInfo : Pointer;
End;
SOLE_AUTHENTICATION_INFO = tagSOLE_AUTHENTICATION_INFO;
PSOLE_AUTHENTICATION_INFO = ^SOLE_AUTHENTICATION_INFO;
tagSOLE_AUTHENTICATION_LIST = Record
cAuthInfo : DWord;
AuthInfo : PSOLE_AUTHENTICATION_INFO;
End;
SOLE_AUTHENTICATION_LIST = tagSOLE_AUTHENTICATION_LIST;
PSOLE_AUTHENTICATION_LIST = ^SOLE_AUTHENTICATION_LIST;
{$ifdef WINNT_DCOM}
IClientSecurity = Interface (IUnknown)
['{0000013D-0000-0000-C000-000000000046}']
Function QueryBlanket (Proxy : IUnknown;Out AuthnSvc,AuthzSvc : Dword;Out ServerPrincName:pOleStr;Out AuthnLevel,ImpLevel:Dword; Out AuthInfo : Pointer; Out Capabilities : Dword):HResult;StdCall;
Function SetBlanket (Proxy : IUnknown;AuthnSvc,AuthzSvc : Dword;ServerPrincName:pOleStr;AuthnLevel,ImpLevel:Dword;AuthInfo : Pointer;Capabilities : Dword):HResult;StdCall;
Function CopyProxy (Proxy : IUnknown;Out pcopy:IUnknown):HResult;StdCall;
End;
IServerSecurity = Interface (IUnknown)
['{0000013E-0000-0000-C000-000000000046}']
Function QueryBlanket ( out authnSvc,AuthzSvc : DWord; Out pServerPrincName : pOleStr; Out AuthnLevel, ImpLevel; :DWord; out Privs : Pointer; Var Capabilities :DWord):HResult;StdCall;
Function ImpersonateClient:HResult;StdCall;
Function RevertToSelf:HResult;StdCall;
Function IsImpersonating:Bool;StdCall;
End;
IClassActivator = Interface (IUnknown)
['{00000140-0000-0000-C000-000000000046}']
Function GetClassObject(Const rclsif : TClsID; ClassContext : DWord; locale : LCID; Const ridd : TIID; Out pv : Pointer):HResult;StdCall;
End;
IRpcOptions = Interface (IUnknown)
['{00000144-0000-0000-C000-000000000046}']
Function xSet (prx : IUnknown;dwProperty : DWord; dwValue:ULONG_PTR):HResult; StdCall;
Function Query (prx : IUnknown;dwProperty:Dword; dwValue:ULONG_PTR):HResult; StdCall;
End;
{$endif} {DCOM}
IFillLockBytes = Interface (IUnknown)
['{99caf010-415e-11cf-8814-00aa00b569f5}']
Function FillAppend(const pv : Pointer;cb:ULong; Out PcbWritten : ULong):HResult;StdCall;
Function FillAt(ulOffset : ULarge_INTEGER;Const pv : Pointer;cb :ULong; Out pcbWritten:ULong):HResult;StdCall;
Function SetFillSize ( ulSize :ULarge_Integer):HResult;StdCall;
Function Terminate (bCanceled :Bool):HResult;StdCall;
End;
IProgressNotify = Interface (IUnknown)
['{a9d758a0-4617-11cf-95fc-00aa00680db4}']
Function OnProgress (ProgressCurrent,ProgressMaximum :Dword; FAccurate,Fowner : Bool):HResult;StdCall;
End;
ILayoutStorage = Interface (IUnknown)
['{0e6d4d90-6738-11cf-9608-00aa00680db4}']
{The methods in this interface all had "__stdcall" as modifier, while the other classes don't. ?!?!?}
Function LayoutScript ( xStorageLayout : StorageLayout;nEntries,glfInterleaveFlag : Dword) :HResult; StdCall;
Function BeginMonitor:HResult;StdCall;
Function EndMonitor:HResult;StdCall;
Function ReLayourDocFile(pwcsNewDFName :pOleStr):HResult;StdCall;
Function ReLayoutDocfileOnILockBytes(LockBytes : ILockBytes):Hresult;StdCall;
End;
IBlockingLock = Interface (IUnknown)
['{30f3d47a-6447-11d1-8e3c-00c04fb9386d}']
Function Lock (dwTimeOut : DWord) : HResult;Stdcall;
Function Unlock : HResult;Stdcall;
End;
ITimeAndNoticeControl = Interface (IUnknown)
['{bc0bf6ae-8878-11d1-83e9-00c04fc2c6d4}']
Function SuppressChanges(res1,res2 : Dword):HResult;StdCall;
End;
IOplockStorage = Interface (IUnknown)
['{8d19c834-8879-11d1-83e9-00c04fc2c6d4}']
Function CreateStorageEx(wcsName : LPCWSTR;grfMode,StgFmt,GrfAtrrs :Dword;Const riid :Tiid; Out ppstgOpen : Pointer):HResult;StdCall;
Function OpenStorageEx(wcsName : LPCWSTR;grfMode,StgFmt,GrfAtrrs :Dword;Const riid :Tiid; Out ppstgOpen : Pointer):HResult;StdCall;
End;
ISurrogate = Interface (IUnknown)
['{00000022-0000-0000-C000-000000000046}']
Function LoadDllServer (Const ClsId : TClsId):HResult;StdCall;
Function FreeSurrogate:HResult;StdCall;
End;
IGlobalInterfaceTable = Interface (IUnknown)
['{00000146-0000-0000-C000-000000000046}']
Function RegisterInterfaceInGlobal(unk :IUnknown;Const riid : TIID; Out dwcookie :DWord):HResult;StdCall;
Function RevokeInterfaceFromGlobal (dwCookie :DWord):HResult;StdCall;
Function GetInterfaceFromGlobal (dwCookie :DWord;Const riid : TIID;out pv : Pointer):HResult;StdCall;
End;
IDirectWriterLock = Interface (IUnknown)
['{0e6d4d92-6738-11cf-9608-00aa00680db4}']
Function WaitForWriteAccess (dwTimeOut : DWORD):HResult;StdCall;
Function ReleaseWriteAccess:HResult;StdCall;
Function HaveWriteAccess:HResult;StdCall;
End;
ISynchronize = Interface (IUnknown)
['{00000030-0000-0000-C000-000000000046}']
Function Wait (dwFlags : DWord; dwMilliSeconds : DWord):HResult;StdCall;
Function Signal : HResult;StdCall;
Function Reset : HResult;StdCall;
End;
ISynchronizeHandle = Interface (IUnknown)
['{00000031-0000-0000-C000-000000000046}']
Function GetHandle(Out ph : Handle):HResult;StdCall;
End;
ISynchronizeEvent = Interface (ISynchronizeHandle)
['{00000032-0000-0000-C000-000000000046}']
Function SetEventHandle (Const ph : Handle):HResult; StdCall;
End;
ISynchronizeContainer = Interface (IUnknown)
['{00000033-0000-0000-C000-000000000046}']
Function AddSynchronize(pSync : ISynchronize):HResult; StdCall;
Function WaitMultiple(dwFlags : Dword; dwTimeOut : Dword; Out pSync : ISynchronize):HResult;StdCall;
End;
ISynchronizeMutex = Interface (ISynchronize)
['{00000025-0000-0000-C000-000000000046}']
Function ReleaseMutex:HResult; StdCall;
End;
ICancelMethodCalls = Interface (IUnknown)
['{00000029-0000-0000-C000-000000000046}']
Function Cancel(ulSeconds : ULong):HResult; StdCall;
Function TestCancel:HResult;StdCall;
End;
IAsyncManager = Interface (IUnknown)
['{0000002A-0000-0000-C000-000000000046}']
Function CompleteCall (xResult : HResult):HResult;StdCall;
Function GetCallContext(Const iid :TIID; Out pInterface : Pointer):HResult;StdCall;
Function GetState(Out pulStateFlags : ULong):HResult;StdCall;
End;
ICallFactory = Interface (IUnknown)
['{1c733a30-2a1c-11ce-ade5-00aa0044773d}']
Function CreateCall(Const riid:TIID;CtrUnk : IUnknown;Const Riid2:TIID;Out Unknown : IUnknown):HResult;StdCall;
End;
IRpcHelper = Interface (IUnknown)
['{00000149-0000-0000-C000-000000000046}']
Function GetDCOMProtocolVersion(Out ComVersion :DWord):HResult;StdCall;
Function GettIIDFromOBJREF(ObjRef : Pointer;Out xIID : piid):HResult;StdCall;
End;
IReleaseMarshalBuffers = Interface (IUnknown)
['{eb0cb9e8-7996-11d2-872e-0000f8080859}']
Function ReleaseMarshalBuffer(const pnsg : RPCOLEMESSAGE;dwFlags:DWord;Const pchn : IUnknown):HResult; StdCall;
End;
IWaitMultiple = Interface (IUnknown)
['{0000002B-0000-0000-C000-000000000046}']
Function WaitMulitple(TImeout :DWord;out psync : ISynchronize):HResult; StdCall;
Function AddSynchronize (const psync : ISynchronize):HResult;StdCall;
End;
IUrlMon = Interface (IUnknown)
['{00000026-0000-0000-C000-000000000046}']
Function AsyncGetClassBits(CONST rclsif : TClsID; psztype,pzext : lpcwstr; dwfileversionMS,dwFileVersionLS : DWord; pzcodebase : LPCWSTR; Const pbc : IBindCTX; dwclasscontext : DWord; const Riid:TIID; flags :DWORD):HResult; StdCall;
End;
IForegroundTransfer = Interface (IUnknown)
['{00000145-0000-0000-C000-000000000046}']
Function AllowForegroundTransfer(lpvReserved:Pointer):HResult; StdCall;
End;
IAddrTrackingControl = Interface (IUnknown)
['{00000147-0000-0000-C000-000000000046}']
Function EnableCOMDynamicAddrTracking:HResult; StdCall;
Function DisableCOMDynamicAddrTracking:HResult; StdCall;
End;
IAddrExclusionControl = Interface (IUnknown)
['{00000148-0000-0000-C000-000000000046}']
Function GetCurrentAddrExclusionList(Const riid : TIID;out Enumerator : Pointer):HResult;StdCall;
Function UpdateAddrExclusionList(Enumerator : IUnknown):HResult;StdCall;
End;
//****************************************************************************
//* Pipe interfaces
//****************************************************************************/
// Doesn't look translatable. See objidl.idl
//****************************************************************************
//* Thumbnail generator interface
//****************************************************************************/
IThumbnailExtractor = Interface (IUnknown)
['{969dc708-5c76-11d1-8d86-0000f804b057}']
Function ExtractThumbnail (pStg : IStorage; uLength,UHeight : ULong; Out uloutputlength,Height :ULong; Out OutputBitmap : HBITMAP): HResult; StdCall;
Function OnFileUpdated (pStg : IStorage):HResult;
End;
//****************************************************************************
//* Dummy Interface to force inclusion of HICON and HDC in proxy/stub code....
//****************************************************************************/
IDummyHICONIncluder = Interface (IUnknown)
['{947990de-cc28-11d2-a0f7-00805f858fb1}']
Function Dummy (h1 : HICON; H2 :HDC):HResult;
End;
IComThreadingInfo = Interface (IUnknown)
['{000001ce-0000-0000-C000-000000000046}']
Function GetCurrentApartmentType(out pAptType : DWord {APTTTYPE}):HResult;
Function GetCurrentThreadType(Out ThreadType : Dword {THDTTYPE}):HResult;StdCall;
Function GetCurrentLogicalThreadID(Out guidlogicalThreadId : TGUID):HResult;StdCall;
Function SetCurrentLogicalThreadID(Const guidlogicalThreadId : TGUID):HResult;StdCall;
End;
IProcessInitControl = Interface (IUnknown)
['{72380d55-8d2b-43a3-8513-2b6ef31434e9}']
Function ResetInitializerTimeout(dwSecondsRemaining:DWord):HResult; StdCall;
End;
// Interfaces from OAIDL.IDL
ITypeInfo = Interface;
ICreateTypeInfo = Interface (IUnknown)
['{00020405-0000-0000-C000-000000000046}']
Function SetGuid(CONST guid: TGUID):HResult;StdCall;
Function SetTypeFlags(uTypeFlags: UINT):HResult;StdCall;
Function SetDocString(pStrDoc: pOleStr):HResult;StdCall;
Function SetHelpContext(dwHelpContext: DWORD):HResult;StdCall;
Function SetVersion(wMajorVerNum: WORD; wMinorVerNum: WORD):HResult;StdCall;
Function AddRefTypeInfo(CONST pTInfo: ITypeInfo; CONST phRefType: HREFTYPE):HResult;StdCall;
Function AddFuncDesc(index: UINT; CONST pFuncDesc: FUNCDESC):HResult;StdCall;
Function AddImplType(index: UINT; hRefType: HREFTYPE):HResult;StdCall;
Function SetImplTypeFlags(index: UINT; implTypeFlags: WINT):HResult;StdCall;
Function SetAlignment(cbAlignment: WORD):HResult;StdCall;
Function SetSchema(pStrSchema: pOleStr):HResult;StdCall;
Function AddVarDesc(index: UINT; CONST pVarDesc: VARDESC):HResult;StdCall;
Function SetFuncAndParamNames(index: UINT; CONST rgszNames: pOleStr; cNames: UINT):HResult;StdCall;
Function SetVarName(index: UINT; szName: pOleStr):HResult;StdCall;
Function SetTypeDescAlias(CONST pTDescAlias: TYPEDESC):HResult;StdCall;
Function DefineFuncAsDllEntry(index: UINT; szDllName: pOleStr; szProcName: pOleStr):HResult;StdCall;
Function SetFuncDocString(index: UINT; szDocString: pOleStr):HResult;StdCall;
Function SetVarDocString(index: UINT; szDocString: pOleStr):HResult;StdCall;
Function SetFuncHelpContext(index: UINT; dwHelpContext: DWORD):HResult;StdCall;
Function SetVarHelpContext(index: UINT; dwHelpContext: DWORD):HResult;StdCall;
Function SetMops(index: UINT; Const bstrMops: WideString):HResult;StdCall;
Function SetTypeIdldesc(CONST pIdlDesc: IDLDESC):HResult;StdCall;
Function LayOut():HResult;StdCall;
End;
ICreateTypeInfo2 = Interface (ICreateTypeInfo)
['{0002040E-0000-0000-C000-000000000046}']
Function DeleteFuncDesc(index: UINT):HResult;StdCall;
Function DeleteFuncDescByMemId(memid: MEMBERID; invKind: INVOKEKIND):HResult;StdCall;
Function DeleteVarDesc(index: UINT):HResult;StdCall;
Function DeleteVarDescByMemId(memid: MEMBERID):HResult;StdCall;
Function DeleteImplType(index: UINT):HResult;StdCall;
Function SetCustData(CONST guid: TGUID; CONST pVarVal: VARIANT):HResult;StdCall;
Function SetFuncCustData(index: UINT; CONST guid: TGUID; CONST pVarVal: VARIANT):HResult;StdCall;
Function SetParamCustData(indexFunc: UINT; indexParam: UINT; CONST guid: TGUID; CONST pVarVal: VARIANT):HResult;StdCall;
Function SetVarCustData(index: UINT; CONST guid: TGUID; CONST pVarVal: VARIANT):HResult;StdCall;
Function SetImplTypeCustData(index: UINT; CONST guid: TGUID; CONST pVarVal: VARIANT):HResult;StdCall;
Function SetHelpStringContext(dwHelpStringContext: ULONG):HResult;StdCall;
Function SetFuncHelpStringContext(index: UINT; dwHelpStringContext: ULONG):HResult;StdCall;
Function SetVarHelpStringContext(index: UINT; dwHelpStringContext: ULONG):HResult;StdCall;
Function Invalidate():HResult;StdCall;
Function SetName(szName: pOleStr):HResult;StdCall;
End;
ICreateTypeLib = Interface (IUnknown)
['{00020406-0000-0000-C000-000000000046}']
Function CreateTypeInfo(szName: pOleStr; tkind: TYPEKIND; OUT ppCTInfo: ICreateTypeInfo):HResult;StdCall;
Function SetName(szName: pOleStr):HResult;StdCall;
Function SetVersion(wMajorVerNum: WORD; wMinorVerNum: WORD):HResult;StdCall;
Function SetGuid(CONST guid: TGUID):HResult;StdCall;
Function SetDocString(szDoc: pOleStr):HResult;StdCall;
Function SetHelpFileName(szHelpFileName: pOleStr):HResult;StdCall;
Function SetHelpContext(dwHelpContext: DWORD):HResult;StdCall;
Function SetLcid(lcid: LCID):HResult;StdCall;
Function SetLibFlags(uLibFlags: UINT):HResult;StdCall;
Function SaveAllChanges():HResult;StdCall;
End;
ICreateTypeLib2 = Interface (ICreateTypeLib)
['{0002040F-0000-0000-C000-000000000046}']
Function DeleteTypeInfo(szName: pOleStr):HResult;StdCall;
Function SetCustData(CONST guid: TGUID; CONST pVarVal: VARIANT):HResult;StdCall;
Function SetHelpStringContext(dwHelpStringContext: ULONG):HResult;StdCall;
Function SetHelpStringDll(szFileName: pOleStr):HResult;StdCall;
End;
IEnumVARIANT = Interface (IUnknown)
['{00020404-0000-0000-C000-000000000046}']
{$ifndef Call_as}
Function Next(celt: ULONG; OUT rgVar: VARIANT; pCeltFetched: pULONG=nil):HResult;StdCall;
{$else}
Function Next(celt: ULONG; OUT rgVar: VARIANT; pCeltFetched: pULONG=nil):HResult;StdCall;
{$endif}
Function Skip(celt: ULONG):HResult;StdCall;
Function Reset():HResult;StdCall;
Function Clone(OUT ppEnum: IEnumVARIANT):HResult;StdCall;
End;
ITypeComp = Interface (IUnknown)
['{00020403-0000-0000-C000-000000000046}']
{$ifndef Call_as}
Function Bind(szName: pOleStr; lHashVal: ULONG; wFlags: WORD; OUT ppTInfo: ITypeInfo; OUT pDescKind: DESCKIND; OUT pBindPtr: BINDPTR):HResult;StdCall;
Function BindType(szName: pOleStr; lHashVal: ULONG; OUT ppTInfo: ITypeInfo; OUT ppTComp: ITypeComp):HResult;StdCall;
{$else}
Function Bind(szName: pOleStr; lHashVal: ULONG; wFlags: WORD; OUT ppTInfo: ITypeInfo; OUT pDescKind: DESCKIND; OUT ppFuncDesc: LPFUNCDESC; OUT ppVarDesc: LPVARDESC; O
Function BindType(szName: pOleStr; lHashVal: ULONG; OUT ppTInfo: ITypeInfo):HResult;StdCall;
{$endif}
End;
ITypeInfo = Interface (IUnknown)
['{00020401-0000-0000-C000-000000000046}']
{$ifndef Call_as}
Function GetTypeAttr(OUT ppTypeAttr: lpTYPEATTR):HResult;StdCall;
{$else}
Function GetTypeAttr(OUT ppTypeAttr: LPTYPEATTR; OUT pDummy: CLEANLOCALSTORAGE):HResult;StdCall;
{$endif}
Function GetTypeComp(OUT ppTComp: ITypeComp):HResult;StdCall;
{$ifndef Call_as}
Function GetFuncDesc(index: UINT; OUT ppFuncDesc: lpFUNCDESC):HResult;StdCall;
Function GetVarDesc(index: UINT; OUT ppVarDesc: lpVARDESC):HResult;StdCall;
Function GetNames(memid: MEMBERID; rgBstrNames: PBStrList; cMaxNames: UINT; OUT pcNames: UINT):HResult;StdCall;
{$else}
Function GetFuncDesc(index: UINT; OUT ppFuncDesc: LPFUNCDESC; OUT pDummy: CLEANLOCALSTORAGE):HResult;StdCall;
Function GetVarDesc(index: UINT; OUT ppVarDesc: LPVARDESC; OUT pDummy: CLEANLOCALSTORAGE):HResult;StdCall;
Function GetNames(memid: MEMBERID; rgBstrNames: PBStrList; cMaxNames: UINT; OUT pcNames: UINT):HResult;StdCall;
{$endif}
Function GetRefTypeOfImplType(index: UINT; OUT pRefType: HREFTYPE):HResult;StdCall;
Function GetImplTypeFlags(index: UINT; OUT pImplTypeFlags: WINT):HResult;StdCall;
{$ifndef Call_as}
Function GetIDsOfNames(CONST rgszNames: pOleStr; cNames: UINT; OUT pMemId: MEMBERID):HResult;StdCall;
{$else}
Function LocalGetIDsOfNames():HResult;StdCall;
{$endif}
{$ifndef Call_as}
Function Invoke(pvInstance: Pointer; memid: MEMBERID; wFlags: WORD; VAR pDispParams: DISPPARAMS; OUT pVarResult: VARIANT; OUT pExcepInfo: EXCEPINFO; OUT puArgErr: UINT):HResult;StdCall;
{$else}
Function LocalInvoke ():HResult;StdCall;
{$endif}
{$ifndef Call_as}
//Function GetDocumentation(memid: MEMBERID; OUT pBstrName: WideString; OUT pBstrDocString: WideString; OUT pdwHelpContext: DWORD; OUT pBstrHelpFile: WideString):HResult;StdCall;
Function GetDocumentation(memid: MEMBERID; pBstrName: PWideString; pBstrDocString: PWideString; pdwHelpContext: PDWORD; pBstrHelpFile: PWideString):HResult;StdCall;
{$else}
Function GetDocumentation(memid: MEMBERID; refPtrFlags: DWORD; OUT pBstrName: WideString; OUT pBstrDocString: WideString; OUT pdwHelpContext: DWORD; OUT pBstrHelpFile: WideString):HResult;StdCall;
{$endif}
{$ifndef Call_as}
Function GetDllEntry(memid: MEMBERID; invKind: INVOKEKIND; OUT pBstrDllName: WideString; OUT pBstrName: WideString; OUT pwOrdinal: WORD):HResult;StdCall;
{$else}
Function GetDllEntry(memid: MEMBERID; invKind: INVOKEKIND; refPtrFlags: DWORD; OUT pBstrDllName: WideString; OUT pBstrName: WideString; OUT pwOrdinal: WORD):HResult;StdCall;
{$endif}
Function GetRefTypeInfo(hRefType: HREFTYPE; OUT ppTInfo: ITypeInfo):HResult;StdCall;
{$ifndef Call_as}
Function AddressOfMember(memid: MEMBERID; invKind: INVOKEKIND; OUT ppv: Pointer):HResult;StdCall;
{$else}
Function LocalAddressOfMember():HResult;StdCall;
{$endif}
{$ifndef Call_as}
Function CreateInstance(CONST pUnkOuter: IUnknown; CONST riid: TIID; OUT ppvObj: Pointer):HResult;StdCall;
{$else}
Function CreateInstance(CONST riid: TIID; OUT ppvObj: pIUnknown):HResult;StdCall;
{$endif}
Function GetMops(memid: MEMBERID; OUT pBstrMops: WideString):HResult;StdCall;
{$ifndef Call_as}
Function GetContainingTypeLib(OUT ppTLib: ITypeLib; OUT pIndex: UINT):HResult;StdCall;
{$else}
Function GetContainingTypeLib(OUT ppTLib: ITypeLib; OUT pIndex: UINT):HResult;StdCall;
{$endif}
{$ifndef Call_as}
Procedure ReleaseTypeAttr( pTypeAttr: pTypeAttr); StdCall;
{$else}
Function ReleaseTypeAttr():HResult;StdCall;
{$endif}
{$ifndef Call_as}
Procedure ReleaseFuncDesc( pFuncDesc : lpFUNCDESC); StdCall;
{$else}
Function LocalReleaseFuncDesc():HResult;StdCall;
{$endif}
{$ifndef Call_as}
Procedure ReleaseVarDesc( pVarDesc : lpVarDesc); stdcall;
{$else}
Function LocalReleaseVarDesc():HResult;StdCall;
{$endif}
End;
ITypeInfo2 = Interface (ITypeInfo)
['{00020412-0000-0000-C000-000000000046}']
Function GetTypeKind(OUT xpTypeKind: TYPEKIND):HResult;StdCall;
Function GetTypeFlags(OUT pTypeFlags: ULONG):HResult;StdCall;
Function GetFuncIndexOfMemId(memid: MEMBERID; invKind: INVOKEKIND; OUT pFuncIndex: UINT):HResult;StdCall;
Function GetVarIndexOfMemId(memid: MEMBERID; OUT pVarIndex: UINT):HResult;StdCall;
Function GetCustData(CONST guid: TGUID; OUT pVarVal: VARIANT):HResult;StdCall;
Function GetFuncCustData(index: UINT; CONST guid: TGUID; OUT pVarVal: VARIANT):HResult;StdCall;
Function GetParamCustData(indexFunc: UINT; indexParam: UINT; CONST guid: TGUID; OUT pVarVal: VARIANT):HResult;StdCall;
Function GetVarCustData(index: UINT; CONST guid: TGUID; OUT pVarVal: VARIANT):HResult;StdCall;
Function GetImplTypeCustData(index: UINT; CONST guid: TGUID; OUT pVarVal: VARIANT):HResult;StdCall;
{$ifndef Call_as}
Function GetDocumentation2(memid: MEMBERID; lcid: LCID; pbstrHelpString: PWideString; pdwHelpStringContext: PDWORD; pbstrHelpStringDll: PWideString):HResult;StdCall;
{$else}
Function GetDocumentation2(memid: MEMBERID; lcid: LCID; refPtrFlags: DWORD; pbstrHelpString: PWideString; pdwHelpStringContext: PDWORD; pbstrHelpStringDll: PWideString):HResult;StdCall;
{$endif}
Function GetAllCustData(OUT pCustData: CUSTDATA):HResult;StdCall;
Function GetAllFuncCustData(index: UINT; OUT pCustData: CUSTDATA):HResult;StdCall;
Function GetAllParamCustData(indexFunc: UINT; indexParam: UINT; OUT pCustData: CUSTDATA):HResult;StdCall;
Function GetAllVarCustData(index: UINT; OUT pCustData: CUSTDATA):HResult;StdCall;
Function GetAllImplTypeCustData(index: UINT; OUT pCustData: CUSTDATA):HResult;StdCall;
End;
ITypeLib = Interface (IUnknown)
['{00020402-0000-0000-C000-000000000046}']
{$ifndef Call_as}
Function GetTypeInfoCount:UINT; StdCall;
{$else}
Function GetTypeInfoCount(OUT pcTInfo: UINT):HResult;StdCall;
{$endif}
Function GetTypeInfo(index: UINT; OUT ppTInfo: ITypeInfo):HResult;StdCall;
Function GetTypeInfoType(index: UINT; OUT pTKind: TYPEKIND):HResult;StdCall;
Function GetTypeInfoOfGuid(CONST guid: TGUID; OUT ppTinfo: ITypeInfo):HResult;StdCall;
{$ifndef Call_as}
Function GetLibAttr(OUT ppTLibAttr: lpTLIBATTR):HResult;StdCall;
{$else}
Function GetLibAttr(OUT ppTLibAttr: LPTLIBATTR; OUT pDummy: CLEANLOCALSTORAGE):HResult;StdCall;
{$endif}
Function GetTypeComp(OUT ppTComp: ITypeComp):HResult;StdCall;
{$ifndef Call_as}
Function GetDocumentation(index: WINT; pBstrName: PWideString; pBstrDocString: PWideString; pdwHelpContext: PDWORD; pBstrHelpFile: PWideString):HResult;StdCall;
{$else}
Function GetDocumentation(index: WINT; refPtrFlags: DWORD; pBstrName: PWideString; pBstrDocString: PWideString; pdwHelpContext: PDWORD; pBstrHelpFile: PWideString):HResult;StdCall;
{$endif}
{$ifndef Call_as}
Function IsName(szNameBuf: pOleStr; lHashVal: ULONG; OUT pfName: BOOL):HResult;StdCall;
{$else}
Function IsName(szNameBuf: pOleStr; lHashVal: ULONG; OUT pfName: BOOL; OUT pBstrLibName: WideString):HResult;StdCall;
{$endif}
{$ifndef Call_as}
Function FindName(szNameBuf: pOleStr; lHashVal: ULONG; OUT ppTInfo: ITypeInfo; OUT rgMemId: MEMBERID; VAR pcFound: USHORT):HResult;StdCall;
{$else}
Function FindName(szNameBuf: pOleStr; lHashVal: ULONG; OUT ppTInfo: ITypeInfo; OUT rgMemId: MEMBERID; VAR pcFound: USHORT; OUT pBstrLibName: WideString):HResult;StdCall;
{$endif}
{$ifndef Call_as}
Procedure ReleaseTLibAttr( pTLibAttr : LPTLIBATTR); StdCall;
{$else}
Function LocalReleaseTLibAttr:HResult;StdCall;
{$endif}
End;
ITypeLib2 = Interface (ITypeLib)
['{00020411-0000-0000-C000-000000000046}']
Function GetCustData(CONST guid: TGUID; OUT pVarVal: VARIANT):HResult;StdCall;
{$ifndef Call_as}
Function GetLibStatistics(OUT pcUniqueNames: ULONG; OUT pcchUniqueNames: ULONG):HResult;StdCall;
{$else}
Function GetLibStatistics(OUT pcUniqueNames: ULONG; OUT pcchUniqueNames: ULONG):HResult;StdCall;
{$endif}
{$ifndef Call_as}
Function GetDocumentation2(index: WINT; lcid: LCID; pbstrHelpString: PWideString; pdwHelpStringContext: PDWORD; pbstrHelpStringDll: PWideString):HResult;StdCall;
{$else}
Function GetDocumentation2(index: WINT; lcid: LCID; refPtrFlags: DWORD; pbstrHelpString: PWideString; pdwHelpStringContext: PDWORD; pbstrHelpStringDll: PWideString):HResult;StdCall;
{$endif}
Function GetAllCustData(OUT pCustData: CUSTDATA):HResult;StdCall;
End;
ITypeChangeEvents= Interface (IUnknown)
['{00020410-0000-0000-C000-000000000046}']
Function RequestTypeChange(changeKind: CHANGEKIND; CONST pTInfoBefore: ITypeInfo; pStrName: pOleStr; OUT pfCancel: WINT):HResult;StdCall;
Function AfterTypeChange(changeKind: CHANGEKIND; CONST pTInfoAfter: ITypeInfo; pStrName: pOleStr):HResult;StdCall;
End;
IErrorInfo= Interface (IUnknown)
['{1CF2B120-547D-101B-8E65-08002B2BD119}']
Function GetGUID(OUT pGUID: TGUID):HResult;StdCall;
Function GetSource(OUT pBstrSource: WideString):HResult;StdCall;
Function GetDescription(OUT pBstrDescription: WideString):HResult;StdCall;
Function GetHelpFile(OUT pBstrHelpFile: WideString):HResult;StdCall;
Function GetHelpContext(OUT pdwHelpContext: DWORD):HResult;StdCall;
End;
ICreateErrorInfo= Interface (IUnknown)
['{22F03340-547D-101B-8E65-08002B2BD119}']
Function SetGUID(CONST rguid: TGUID):HResult;StdCall;
Function SetSource(szSource: pOleStr):HResult;StdCall;
Function SetDescription(szDescription: pOleStr):HResult;StdCall;
Function SetHelpFile(szHelpFile: pOleStr):HResult;StdCall;
Function SetHelpContext(dwHelpContext: DWORD):HResult;StdCall;
End;
ISupportErrorInfo= Interface (IUnknown)
['{DF0B3D60-548F-101B-8E65-08002B2BD119}']
Function InterfaceSupportsErrorInfo(CONST riid: TIID):HResult;StdCall;
End;
ITypeFactory = Interface (IUnknown)
['{0000002E-0000-0000-C000-000000000046}']
Function CreateFromTypeInfo(CONST pTypeInfo: ITypeInfo; CONST riid: TIID; OUT ppv: IUnknown):HResult;StdCall;
End;
ITypeMarshal = Interface (IUnknown)
['{0000002D-0000-0000-C000-000000000046}']
Function Size(pvType: Pointer; dwDestContext: DWORD; pvDestContext: Pointer; OUT pSize: ULONG):HResult;StdCall;
Function Marshal(pvType: Pointer; dwDestContext: DWORD; pvDestContext: Pointer; cbBufferLength: ULONG; OUT pBuffer: BYTE; OUT pcbWritten: ULONG):HResult;StdCall;
Function Unmarshal(pvType: Pointer; dwFlags: DWORD; cbBufferLength: ULONG; CONST pBuffer: BYTE; OUT pcbRead: ULONG):HResult;StdCall;
Function Free(pvType: Pointer):HResult;StdCall;
End;
IRecordInfo = Interface(IUnknown)
['{0000002F-0000-0000-C000-000000000046}']
Function RecordInit(pvNew: Pointer):HResult;StdCall;
Function RecordClear(pvExisting: Pointer):HResult;StdCall;
Function RecordCopy(pvExisting: Pointer; pvNew: Pointer):HResult;StdCall;
Function GetGuid(OUT pguid: TGUID):HResult;StdCall;
Function GetName(OUT pbstrName: WideString):HResult;StdCall;
Function GetSize(OUT pcbSize: ULONG):HResult;StdCall;
Function GetTypeInfo(OUT ppTypeInfo: ITypeInfo):HResult;StdCall;
Function GetField(pvData: Pointer; szFieldName: pOleStr; OUT pvarField: VARIANT):HResult;StdCall;
Function GetFieldNoCopy(pvData: Pointer; szFieldName: pOleStr; OUT pvarField: VARIANT; OUT ppvDataCArray: Pointer):HResult;StdCall;
Function PutField(wFlags: ULONG; pvData: Pointer; szFieldName: pOleStr; CONST pvarField: VARIANT):HResult;StdCall;
Function PutFieldNoCopy(wFlags: ULONG; pvData: Pointer; szFieldName: pOleStr; CONST pvarField: VARIANT):HResult;StdCall;
Function GetFieldNames(VAR pcNames: ULONG; OUT rgBstrNames: WideString):HResult;StdCall;
Function IsMatchingType(CONST pRecordInfo : IRecordInfo):Bool;StdCall;
Function RecordCreate : Pointer; StdCall;
Function RecordCreateCopy(pvSource: Pointer; OUT ppvDest: Pointer):HResult;StdCall;
Function RecordDestroy(pvRecord: Pointer):HResult;StdCall;
End;
IErrorLog = Interface (IUnknown)
['{3127CA40-446E-11CE-8135-00AA004BB851}']
Function AddError(pszPropName: pOleStr; CONST pExcepInfo: EXCEPINFO):HResult;StdCall;
End;
IPropertyBag = Interface (IUnknown)
['{55272A00-42CB-11CE-8135-00AA004BB851}']
{$ifndef Call_as}
Function Read(pszPropName: pOleStr; VAR pVar: VARIANT; CONST pErrorLog: IErrorLog):HResult;StdCall;
{$else}
Function Read(pszPropName: pOleStr; OUT pVar: VARIANT; CONST pErrorLog: IErrorLog; varType: DWORD; CONST pUnkObj: IUnknown):HResult;StdCall;
{$endif}
Function Write(pszPropName: pOleStr; CONST pVar: VARIANT):HResult;StdCall;
End;
IEnumGUID = interface(IUnknown)
['{0002E000-0000-0000-C000-000000000046}']
Function Next(celt: UINT; OUT rgelt: TGUID; pceltFetched: pUINT=nil):HResult;StdCall;
Function Skip(celt:UINT):HResult;StdCall;
Function Reset: HResult;StdCall;
Function Clone(out ppenum: IEnumGUID):HResult;StdCall;
End;
IBindHost = interface(IUnknown)
['{FC4801A1-2BA9-11CF-A229-00AA003D7352}']
End;
IServiceProvider = interface(IUnknown)
['{6D5140C1-7436-11CE-8034-00AA006009FA}']
Function QueryService(CONST rsid, iid: TGuid; OUT Obj):HResult;StdCall;
End;
PServiceProvider = ^IServiceProvider;
IParseDisplayName = interface(IUnknown)
['{0000011A-0000-0000-C000-000000000046}']
Function ParseDisplayName(CONST bc: IBindCtx; pszDisplayName: POleStr;OUT chEaten: Longint; OUT mkOut: IMoniker): HResult;StdCall;
End;
IOleContainer = interface(IParseDisplayName)
['{0000011B-0000-0000-C000-000000000046}']
Function EnumObjects(grfFlags: Longint; OUT Enum: IEnumUnknown):HResult;StdCall;
Function LockContainer(fLock: BOOL):HResult;StdCall;
End;
IOleClientSite = interface(IUnknown)
['{00000118-0000-0000-C000-000000000046}']
Function SaveObject: HResult;StdCall;
Function GetMoniker(dwAssign: Longint; dwWhichMoniker: Longint;OUT mk: IMoniker):HResult;StdCall;
Function GetContainer(OUT container: IOleContainer):HResult;StdCall;
Function ShowObject:HResult;StdCall;
Function OnShowWindow(fShow: BOOL):HResult;StdCall;
Function RequestNewObjectLayout:HResult;StdCall;
End;
IOleWindow = interface(IUnknown)
['{00000114-0000-0000-C000-000000000046}']
function GetWindow(out wnd: HWnd): HResult; stdcall;
function ContextSensitiveHelp(fEnterMode: BOOL): HResult; stdcall;
end;
tagOleMenuGroupWidths = record
width : array[0..5] Of LONG;
end;
OLEMENUGROUPWIDTHS = tagOleMenuGroupWidths;
TOleMenuGroupWidths = tagOleMenuGroupWidths;
LPOLEMENUGROUPWIDTHS = ^OLEMENUGROUPWIDTHS;
POleMenuGroupWidths = LPOLEMENUGROUPWIDTHS;
IProvideClassInfo = Interface (IUnknown)
['{B196B283-BAB4-101A-B69C-00AA00341D07}']
function GetClassInfo(out pptti : ITypeInfo):HResult; StdCall;
end;
IProvideClassInfo2 = Interface (IProvideClassInfo)
['{A6BC3AC0-DBAA-11CE-9DE3-00AA004BB851}']
function GetGUID(dwguid:DWord;out pguid:TGUID):HResult; StdCall;
end;
{ ******************************************************************************************************************
stuff from objbase.h
****************************************************************************************************************** }
tagOIFI = record
cb: UINT;
fMDIApp: BOOL;
hwndFrame: HWND;
haccel: HAccel;
cAccelEntries: UINT;
end;
TOleInPlaceFrameInfo = tagOIFI;
POleInPlaceFrameInfo = ^TOleInPlaceFrameInfo;
LPOleInPlaceFrameInfo = POleInPlaceFrameInfo;
OLEINPLACEFRAMEINFO = tagOIFI;
{ redefinitions }
function CoCreateGuid(out _para1:TGUID):HRESULT;stdcall;external 'ole32.dll' name 'CoCreateGuid';
{ additional definitions }
{$ifndef wince}
function IsEqualGUID(const guid1,guid2 : TGUID) : Boolean;stdcall;external 'ole32.dll' name 'IsEqualGUID';
function IsEqualIID(const iid1,iid2 : TIID) : Boolean;stdcall;external 'ole32.dll' name 'IsEqualGUID';
function IsEqualCLSID(const clsid1,clsid2 : TCLSID) : Boolean;stdcall;external 'ole32.dll' name 'IsEqualGUID';
{$endif wince}
{ OleIdl.h }
type
IOleInPlaceActiveObject = interface;
IOleAdviseHolder = interface(IUnknown)
['{00000111-0000-0000-C000-000000000046}']
function Advise(const advise: IAdviseSink; out dwConnection: DWORD): HResult;StdCall;
function Unadvise(dwConnection: DWORD): HResult;StdCall;
function EnumAdvise(out enumAdvise: IEnumStatData): HResult;StdCall;
function SendOnRename(const mk: IMoniker): HResult;StdCall;
function SendOnSave: HResult;StdCall;
function SendOnClose: HResult;StdCall;
end;
IEnumOLEVERB = interface(IUnknown)
['{00000104-0000-0000-C000-000000000046}']
function Next(celt: ULONG; out elt; pceltFetched: PULONG=nil): HResult;StdCall;
function Skip(celt: ULONG): HResult;StdCall;
function Reset: HResult;StdCall;
function Clone(out ppenum: IEnumOLEVERB): HResult;StdCall;
end;
IDropSource = interface(IUnknown)
['{00000121-0000-0000-C000-000000000046}']
function QueryContinueDrag(fEscapePressed: BOOL;
grfKeyState: Longint):HResult;StdCall;
function GiveFeedback(dwEffect: Longint): HResult;StdCall;
end;
IOleObject = interface(IUnknown)
['{00000112-0000-0000-C000-000000000046}']
function SetClientSite(const clientSite: IOleClientSite): HResult;StdCall;
function GetClientSite(out clientSite: IOleClientSite): HResult;StdCall;
function SetHostNames(szContainerApp: POleStr; szContainerObj: POleStr): HResult;StdCall;
function Close(dwSaveOption: DWORD): HResult;StdCall;
function SetMoniker(dwWhichMoniker: DWORD; const mk: IMoniker): HResult;StdCall;
function GetMoniker(dwAssign: DWORD; dwWhichMoniker: DWORD; out mk: IMoniker): HResult;StdCall;
function InitFromData(const dataObject: IDataObject; fCreation: BOOL; dwReserved: DWORD): HResult;StdCall;
function GetClipboardData(dwReserved: DWORD; out dataObject: IDataObject): HResult;StdCall;
function DoVerb(iVerb: LONG; msg: PMsg; const activeSite: IOleClientSite; lindex: LONG; hwndParent: HWND; const posRect: TRect): HResult;StdCall;
function EnumVerbs(out enumOleVerb: IEnumOleVerb): HResult;StdCall;
function Update: HResult;StdCall;
function IsUpToDate: HResult;StdCall;
function GetUserClassID(out clsid: TCLSID): HResult;StdCall;
function GetUserType(dwFormOfType: DWORD; out pszUserType: POleStr): HResult;StdCall;
function SetExtent(dwDrawAspect: DWORD; const size: TPoint): HResult;StdCall;
function GetExtent(dwDrawAspect: DWORD; out size: TPoint): HResult;StdCall;
function Advise(const advSink: IAdviseSink; out dwConnection: Longint): HResult;StdCall;
function Unadvise(dwConnection: DWORD): HResult;StdCall;
function EnumAdvise(out enumAdvise: IEnumStatData): HResult;StdCall;
function GetMiscStatus(dwAspect: DWORD; out dwStatus: DWORD): HResult;StdCall;
function SetColorScheme(const logpal: TLogPalette): HResult;StdCall;
end;
IDropTarget = interface(IUnknown)
['{00000122-0000-0000-C000-000000000046}']
function DragEnter(const dataObj: IDataObject; grfKeyState: DWORD; pt: TPoint; var dwEffect: DWORD): HResult;StdCall;
function DragOver(grfKeyState: DWORD; pt: TPoint; var dwEffect: DWORD): HResult;StdCall;
function DragLeave: HResult;StdCall;
function Drop(const dataObj: IDataObject; grfKeyState: DWORD; pt: TPoint; var dwEffect: DWORD):HResult;StdCall;
end;
IOleInPlaceUIWindow = interface(IOleWindow)
['{00000115-0000-0000-C000-000000000046}']
function GetBorder(out rectBorder: TRect):HResult;StdCall;
function RequestBorderSpace(const borderwidths: TRect):HResult;StdCall;
function SetBorderSpace(const borderwidths: TRect):HResult;StdCall;
function SetActiveObject(const activeObject: IOleInPlaceActiveObject;pszObjName: POleStr):HResult;StdCall;
end;
IOleInPlaceActiveObject = interface(IOleWindow)
['{00000117-0000-0000-C000-000000000046}']
function TranslateAccelerator(var msg: TMsg):HResult;StdCall;
function OnFrameWindowActivate(fActivate: BOOL):HResult;StdCall;
function OnDocWindowActivate(fActivate: BOOL):HResult;StdCall;
function ResizeBorder(const rcBorder: TRect; const uiWindow: IOleInPlaceUIWindow; fFrameWindow: BOOL):HResult;StdCall;
function EnableModeless(fEnable: BOOL):HResult;StdCall;
end;
IOleInPlaceFrame = interface(IOleInPlaceUIWindow)
['{00000116-0000-0000-C000-000000000046}']
function InsertMenus(hmenuShared: HMenu; var menuWidths: TOleMenuGroupWidths): HResult;StdCall;
function SetMenu(hmenuShared: HMenu; holemenu: HMenu; hwndActiveObject: HWnd): HResult;StdCall;
function RemoveMenus(hmenuShared: HMenu): HResult;StdCall;
function SetStatusText(pszStatusText: POleStr): HResult;StdCall;
function EnableModeless(fEnable: BOOL): HResult;StdCall;
function TranslateAccelerator(var msg: TMsg; wID: Word): HResult;StdCall;
end;
IOleLink = interface(IUnknown)
['{0000011d-0000-0000-C000-000000000046}']
function SetUpdateOptions(dwupdateopt:dword):HResult; stdcall;
function GetUpdateOptions(dwupdateopt:pdword):HResult; stdcall;
function SetSourceMoniker(pmk : IMoniker;const clsid: TCLSID):HRESULT; stdcall;
function GetSourceMoniker(out pmk : IMoniker):HRESULT; stdcall;
function SetSourceDisplayName(ppszDisplayName:lpolestr):HResult; stdcall;
function GetSourceDisplayName(out ppszDisplayName:lpolestr):HResult; stdcall;
function BindToSource(bindflags:DWord;pbc: IBindCTX):HResult; stdcall;
function BindIfRunning:HResult; stdcall;
function GetBoundSource(out ppunk: IUnKnown):HResult; stdcall;
function UnbindSource:HResult; stdcall;
function Update(pbc:IBindCtx):HResult; stdcall;
end;
IOleInPlaceSite = interface(IOleWindow)
['{00000119-0000-0000-C000-000000000046}']
function CanInPlaceActivate : HResult;
function OnInPlaceActivate : HResult;
function OnUIActivate : HResult;
function GetWindowContext(out ppframe:IOleInPlaceFrame;out ppdoc:IOleInPlaceUIWindow;lprcposrect:LPRECT;lprccliprect:LPRECT;lpframeinfo:LPOLEINPLACEFRAMEINFO):hresult; stdcall;
function Scroll(scrollExtant:TSIZE):hresult; stdcall;
function OnUIDeactivate(fUndoable:BOOL):hresult; stdcall;
function OnInPlaceDeactivate :hresult; stdcall;
function DiscardUndoState :hresult; stdcall;
function DeactivateAndUndo :hresult; stdcall;
function OnPosRectChange(lprcPosRect:LPRect):hresult; stdcall;
end;
IOleInPlaceObject = interface(IOleWindow)
['{00000113-0000-0000-C000-000000000046}']
function InPlaceDeactivate : HResult;
function UIDeactivate : HResult;
function SetObjectRects(lprcPosRect:LPRect;lprcClipRect:LPRect):hresult; stdcall;
function ReactivateAndUndo : HResult;
end;
IOleDocumentView = interface(IUnknown)
['{b722bcc6-4e68-101b-a2bc-00aa00404770}']
function SetInPlaceSite(ppipsite:IOleInPlaceSite):hresult; stdcall;
function GetInPlaceSite(out ppipsite:IOleInPlaceSite):hresult; stdcall;
function GetDocument(out ppipsite:Iunknown):hresult; stdcall;
function SetRect(prcview:LPRect):hresult; stdcall;
function Getrect(prcView:LPRect):hresult; stdcall;
function SetRectComplex(prcview:LPRect;prcHScroll:LPRect;prcVScroll:LPRect;prcSizeBox:LPRect):hresult; stdcall;
function Show(fshow:Bool) :hresult; stdcall;
function UIActivate(fUIActive :BOOL): HResult;
function Open :hresult; stdcall;
function Closeview(dwreserved:DWORD):hresult; stdcall;
function SaveViewState(pstm:IStream):hresult; stdcall;
function ApplyViewState(pstm:IStream):hresult; stdcall;
function Clone(pipsitenew: IOleInPlaceSite;out ppviewNew:IOleDocumentView):HResult;
end;
IEnumOleDocumentViews = Interface(IUnknown)
['{b722bcc8-4e68-101b-a2bc-00aa00404770}']
function Next (CViews:ULONG; out rgpview:IOleDocumentView;pcfetched:pulong):hresult; stdcall;
function Skip (CViews:ULong):hresult; stdcall;
function Reset:HResult; stdcall;
function Clone (out ppenum :IEnumOleDocumentViews) :HResult; stdcall;
end;
IOleDocument = interface(IUnknown)
['{b722bcc5-4e68-101b-a2bc-00aa00404770}']
function CreateView(pipsite:IOleInPlaceSite;pstm:IStream;dwReserved:DWord;out ppview : IOleDocumentView):hresult; stdcall;
function GetDocMiscStatus(pdwstatus:PDWord):hresult; stdcall;
function EnumViews(out ppenum:IEnumOleDocumentViews;out ppview:IOleDocumentView):hresult; stdcall;
end;
IOleDocumentSite = interface(IUnknown)
['{b722bcc7-4e68-101b-a2bc-00aa00404770}']
function ActivateMe(pviewtoactivate:IOleDocumentView):hresult; stdcall;
end;
IContinueCallback = interface(IUnknown)
['{b722bcca-4e68-101b-a2bc-00aa00404770}']
function FContinue:HResult;Stdcall;
function FContinuePrinting( nCntPrinted:LONG;nCurPage:Long;pwzprintstatus:polestr):HResult;Stdcall;
end;
{ ObjSafe.idl}
IObjectSafety = interface(IUnknown)
['{CB5BDC81-93C1-11cf-8F20-00805F2CD064}']
function GetInterfaceSafetyOptions(const riid:Tiid; out pdwsupportedoptions: dword;out pdwenabledoptions: dword):HRESULT; stdcall;
function SetInterfaceSafetyOptions(const riid:Tiid; const dwoptionsetmask: dword;const dwenabledoptions : dword):HRESULT; stdcall;
end;
TContinueCallback = function (dwcontinue:ULONG_PTR):BOOL; stdcall;
IViewObject = interface(IUnknown)
['{0000010d-0000-0000-C000-000000000046}']
function Draw(dwDrawAspect:DWord;LIndex:Long;pvaspect:pointer;ptd:PDVTARGETDEVICE;hdcTargetDev:HDC; hdcDraw:HDC;lprcBounds:PRECTL;lprcWBounds:PRECTL;pfncontinue:TContinueCallback;dwcontinue:ULONG_PTR):HResult; stdcall;
function GetColorSet(wDrawAspect:DWord;LIndex:Long;pvaspect:pointer;ptd:PDVTARGETDEVICE;hdcTargetDev:HDC;var ppcolorset:PLogPalette):HREsult; stdcall;
function Freeze(dwDrawAspect:DWord;LIndex:Long;pvaspect:pointer;pdwfreeze:pdword):HResult;stdcall;
function Unfreeze(dwfreeze:dword):HResult; stdcall;
function SetAdvise(aspects:DWORD;advf:DWORD;padvSink:IAdviseSink):HRESULT;stdcall;
function Getadvise(paspects:pdword;padvf:pdword;out ppadvsink: IADviseSink):HRESULT;stdcall;
end;
IViewObject2 = interface(IViewObject)
['{00000127-0000-0000-C000-000000000046}']
function GetExtent(dwDrawAspect:dword;lindex:DWord;ptd:pDVTARGETDEVICE;lpsizel:LPSIZEL):HRESULT;stdcall;
end;
{ COMCAT}
Const CATDESC_MAX = 128;
Type
CATID = TGUID;
TCATID = TGUID;
PCATID = PGUID;
tagCATEGORYINFO = packed record
catid : CATID;
LCID : lcid;
szDescription : array[0..CATDESC_MAX-1] of WideChar;
end;
CATEGORYINFO = tagCATEGORYINFO;
TCATEGORYINFO = tagCATEGORYINFO;
LPCATEGORYINFO = ^tagCATEGORYINFO;
PCATEGORYINFO = LPCATEGORYINFO;
IEnumCLSID = IEnumGUID;
IEnumCategoryInfo = interface(IUnknown)
['{0002E011-0000-0000-C000-000000000046}']
function Next(celt: ULONG; out rgelt: TCategoryInfo; out pceltFetched: ULONG): HResult; stdcall;
function Skip(celt:ULONG):HResult; StdCall;
function Reset:HResult; StdCall;
function CLone(Out ppenum : IEnumCategoryInfo):HResult;StdCall;
end;
ICatRegister = interface (IUnknown)
['{0002E012-0000-0000-C000-000000000046}']
function RegisterCategories (cCategories:ULONG;rgCategoryInfo : PCategoryInfo):HResult;Stdcall;
function UnRegisterCategories (cCategories:ULONG;PCatid :PCATID):HResult;Stdcall;
function RegisterClassImplCategories (const rclsid:TGUID;cCategories:ULONG; rgCatid :PCATID):HResult;Stdcall;
function UnRegisterClassImplCategories (const rclsid:TGUID;cCategories:ULONG; rgCatid :PCATID):HResult;Stdcall;
function RegisterClassReqCategories (const rclsid:TGUID;cCategories:ULONG; rgCatid :PCATID):HResult;Stdcall;
function UnRegisterClassReqCategories (const rclsid:TGUID;cCategories:ULONG; rgCatid :PCATID):HResult;Stdcall;
end;
ICatInformation = interface(IUnknown)
['{0002E013-0000-0000-C000-000000000046}']
function EnumCategories(lcid:lcid;out ppenumCategoryInfo : IEnumCategoryInfo):HResult; StdCall;
function GetCategoryDesc(rcatid:PCATID;lcid:LCID;out pszdesc:lpwstr):HResult; StdCall;
function EnumClassesOfCategories(cImplemented : ULong; rgcatidImpl:PCATID;cRequired:ULong; rgcatidreq:PCATID; out ppenumclsid : IEnumClsID):HResult; StdCall;
function ISClassOfCategories(rclsid:pclsid;cImplemented:ULong;rgcatidimpl:PCATID;CRequired:ULONG;rgcatidreq : pcatid):HResult; StdCall;
function EnumImplCategoriesOfClass(rclsid:pclsid;out ppenumclsid : IEnumClsID):HResult; StdCall;
function EnumReqCategoriesOfClass(rclsid:pclsid;out ppenumclsid : IEnumClsID):HResult; StdCall;
end;
IPropertySetStorage = Interface(IUnknown)
['{0000013A-0000-0000-C000-000000000046}']
function Create(const rfmtid:FMTID; const pclsid:CLSID; grfFlags:DWORD; grfMode:DWORD; out ppprstg:IPropertyStorage):HRESULT; StdCall;
function Open(const fmtid:FMTID; grfMode:DWORD; out ppprstg:IPropertyStorage):HRESULT; StdCall;
function Delete(const rfmtid:FMTID):HRESULT; StdCall;
function Enum(out ppenum:IEnumSTATPROPSETSTG):HRESULT; StdCall;
end;
IEnumSTATPROPSTG = interface( IUnknown)
['{00000139-0000-0000-C000-000000000046}']
function Next(celt:ULONG; var rgelt:STATPROPSTG; pceltFetched:pULONG):HRESULT; StdCall;
function Skip(celt:ULONG):HRESULT; StdCall;
function Reset:HRESULT; StdCall;
function Clone(out ppenum:IEnumSTATPROPSTG):HRESULT; StdCall;
end;
IEnumSTATPROPSETSTG = interface( IUnknown)
['{0000013B-0000-0000-C000-000000000046}']
function Next(celt:ULONG; var rgelt:STATPROPSETSTG; pceltFetched:pULONG):HRESULT; StdCall;
function Skip(celt:ULONG):HRESULT; StdCall;
function Reset:HRESULT; StdCall;
function Clone(out ppenum:IEnumSTATPROPSETSTG):HRESULT; StdCall;
end;
IPropertyStorage = interface(IUnknown)
['{00000138-0000-0000-C000-000000000046}']
function ReadMultiple(cpspec:ULONG; rgpspec:pPROPSPEC; rgpropvar:pPROPVARIANT):HRESULT; StdCall;
function WriteMultiple(cpspec:ULONG; rgpspec:pPROPSPEC; rgpropvar:pPROPVARIANT; propidNameFirst:PROPID):HRESULT; StdCall;
function DeleteMultiple(cpspec:ULONG; rgpspec:pPROPSPEC):HRESULT; StdCall;
function ReadPropertyNames(cpspec:ULONG; rgpropid:pPROPID; rgpropvar:plpolestr):HRESULT; StdCall;
function WritePropertyNames(cpspec:ULONG; rgpspec:pPROPID; rgpropvar:plpolestr):HRESULT; StdCall;
function DeletePropertyNames(cpspec:ULONG; rgpspec:pPROPid):HRESULT; StdCall;
function Commit(grfCommitFlags:DWORD):HRESULT; StdCall;
function Revert:HRESULT; StdCall;
function Enum(out ppenum:IEnumSTATPROPSTG):HRESULT; StdCall;
function SetTimes(pctime:PFILETIME; patime:PFILETIME; pmtime:PFILETIME):HRESULT; StdCall;
function SetClass(clsid:pCLSID):HRESULT; StdCall;
function Stat(pstatpsstg:pSTATPROPSETSTG):HRESULT; StdCall;
end;
{ ole2.h }
type
WINOLEAPI = HResult;
TLCID = DWORD; // is this needed (duplicate from windows?)
const
OLEIVERB_PRIMARY = 0;
OLEIVERB_SHOW = -(1);
OLEIVERB_OPEN = -(2);
OLEIVERB_HIDE = -(3);
OLEIVERB_UIACTIVATE = -(4);
OLEIVERB_INPLACEACTIVATE = -(5);
OLEIVERB_DISCARDUNDOSTATE = -(6);
{ for OleCreateEmbeddingHelper flags; roles low word; options high word }
EMBDHLP_INPROC_HANDLER = $0000;
EMBDHLP_INPROC_SERVER = $0001;
EMBDHLP_CREATENOW = $00000000;
EMBDHLP_DELAYCREATE = $00010000;
{ extended create function flags }
OLECREATE_LEAVERUNNING = $00000001;
{ pull the MIDL generated header }
{$ifndef wince}
function OleBuildVersion:DWORD;stdcall;external 'ole32.dll' name 'OleBuildVersion';
{$endif wince}
{ helper functions }
function ReadClassStg(pStg:IStorage; pclsid:PCLSID):WINOLEAPI;stdcall;external 'ole32.dll' name 'ReadClassStg';
function WriteClassStg(pStg:IStorage;const rclsid:TCLSID):WINOLEAPI;stdcall;external 'ole32.dll' name 'WriteClassStg';
function ReadClassStm(pStm:IStream; pclsid:PCLSID):WINOLEAPI;stdcall;external 'ole32.dll' name 'ReadClassStm';
function WriteClassStm(pStm:IStream;const rclsid:TCLSID):WINOLEAPI;stdcall;external 'ole32.dll' name 'WriteClassStm';
{$ifndef wince}
function WriteFmtUserTypeStg(pstg:IStorage; cf:CLIPFORMAT; lpszUserType:LPOLESTR):WINOLEAPI;stdcall;external 'ole32.dll' name 'WriteFmtUserTypeStg';
function ReadFmtUserTypeStg(pstg:IStorage; pcf:PCLIPFORMAT;out lplpszUserType:POleStr):WINOLEAPI;stdcall;external 'ole32.dll' name 'ReadFmtUserTypeStg';
{ init/term }
function OleInitialize(pvReserved:LPVOID):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleInitialize';
procedure OleUninitialize;stdcall;external 'ole32.dll' name 'OleUninitialize';
{ APIs to query whether (Embedded/Linked) object can be created from
the data object }
function OleQueryLinkFromData(pSrcDataObject:IDataObject):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleQueryLinkFromData';
function OleQueryCreateFromData(pSrcDataObject:IDataObject):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleQueryCreateFromData';
{$endif wince}
{ Object creation APIs }
function OleCreate(const rclsid:TCLSID; const riid:TIID;
renderopt:DWORD; pFormatEtc:LPFORMATETC; pClientSite:IOleClientSite;
pStg:IStorage; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name
'OleCreate';
{$ifndef wince}
function OleCreateEx(const rclsid:TCLSID; const riid:TIID; dwFlags:DWORD; renderopt:DWORD; cFormats:ULONG;
rgAdvf:PDWORD; rgFormatEtc:LPFORMATETC; lpAdviseSink:IAdviseSink; rgdwConnection:PDWORD; pClientSite:IOleClientSite;
pStg:IStorage; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleCreateEx';
function OleCreateFromData(pSrcDataObj:IDataObject; const riid:TIID; renderopt:DWORD; pFormatEtc:LPFORMATETC; pClientSite:IOleClientSite;
pStg:IStorage; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleCreateFromData';
function OleCreateFromDataEx(pSrcDataObj:IDataObject; const riid:TIID; dwFlags:DWORD; renderopt:DWORD; cFormats:ULONG;
rgAdvf:PDWORD; rgFormatEtc:LPFORMATETC; lpAdviseSink:IAdviseSink; rgdwConnection:PDWORD; pClientSite:IOleClientSite;
pStg:IStorage; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleCreateFromDataEx';
function OleCreateLinkFromData(pSrcDataObj:IDataObject; const riid:TIID; renderopt:DWORD; pFormatEtc:LPFORMATETC; pClientSite:IOleClientSite;
pStg:IStorage; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleCreateLinkFromData';
function OleCreateLinkFromDataEx(pSrcDataObj:IDataObject; const riid:TIID; dwFlags:DWORD; renderopt:DWORD; cFormats:ULONG;
rgAdvf:PDWORD; rgFormatEtc:LPFORMATETC; lpAdviseSink:IAdviseSink; rgdwConnection:PDWORD; pClientSite:IOleClientSite;
pStg:IStorage; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleCreateLinkFromDataEx';
function OleCreateStaticFromData(pSrcDataObj:IDataObject; const iid:TIID; renderopt:DWORD; pFormatEtc:LPFORMATETC; pClientSite:IOleClientSite;
pStg:IStorage; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleCreateStaticFromData';
function OleCreateLink(pmkLinkSrc:IMoniker; const riid:TIID; renderopt:DWORD; lpFormatEtc:LPFORMATETC; pClientSite:IOleClientSite;
pStg:IStorage; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleCreateLink';
function OleCreateLinkEx(pmkLinkSrc:IMoniker; const riid:TIID; dwFlags:DWORD; renderopt:DWORD; cFormats:ULONG;
rgAdvf:PDWORD; rgFormatEtc:LPFORMATETC; lpAdviseSink:IAdviseSink; rgdwConnection:PDWORD; pClientSite:IOleClientSite;
pStg:IStorage; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleCreateLinkEx';
function OleCreateLinkToFile(lpszFileName:POleStr; const riid:TIID; renderopt:DWORD; lpFormatEtc:LPFORMATETC; pClientSite:IOleClientSite;
pStg:IStorage; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleCreateLinkToFile';
function OleCreateLinkToFileEx(lpszFileName:POleStr; const riid:TIID; dwFlags:DWORD; renderopt:DWORD; cFormats:ULONG;
rgAdvf:PDWORD; rgFormatEtc:LPFORMATETC; lpAdviseSink:IAdviseSink; rgdwConnection:PDWORD; pClientSite:IOleClientSite;
pStg:IStorage; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleCreateLinkToFileEx';
function OleCreateFromFile(const rclsid:TCLSID; lpszFileName:POleStr; const riid:TIID; renderopt:DWORD; lpFormatEtc:LPFORMATETC;
pClientSite:IOleClientSite; pStg:IStorage; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleCreateFromFile';
function OleCreateFromFileEx(const rclsid:TCLSID; lpszFileName:POleStr; const riid:TIID; dwFlags:DWORD; renderopt:DWORD;
cFormats:ULONG; rgAdvf:PDWORD; rgFormatEtc:LPFORMATETC; lpAdviseSink:IAdviseSink; rgdwConnection:PDWORD;
pClientSite:IOleClientSite; pStg:IStorage; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleCreateFromFileEx';
function OleLoad(pStg:IStorage; const riid:TIID; pClientSite:IOleClientSite; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleLoad';
function OleLoadFromStream(pStm:IStream; const iidInterface:TIID; out ppvObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleLoadFromStream';
function OleSaveToStream(pPStm:IPersistStream; pStm:IStream):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleSaveToStream';
function OleNoteObjectVisible(pUnknown:IUnknown; fVisible:BOOL):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleNoteObjectVisible';
{$endif wince}
function OleSave(pPS:IPersistStorage; pStg:IStorage; fSameAsLoad:BOOL):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleSave';
function OleSetContainedObject(pUnknown:IUnknown; fContained:BOOL):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleSetContainedObject';
{ Drag/Drop APIs }
{$ifndef wince}
function RegisterDragDrop(hwnd:HWND; pDropTarget:IDropTarget):WINOLEAPI;stdcall;external 'ole32.dll' name 'RegisterDragDrop';
function RevokeDragDrop(hwnd:HWND):WINOLEAPI;stdcall;external 'ole32.dll' name 'RevokeDragDrop';
function DoDragDrop(pDataObj:IDataObject; pDropSource:IDropSource; dwOKEffects:DWORD; pdwEffect:LPDWORD):WINOLEAPI;stdcall;external 'ole32.dll' name 'DoDragDrop';
{ Clipboard APIs }
function OleSetClipboard(pDataObj:IDataObject):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleSetClipboard';
function OleGetClipboard(out ppDataObj:IDataObject):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleGetClipboard';
function OleFlushClipboard:WINOLEAPI;stdcall;external 'ole32.dll' name 'OleFlushClipboard';
function OleIsCurrentClipboard(pDataObj:IDataObject):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleIsCurrentClipboard';
{$endif wince}
type
HOLEMENU = HMenu;
{ InPlace Editing APIs }
{$ifndef wince}
function OleCreateMenuDescriptor(hmenuCombined:HMENU; lpMenuWidths:LPOLEMENUGROUPWIDTHS):HOLEMENU;stdcall;external 'ole32.dll' name 'OleCreateMenuDescriptor';
function OleDestroyMenuDescriptor(holemenu:HOLEMENU):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleDestroyMenuDescriptor';
function OleTranslateAccelerator(lpFrame:IOleInPlaceFrame; lpFrameInfo:TOleInPlaceFrameInfo; lpmsg:LPMSG):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleTranslateAccelerator';
{$endif wince}
function OleSetMenuDescriptor(holemenu:HOLEMENU; hwndFrame:HWND; hwndActiveObject:HWND; lpFrame:IOleInPlaceFrame; lpActiveObj:IOleInPlaceActiveObject):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleSetMenuDescriptor';
{ Helper APIs }
{$ifndef wince}
function OleDuplicateData(hSrc:HANDLE; cfFormat:CLIPFORMAT; uiFlags:UINT):HANDLE;stdcall;external 'ole32.dll' name 'OleDuplicateData';
function OleLockRunning(pUnknown:IUnknown; fLock:BOOL; fLastUnlockCloses:BOOL):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleLockRunning';
function OleCreateDefaultHandler(const clsid:TCLSID; pUnkOuter:IUnknown; const riid:TIID; out lplpObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleCreateDefaultHandler';
function OleCreateEmbeddingHelper(const clsid:TCLSID; pUnkOuter:IUnknown; flags:DWORD; pCF:IClassFactory; const riid:TIID;
out lplpObj):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleCreateEmbeddingHelper';
function IsAccelerator(hAccel:HACCEL; cAccelEntries:longint; lpMsg:LPMSG; lpwCmd:PWORD):BOOL;stdcall;external 'ole32.dll' name 'IsAccelerator';
{$endif wince}
function OleDraw(pUnknown:IUnknown; dwAspect:DWORD; hdcDraw:HDC;const lprcBounds:TRect):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleDraw';
function OleRun(pUnknown:IUnknown):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleRun';
function OleIsRunning(pObject:IOleObject):BOOL;stdcall;external 'ole32.dll' name 'OleIsRunning';
procedure ReleaseStgMedium(var _para1:STGMEDIUM);stdcall;external 'ole32.dll' name 'ReleaseStgMedium';
procedure ReleaseStgMedium(_para1:LPSTGMEDIUM);stdcall;external 'ole32.dll' name 'ReleaseStgMedium';
function CreateOleAdviseHolder(out ppOAHolder:IOleAdviseHolder):WINOLEAPI;stdcall;external 'ole32.dll' name 'CreateOleAdviseHolder';
{ Icon extraction Helper APIs }
{$ifndef wince}
function OleGetIconOfFile(lpszPath:LPOLESTR; fUseFileAsLabel:BOOL):HGLOBAL;stdcall;external 'ole32.dll' name 'OleGetIconOfFile';
function OleGetIconOfClass(const rclsid:TCLSID; lpszLabel:LPOLESTR; fUseTypeAsLabel:BOOL):HGLOBAL;stdcall;external 'ole32.dll' name 'OleGetIconOfClass';
function OleMetafilePictFromIconAndLabel(hIcon:HICON; lpszLabel:LPOLESTR; lpszSourceFile:LPOLESTR; iIconIndex:UINT):HGLOBAL;stdcall;external 'ole32.dll' name 'OleMetafilePictFromIconAndLabel';
{$endif wince}
{ Registration Database Helper APIs }
{$ifndef wince}
function OleRegGetUserType(const clsid:TCLSID; dwFormOfType:DWORD;out pszUserType:POleStr):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleRegGetUserType';
function OleRegGetMiscStatus(const clsid:TCLSID; dwAspect:DWORD; pdwStatus:PDWORD):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleRegGetMiscStatus';
function OleRegEnumFormatEtc(const clsid:TCLSID; dwDirection:DWORD;out ppenum:IEnumFormatEtc):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleRegEnumFormatEtc';
function OleRegEnumVerbs(const clsid:TCLSID;out ppenum:IEnumOLEVERB):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleRegEnumVerbs';
{$endif wince}
{$ifdef _MAC}
{ WlmOLE helper APIs }
function WlmOleCheckoutMacInterface(pUnk:IUnknown; out ppv):WINOLEAPI;stdcall;external 'ole32.dll' name 'WlmOleCheckoutMacInterface';
function WlmOleCheckinMacInterface(pUnk:IUnknown):WINOLEAPI;stdcall;external 'ole32.dll' name 'WlmOleCheckinMacInterface';
function WlmOleWrapMacInterface(pUnk:IUnknown; const riid:TIID; out ppv):WINOLEAPI;stdcall;external 'ole32.dll' name 'WlmOleWrapMacInterface';
function WlmOleUnwrapMacInterface(pv:LPVOID):WINOLEAPI;stdcall;external 'ole32.dll' name 'WlmOleUnwrapMacInterface';
function WlmOleCheckoutWinInterface(pUnk:LPVOID; ppv:PIUnknown):WINOLEAPI;stdcall;external 'ole32.dll' name 'WlmOleCheckoutWinInterface';
function WlmOleCheckinWinInterface(pUnk:LPVOID):WINOLEAPI;stdcall;external 'ole32.dll' name 'WlmOleCheckinWinInterface';
function WlmOleWrapWinInterface(pUnk:LPVOID; const riid:TIID; ppv:PIUnknown):WINOLEAPI;stdcall;external 'ole32.dll' name 'WlmOleWrapWinInterface';
function WlmOleUnwrapWinInterface(pv:LPVOID):WINOLEAPI;stdcall;external 'ole32.dll' name 'WlmOleUnwrapWinInterface';
procedure WlmOleVersion;stdcall;external 'ole32.dll' name 'WlmOleVersion';
procedure WlmOleSetInPlaceWindow(hwnd:HWND);stdcall;external 'ole32.dll' name 'WlmOleSetInPlaceWindow';
{ typedef HRESULT (STDAPICALLTYPE* OLEWRAPPROC) (TIID riid, LPVOID* ppvWin, LPVOID* ppvMac); }
function WlmOleRegisterUserWrap(procNew:OLEWRAPPROC; pprocOld:POLEWRAPPROC):WINOLEAPI;stdcall;external 'ole32.dll' name 'WlmOleRegisterUserWrap';
{$endif}
{ OLE 1.0 conversion APIS }
{**** OLE 1.0 OLESTREAM declarations ************************************ }
type
LPOLESTREAM = ^_OLESTREAM;
_OLESTREAMVTBL = record
Get : function (p : POleStr;out o;dw : DWORD) : DWORD;
Put : function (p : POleStr;const o;dw : DWORD) : DWORD;
end;
OLESTREAMVTBL = _OLESTREAMVTBL;
LPOLESTREAMVTBL = OLESTREAMVTBL;
_OLESTREAM = record
lpstbl : LPOLESTREAMVTBL;
end;
OLESTREAM = _OLESTREAM;
(* Const before type ignored *)
{$ifndef wince}
function OleConvertOLESTREAMToIStorage(_lpolestream:LPOLESTREAM; pstg:IStorage; ptd:PDVTARGETDEVICE):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleConvertOLESTREAMToIStorage';
function OleConvertIStorageToOLESTREAM(pstg:IStorage; lpolestream:LPOLESTREAM):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleConvertIStorageToOLESTREAM';
{$endif wince}
{ Storage Utility APIs }
function GetHGlobalFromILockBytes(plkbyt:ILockBytes;out phglobal:HGLOBAL):WINOLEAPI;stdcall;external 'ole32.dll' name 'GetHGlobalFromILockBytes';
function CreateStreamOnHGlobal(hGlobal:HGLOBAL; fDeleteOnRelease:BOOL;out stm:IStream):WINOLEAPI;stdcall;external 'ole32.dll' name 'CreateStreamOnHGlobal';
{$ifndef wince}
function CreateILockBytesOnHGlobal(hGlobal:HGLOBAL; fDeleteOnRelease:BOOL;out pplkbyt:ILockBytes):WINOLEAPI;stdcall;external 'ole32.dll' name 'CreateILockBytesOnHGlobal';
function GetHGlobalFromStream(pstm:IStream;out phglobal:HGLOBAL):WINOLEAPI;stdcall;external 'ole32.dll' name 'GetHGlobalFromStream';
{$endif wince}
{ ConvertTo APIS }
{$ifndef wince}
function OleDoAutoConvert(pStg:IStorage; pClsidNew:LPCLSID):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleDoAutoConvert';
function OleGetAutoConvert(const clsidOld:TCLSID; pClsidNew:LPCLSID):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleGetAutoConvert';
function OleSetAutoConvert(const clsidOld:TCLSID; clsidNew:TCLSID):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleSetAutoConvert';
function GetConvertStg(pStg:IStorage):WINOLEAPI;stdcall;external 'ole32.dll' name 'GetConvertStg';
function SetConvertStg(pStg:IStorage; fConvert:BOOL):WINOLEAPI;stdcall;external 'ole32.dll' name 'SetConvertStg';
{ Presentation data to OLESTREAM }
{ format }
{ width }
{ height }
{ size bytes }
{ bits }
function OleConvertIStorageToOLESTREAMEx(pstg:IStorage; cfFormat:CLIPFORMAT; lWidth:LONG; lHeight:LONG; dwSize:DWORD;
pmedium:LPSTGMEDIUM; polestm:LPOLESTREAM):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleConvertIStorageToOLESTREAMEx';
{ Presentation data from OLESTREAM }
{ format }
{ width }
{ height }
{ size bytes }
function OleConvertOLESTREAMToIStorageEx(polestm:LPOLESTREAM; pstg:IStorage; pcfFormat:PCLIPFORMAT; plwWidth:PLONG; plHeight:PLONG;
pdwSize:PDWORD; pmedium:LPSTGMEDIUM):WINOLEAPI;stdcall;external 'ole32.dll' name 'OleConvertOLESTREAMToIStorageEx';
{$endif wince}
const
DROPEFFECT_NONE = 0;
DROPEFFECT_COPY = 1;
DROPEFFECT_MOVE = 2;
DROPEFFECT_LINK = 4;
DROPEFFECT_SCROLL = dword($80000000);
type
BORDERWIDTHS = TRect;
LPBORDERWIDTHS = PRect;
LPCBORDERWIDTHS = PRect;
TBorderWidths = TRect;
PBorderWidths = PRect;
function CoInitializeEx(_para1:LPVOID; _para2:DWORD):HRESULT;stdcall; external 'ole32.dll' name 'CoInitializeEx';
procedure CoUninitialize;stdcall; external 'ole32.dll' name 'CoUninitialize';
function CoGetClassObject(const _para1:TCLSID; _para2:DWORD; _para3:PVOID; const _para4:TIID; out _para5):HRESULT;stdcall; external 'ole32.dll' name 'CoGetClassObject';
function CoLoadLibrary(_para1:LPOLESTR; _para2:BOOL):THandle;stdcall; external 'ole32.dll' name 'CoLoadLibrary';
procedure CoFreeLibrary(_para1:THandle);stdcall; external 'ole32.dll' name 'CoFreeLibrary';
procedure CoFreeUnusedLibraries;stdcall; external 'ole32.dll' name 'CoFreeUnusedLibraries';
function CoCreateInstance(const _para1:TCLSID; _para2:IUnknown; _para3:DWORD;const _para4:TIID;out _para5):HRESULT;stdcall; external 'ole32.dll' name 'CoCreateInstance';
function StringFromCLSID(const _para1:TCLSID; out _para2:POLESTR):HRESULT;stdcall; external 'ole32.dll' name 'StringFromCLSID';
function CLSIDFromString(_para1:LPOLESTR; _para2:LPCLSID):HRESULT;stdcall; external 'ole32.dll' name 'CLSIDFromString';
function StringFromIID(const _para1:TIID; out _para2:POLESTR):HRESULT;stdcall; external 'ole32.dll' name 'StringFromIID';
function ProgIDFromCLSID(para:PCLSID; out _para2:POLESTR):HRESULT;stdcall; external 'ole32.dll' name 'ProgIDFromCLSID';
function ProgIDFromCLSID(const _para1:TCLSID; out _para2:POLESTR):HRESULT;stdcall; external 'ole32.dll' name 'ProgIDFromCLSID';
function CLSIDFromProgID(_para1:POLESTR; _para2:LPCLSID):HRESULT;stdcall; external 'ole32.dll' name 'CLSIDFromProgID';
function CLSIDFromProgID(_para1:POLESTR; out _para2:TCLSID):HRESULT;stdcall; external 'ole32.dll' name 'CLSIDFromProgID';
function StringFromGUID2(const _para1:TGUID; _para2:LPOLESTR; _para3:longint):longint;stdcall; external 'ole32.dll' name 'StringFromGUID2';
function CoCreateGuid(_para1:PGUID):HRESULT;stdcall; external 'ole32.dll' name 'CoCreateGuid';
{$ifndef wince}
function CoBuildVersion:DWORD;stdcall; external 'ole32.dll' name 'CoBuildVersion';
function CoInitialize(_para1:PVOID):HRESULT;stdcall; external 'ole32.dll' name 'CoInitialize';
function CoGetMalloc(_para1:DWORD; out _para2:IMalloc):HRESULT;stdcall; external 'ole32.dll' name 'CoGetMalloc';
function CoGetCurrentProcess:DWORD;stdcall; external 'ole32.dll' name 'CoGetCurrentProcess';
function CoRegisterMallocSpy(_para1:IMallocSpy):HRESULT;stdcall; external 'ole32.dll' name 'CoRegisterMallocSpy';
function CoRevokeMallocSpy:HRESULT;stdcall; external 'ole32.dll' name 'CoRevokeMallocSpy';
function CoCreateStandardMalloc(_para1:DWORD; out _para2:IMalloc):HRESULT;stdcall; external 'ole32.dll' name 'CoGetMalloc';
function CoRegisterClassObject(const _para1:TCLSID; _para2:IUnknown; _para3:DWORD; _para4:DWORD; _para5:PDWORD):HRESULT;stdcall; external 'ole32.dll' name 'CoRegisterClassObject';
function CoRevokeClassObject(_para1:DWORD):HRESULT;stdcall; external 'ole32.dll' name 'CoRevokeClassObject';
function CoGetMarshalSizeMax(_para1:PULONG;const _para2:TIID; _para3:IUnknown; _para4:DWORD; _para5:PVOID;
_para6:DWORD):HRESULT;stdcall; external 'ole32.dll' name 'CoGetMarshalSizeMax';
function CoMarshalInterface(_para1:IStream;const _para2:TIID; _para3:IUnknown; _para4:DWORD; _para5:PVOID;
_para6:DWORD):HRESULT;stdcall; external 'ole32.dll' name 'CoMarshalInterface';
function CoUnmarshalInterface(_para1:IStream;const _para2:TIID; out _para3):HRESULT;stdcall; external 'ole32.dll' name 'CoUnmarshalInterface';
function CoMarshalHresult(_para1:IStream; _para2:HRESULT):HRESULT;stdcall; external 'ole32.dll' name 'CoMarshalHresult';
function CoUnmarshalHresult(_para1:IStream; _para2:HRESULT):HRESULT;stdcall; external 'ole32.dll' name 'CoUnmarshalHresult';
function CoReleaseMarshalData(_para1:IStream):HRESULT;stdcall; external 'ole32.dll' name 'CoReleaseMarshalData';
function CoDisconnectObject(_para1:IUnknown; _para2:DWORD):HRESULT;stdcall; external 'ole32.dll' name 'CoDisconnectObject';
function CoLockObjectExternal(_para1:IUnknown; _para2:BOOL; _para3:BOOL):HRESULT;stdcall; external 'ole32.dll' name 'CoLockObjectExternal';
function CoGetStandardMarshal(const _para1:TIID; _para2:IUnknown; _para3:DWORD; _para4:PVOID; _para5:DWORD;
out _para6:IMarshal):HRESULT;stdcall; external 'ole32.dll' name 'CoGetStandardMarshal';
function CoGetStdMarshalEx(_para1:IUnknown; _para2:DWORD; out _para3:IUnknown):HRESULT;stdcall; external 'ole32.dll' name 'CoGetStdMarshalEx';
function CoIsHandlerConnected(_para1:IUnknown):BOOL;stdcall; external 'ole32.dll' name 'CoIsHandlerConnected';
function CoHasStrongExternalConnections(_para1:IUnknown):BOOL;stdcall; external 'ole32.dll' name 'CoHasStrongExternalConnections';
function CoMarshalInterThreadInterfaceInStream(const _para1:TIID; _para2:IUnknown; out _para3:IStream):HRESULT;stdcall; external 'ole32.dll' name 'CoMarshalInterThreadInterfaceInStream';
function CoGetInterfaceAndReleaseStream(_para1:IStream;const _para2:TIID; out _para3):HRESULT;stdcall; external 'ole32.dll' name 'CoGetInterfaceAndReleaseStream';
function CoCreateFreeThreadedMarshaler(_para1:IUnknown; out _para2:IUnknown):HRESULT;stdcall; external 'ole32.dll' name 'CoCreateFreeThreadedMarshaler';
procedure CoFreeAllLibraries;stdcall; external 'ole32.dll' name 'CoFreeAllLibraries';
function CoCreateInstanceEx(const _para1:TCLSID; _para2:IUnknown; _para3:DWORD; _para4:PCOSERVERINFO; _para5:DWORD;
_para6:PMULTI_QI):HRESULT;stdcall; external 'ole32.dll' name 'CoCreateInstanceEx';
function IIDFromString(_para1:LPOLESTR; out _para2:TIID):HRESULT;stdcall; external 'ole32.dll' name 'IIDFromString';
function CoIsOle1Class(const _para1:TCLSID):BOOL;stdcall; external 'ole32.dll' name 'CoIsOle1Class';
function CoFileTimeToDosDateTime(_para1:PFILETIME; _para2:LPWORD; _para3:LPWORD):BOOL;stdcall; external 'ole32.dll' name 'CoFileTimeToDosDateTime';
function CoDosDateTimeToFileTime(_para1:WORD; _para2:WORD; _para3:PFILETIME):BOOL;stdcall; external 'ole32.dll' name 'CoDosDateTimeToFileTime';
function CoFileTimeNow(_para1:PFILETIME):HRESULT;stdcall; external 'ole32.dll' name 'CoFileTimeNow';
function CoRegisterMessageFilter(_para1:IMessageFilter;out _para2:IMessageFilter):HRESULT;stdcall; external 'ole32.dll' name 'CoRegisterMessageFilter';
function CoGetTreatAsClass(const _para1:TCLSID; _para2:LPCLSID):HRESULT;stdcall; external 'ole32.dll' name 'CoGetTreatAsClass';
function CoTreatAsClass(const _para1:TCLSID; const _para2:TCLSID):HRESULT;stdcall; external 'ole32.dll' name 'CoTreatAsClass';
{$endif wince}
type
LPFNGETCLASSOBJECT = function (const _para1:TCLSID; const _para2:TIID;out _para3):HRESULT;stdcall;
LPFNCANUNLOADNOW = function:HRESULT;stdcall;
{$ifndef wince}
function DllGetClassObject(const _para1:TCLSID; const _para2:TIID; out _para3):HRESULT;stdcall; external 'ole32.dll' name 'DllGetClassObject';
function DllCanUnloadNow:HRESULT;stdcall; external 'ole32.dll' name 'DllCanUnloadNow';
{$endif wince}
function CoTaskMemAlloc(_para1:ULONG):PVOID;stdcall; external 'ole32.dll' name 'CoTaskMemAlloc';
function CoTaskMemRealloc(_para1:PVOID; _para2:ULONG):PVOID;stdcall; external 'ole32.dll' name 'CoTaskMemRealloc';
procedure CoTaskMemFree(_para1:PVOID);stdcall; external 'ole32.dll' name 'CoTaskMemFree';
{$ifndef wince}
function CreateDataAdviseHolder(_para1:IDataAdviseHolder):HRESULT;stdcall; external 'ole32.dll' name 'CreateDataAdviseHolder';
function CreateDataCache(_para1:IUnknown; const _para2:TCLSID; const _para3:TIID; out _para4):HRESULT;stdcall; external 'ole32.dll' name 'CreateDataCache';
{$endif wince}
(* Const before type ignored *)
function StgCreateDocfile(_para1:POLESTR; _para2:DWORD; _para3:DWORD; out _para4:IStorage):HRESULT;stdcall; external 'ole32.dll' name 'StgCreateDocfile';
function StgCreateDocfileOnILockBytes(_para1:ILockBytes; _para2:DWORD; _para3:DWORD; out _para4:IStorage):HRESULT;stdcall; external 'ole32.dll' name 'StgCreateDocfileOnILockBytes';
(* Const before type ignored *)
function StgOpenStorage(_para1:POLESTR; _para2:IStorage; _para3:DWORD; _para4:SNB; _para5:DWORD;
out _para6:IStorage):HRESULT;stdcall; external 'ole32.dll' name 'StgOpenStorage';
function StgOpenStorageOnILockBytes(_para1:ILockBytes; _para2:IStorage; _para3:DWORD; _para4:SNB; _para5:DWORD;
out _para6:IStorage):HRESULT;stdcall; external 'ole32.dll' name 'StgOpenStorageOnILockBytes';
{$ifndef wince}
function StgIsStorageFile(_para1:POLESTR):HRESULT;stdcall; external 'ole32.dll' name 'StgIsStorageFile';
function StgIsStorageILockBytes(_para1:ILockBytes):HRESULT;stdcall; external 'ole32.dll' name 'StgIsStorageILockBytes';
function StgSetTimes(_para1:POLESTR; _para2:PFILETIME; _para3:PFILETIME; _para4:PFILETIME):HRESULT;stdcall; external 'ole32.dll' name 'StgSetTimes';
function CoGetObject(pszname:lpwstr; bndop:PBind_Opts; const riid:TIID; out ppv):HRESULT; stdcall; external 'ole32.dll' name 'CoGetObject';
function BindMoniker(_para1:IMoniker; _para2:DWORD; const _para3:TIID; out _para4):HRESULT;stdcall; external 'ole32.dll' name 'BindMoniker';
function MkParseDisplayName(_para1:IBindCtx; _para2:POLESTR; out _para3:PULONG; out _para4:IMoniker):HRESULT;stdcall; external 'ole32.dll' name 'MkParseDisplayName';
function MonikerRelativePathTo(_para1:IMoniker; _para2:IMoniker; out _para3:IMoniker; _para4:BOOL):HRESULT;stdcall; external 'ole32.dll' name 'MonikerRelativePathTo';
function MonikerCommonPrefixWith(_para1:IMoniker; _para2:IMoniker; _para3:PIMoniker):HRESULT;stdcall; external 'ole32.dll' name 'MonikerCommonPrefixWith';
{$endif wince}
function CreateBindCtx(_para1:DWORD;out _para2:IBindCtx):HRESULT;stdcall; external 'ole32.dll' name 'CreateBindCtx';
function GetClassFile(_para1:POLESTR; out _para2:TCLSID):HRESULT;stdcall; external 'ole32.dll' name 'GetClassFile';
{$ifndef wince}
function CreateGenericComposite(_para1:IMoniker; _para2:IMoniker; out _para3:IMoniker):HRESULT;stdcall; external 'ole32.dll' name 'CreateGenericComposite';
function CreateFileMoniker(_para1:POLESTR; out _para2:IMoniker):HRESULT;stdcall; external 'ole32.dll' name 'CreateFileMoniker';
function CreateItemMoniker(_para1:POLESTR; _para2:POLESTR;out _para3:IMoniker):HRESULT;stdcall; external 'ole32.dll' name 'CreateItemMoniker';
function CreateAntiMoniker(_para1:PIMoniker):HRESULT;stdcall; external 'ole32.dll' name 'CreateAntiMoniker';
function CreatePointerMoniker(_para1:IUnknown; out _para2:IMoniker):HRESULT;stdcall; external 'ole32.dll' name 'CreatePointerMoniker';
function GetRunningObjectTable(_para1:DWORD; _para2:IRunningObjectTable):HRESULT;stdcall; external 'ole32.dll' name 'GetRunningObjectTable';
function CoInitializeSecurity(_para1:PSECURITY_DESCRIPTOR; _para2:LONG; _para3:PSOLE_AUTHENTICATION_SERVICE; _para4:pointer; _para5:DWORD;
_para6:DWORD; _para7:pointer; _para8:DWORD; _para9:pointer):HRESULT;stdcall; external 'ole32.dll' name 'CoInitializeSecurity';
function CoGetCallContext(const _para1:TIID; _para2:Ppointer):HRESULT;stdcall; external 'ole32.dll' name 'CoGetCallContext';
function CoQueryProxyBlanket(_para1:IUnknown; _para2:PDWORD; _para3:PDWORD; _para4:POLESTR; _para5:PDWORD;
_para6:PDWORD; _para7:Pointer; _para8:PDWORD):HRESULT;stdcall; external 'ole32.dll' name 'CoQueryProxyBlanket';
function CoSetProxyBlanket(_para1:IUnknown; _para2:DWORD; _para3:DWORD; _para4:POLESTR; _para5:DWORD;
_para6:DWORD; _para7:pointer; _para8:DWORD):HRESULT;stdcall; external 'ole32.dll' name 'CoSetProxyBlanket';
function CoCopyProxy(_para1:IUnknown; var _para2:IUnknown):HRESULT;stdcall; external 'ole32.dll' name 'CoCopyProxy';
function CoQueryClientBlanket(_para1:PDWORD; _para2:PDWORD; _para3:POLESTR; _para4:PDWORD; _para5:PDWORD;
_para6:pointer; _para7:PDWORD):HRESULT;stdcall; external 'ole32.dll' name 'CoQueryClientBlanket';
function CoImpersonateClient:HRESULT;stdcall; external 'ole32.dll' name 'CoImpersonateClient';
function CoRevertToSelf:HRESULT;stdcall; external 'ole32.dll' name 'CoRevertToSelf';
function CoQueryAuthenticationServices(_para1:PDWORD; _para2:PSOLE_AUTHENTICATION_SERVICE):HRESULT;stdcall; external 'ole32.dll' name 'CoQueryAuthenticationServices';
function CoSwitchCallContext(_para1:IUnknown; var _para2:IUnknown):HRESULT;stdcall; external 'ole32.dll' name 'CoSwitchCallContext';
function CoGetInstanceFromFile(_para1:PCOSERVERINFO; _para2:PCLSID; _para3:IUnknown; _para4:DWORD; _para5:DWORD;
_para6:POLESTR; _para7:DWORD; _para8:PMULTI_QI):HRESULT;stdcall; external 'ole32.dll' name 'CoGetInstanceFromFile';
function CoGetInstanceFromIStorage(_para1:PCOSERVERINFO; _para2:PCLSID; _para3:IUnknown; _para4:DWORD; _para5:IStorage;
_para6:DWORD; _para7:PMULTI_QI):HRESULT;stdcall; external 'ole32.dll' name 'CoGetInstanceFromIStorage';
{$endif wince}
type
TDispID = DISPID;
TDispIDList = array[0..65535] of TDispID;
PDispIDList = ^TDispIDList;
REFIID = TIID;
TREFIID = TIID;
{$ifndef wince}
function SetErrorInfo(dwReserved:ULONG;errinfo:IErrorInfo):HResult;stdcall; external 'ole32.dll' name 'SetErrorInfo';
function GetErrorInfo(dwReserved:ULONG;out errinfo:IErrorInfo):HResult;stdcall; external 'ole32.dll' name 'GetErrorInfo';
function CreateErrorInfo(out errinfo:ICreateErrorInfo):HResult;stdcall; external 'ole32.dll' name 'CreateErrorInfo';
{$endif wince}
const
oleaut32dll = 'oleaut32.dll';
function SysAllocString(psz: pointer): TBStr; stdcall; external oleaut32dll name 'SysAllocString';
function SysAllocStringLen(psz: pointer; len:dword): Integer; stdcall; external oleaut32dll name 'SysAllocStringLen';
procedure SysFreeString(bstr:pointer); stdcall; external oleaut32dll name 'SysFreeString';
function SysStringLen(bstr:pointer):UINT; stdcall; external oleaut32dll name 'SysStringLen';
function SysStringByteLen(bstr:pointer):UINT; stdcall; external oleaut32dll name 'SysStringByteLen';
function SysReAllocString(var bstr:pointer;psz: pointer): Integer; stdcall; external oleaut32dll name 'SysReAllocString';
function SysReAllocStringLen(var bstr:pointer;psz: pointer; len:dword): Integer; stdcall; external oleaut32dll name 'SysReAllocStringLen';
{ Active object registration API }
{$ifndef wince}
const
ACTIVEOBJECT_STRONG = 0;
ACTIVEOBJECT_WEAK = 1;
function RegisterActiveObject(unk: IUnknown; const clsid: TCLSID; dwFlags: DWORD; out dwRegister: culong): HResult; stdcall; external oleaut32dll name 'RegisterActiveObject';
function RevokeActiveObject(dwRegister: culong; pvReserved: Pointer) : HResult; stdcall; external oleaut32dll name 'RevokeActiveObject';
function GetActiveObject(const clsid: TCLSID; pvReserved: Pointer; out unk: IUnknown) : HResult; stdcall; external oleaut32dll name 'GetActiveObject';
{$endif wince}
function Succeeded(Res: HResult) : Boolean;inline;
function Failed(Res: HResult) : Boolean;inline;
function ResultCode(Res: HResult) : Longint;inline;
function ResultFacility(Res: HResult): Longint;inline;
function ResultSeverity(Res: HResult): Longint;inline;
function MakeResult(Severity, Facility, Code: Longint): HResult;inline;
function LoadTypeLib(szfile : lpolestr; var pptlib: ITypelib):HResult; stdcall; external oleaut32dll name 'LoadTypeLib';
function LoadRegTypeLib(const rguid:TGUID;wVerMajor:ushort;wVerMinor:ushort;_lcid:lcid;out pptlib:ITypeLib):HResult; stdcall; external oleaut32dll name 'LoadRegTypeLib';
function RegisterTypeLib(const ptrlib :ITypeLib;szfullpath:lpolestr;szhelpdir:lpolestr):HResult; stdcall; external oleaut32dll name 'RegisterTypeLib';
function CreateTypeLib2(sysk:TSysKind;szfile:lpolestr;out ppctlib:ICreateTypeLib2):HResult; stdcall; external oleaut32dll name 'CreateTypeLib2';
function DispInvoke(this:pointer;const ptinfo: ITypeInfo;dispidMember:TDISPID;wflags:ushort;pparams:pDISPParams;var pvarresult:OLEVARIANT;pexcepinfo:EXCEPINFO;puArgErr:puint):HRESULT; stdcall; external oleaut32dll name 'CreateTypeLib2';
{$ifndef wince}
function LoadTypeLibEx(szfile : lpolestr; regk:tregkind; var pptlib: ITypelib):HResult; stdcall; external oleaut32dll name 'LoadTypeLibEx';
function QueryPathOfRegTypeLib(const guid:TGUID;wVerMajor:ushort;wVerMinor:ushort;_lcid:lcid;lpbstr:LPolestr):HResult; stdcall; external oleaut32dll name 'QueryPathOfRegTypeLib';
function UnRegisterTypeLib(const libid:TGUID; wVerMajor:ushort;wVerMinor:ushort;_lcid:lcid;sysk:TSysKind):HResult; stdcall; external oleaut32dll name 'UnRegisterTypeLib';
function CreateTypeLib(sysk:TSysKind;szfile:lpolestr;out ppctlib:ICreateTypeLib):HResult; stdcall; external oleaut32dll name 'CreateTypeLib';
function DosDateTimeToVariantTime( wDosDate: ushort; wDosTime:ushort;pvtime:pdouble):longint; stdcall; external oleaut32dll name 'DosDateTimeToVariantTime';
function VariantTimeToDosDateTime( vtime:DOUBLE;pwdosdate:PUSHORT;pwDosTime:PUSHORT):longint; stdcall; external oleaut32dll name 'VariantTimeToDosDateTime';
{$endif wince}
function SystemTimeToVariantTime(var lpsystemtime:TSystemTime;out pvtime: TOleDate):LONGINT; stdcall; external oleaut32dll name 'SystemTimeToVariantTime';
function VariantTimeToSystemTime(vtime:TOleDate; out lpsystemtime: TSystemTime):LONGINT; stdcall; external oleaut32dll name 'VariantTimeToSystemTime';
{--------------------------------------------------------------------- }
{ VARTYPE Coercion API }
{--------------------------------------------------------------------- }
{ Note: The routines that convert *from* a string are defined
* to take a OLECHAR* rather than a BSTR because no allocation is
* required, and this makes the routines a bit more generic.
* They may of course still be passed a BSTR as the strIn param.
}
function VarUI1FromI2(sIn:SHORT; var pbOut:BYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromI2';
function VarUI1FromI4(lIn:LONG; var pbOut:BYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromI4';
function VarUI1FromI8(i64In:LONG64; pbOut:PBYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromI8';
function VarUI1FromR4(fltIn:Single; var pbOut:BYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromR4';
function VarUI1FromR8(dblIn:DOUBLE; var pbOut:BYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromR8';
function VarUI1FromCy(cyIn:CY; var pbOut:BYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromCy';
function VarUI1FromDate(dateIn:DATE; var pbOut:BYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromDate';
function VarUI1FromStr(strIn:pOLECHAR; lcid:LCID; dwFlags:ULONG; var pbOut:BYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromStr';
function VarUI1FromDisp(pdispIn:IDispatch; lcid:LCID; var pbOut:BYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromDisp';
function VarUI1FromBool(boolIn:VARIANT_BOOL; var pbOut:BYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromBool';
function VarUI1FromI1(cIn:CHAR; var pbOut:BYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromI1';
function VarUI1FromUI2(uiIn:USHORT; var pbOut:BYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromUI2';
function VarUI1FromUI4(ulIn:ULONG; var pbOut:BYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromUI4';
function VarUI1FromUI8(ui64In:ULONG64; pbOut:PBYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromUI8';
function VarUI1FromDec(var pdecIn:TDecimal; var pbOut:BYTE):HResult;stdcall;external oleaut32dll name 'VarUI1FromDec';
function VarI2FromUI1(bIn:BYTE; var psOut:SHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromUI1';
function VarI2FromI4(lIn:LONG; var psOut:SHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromI4';
function VarI2FromI8(i64In:LONG64; psOut:PSHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromI8';
function VarI2FromR4(fltIn:Single; var psOut:SHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromR4';
function VarI2FromR8(dblIn:DOUBLE; var psOut:SHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromR8';
function VarI2FromCy(cyIn:CY; var psOut:SHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromCy';
function VarI2FromDate(dateIn:DATE; var psOut:SHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromDate';
function VarI2FromStr(strIn:pOLECHAR; lcid:LCID; dwFlags:ULONG; var psOut:SHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromStr';
function VarI2FromDisp(pdispIn:IDispatch; lcid:LCID; var psOut:SHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromDisp';
function VarI2FromBool(boolIn:VARIANT_BOOL; var psOut:SHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromBool';
function VarI2FromI1(cIn:CHAR; var psOut:SHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromI1';
function VarI2FromUI2(uiIn:USHORT; var psOut:SHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromUI2';
function VarI2FromUI4(ulIn:ULONG; var psOut:SHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromUI4';
function VarI2FromUI8(ui64In:ULONG64; psOut:PSHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromUI8';
function VarI2FromDec(var pdecIn:TDecimal; var psOut:SHORT):HResult;stdcall;external oleaut32dll name 'VarI2FromDec';
function VarI4FromUI1(bIn:BYTE; var plOut:LONG):HResult;stdcall;external oleaut32dll name 'VarI4FromUI1';
function VarI4FromI2(sIn:SHORT; var plOut:LONG):HResult;stdcall;external oleaut32dll name 'VarI4FromI2';
function VarI4FromI8(i64In:LONG64; plOut:PLONG):HResult;stdcall;external oleaut32dll name 'VarI4FromI8';
function VarI4FromR4(fltIn:Single; var plOut:LONG):HResult;stdcall;external oleaut32dll name 'VarI4FromR4';
function VarI4FromR8(dblIn:DOUBLE; var plOut:LONG):HResult;stdcall;external oleaut32dll name 'VarI4FromR8';
function VarI4FromCy(cyIn:CY; var plOut:LONG):HResult;stdcall;external oleaut32dll name 'VarI4FromCy';
function VarI4FromDate(dateIn:DATE; var plOut:LONG):HResult;stdcall;external oleaut32dll name 'VarI4FromDate';
function VarI4FromStr(strIn:pOLECHAR; lcid:LCID; dwFlags:ULONG; var plOut:LONG):HResult;stdcall;external oleaut32dll name 'VarI4FromStr';
function VarI4FromDisp(dispIn:IDispatch; lcid:LCID; var plOut:LONG):HResult;stdcall;external oleaut32dll name 'VarI4FromDisp';
function VarI4FromBool(boolIn:VARIANT_BOOL; var plOut:LONG):HResult;stdcall;external oleaut32dll name 'VarI4FromBool';
function VarI4FromI1(cIn:CHAR; var plOut:LONG):HResult;stdcall;external oleaut32dll name 'VarI4FromI1';
function VarI4FromUI2(uiIn:USHORT; var plOut:LONG):HResult;stdcall;external oleaut32dll name 'VarI4FromUI2';
function VarI4FromUI4(ulIn:ULONG; var plOut:LONG):HResult;stdcall;external oleaut32dll name 'VarI4FromUI4';
function VarI4FromUI8(ui64In:ULONG64; plOut:PLONG):HResult;stdcall;external oleaut32dll name 'VarI4FromUI8';
function VarI4FromDec(var pdecIn:TDecimal; var plOut:LONG):HResult;stdcall;external oleaut32dll name 'VarI4FromDec';
function VarI4FromInt(intIn:cint; var plOut:LONG):HResult;stdcall;external oleaut32dll name 'VarI4FromInt';
function VarI8FromUI1(bIn:BYTE; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromUI1';
function VarI8FromI2(sIn:SHORT; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromI2';
function VarI8FromI4(lIn:LONG; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromI4';
function VarI8FromR4(fltIn:Single; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromR4';
function VarI8FromR8(dblIn:DOUBLE; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromR8';
function VarI8FromCy(cyIn:CY; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromCy';
function VarI8FromDate(dateIn:DATE; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromDate';
function VarI8FromStr(strIn:POLECHAR; lcid:LCID; dwFlags:dword; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromStr';
function VarI8FromDisp(pdispIn:IDispatch; lcid:LCID; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromDisp';
function VarI8FromBool(boolIn:VARIANT_BOOL; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromBool';
function VarI8FromI1(cIn:CHAR; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromI1';
function VarI8FromUI2(uiIn:USHORT; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromUI2';
function VarI8FromUI4(ulIn:ULONG; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromUI4';
function VarI8FromUI8(ui64In:ULONG64; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromUI8';
function VarI8FromDec(var pdecIn:TDecimal; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromDec';
function VarI8FromInt(intIn:cint; pi64Out:PLONG64):HResult;stdcall;external oleaut32dll name 'VarI8FromInt';
{******************* }
function VarR4FromUI1(bIn:BYTE; var pfltOut:Single):HResult;stdcall;external oleaut32dll name 'VarR4FromUI1';
function VarR4FromI2(sIn:SHORT; var pfltOut:Single):HResult;stdcall;external oleaut32dll name 'VarR4FromI2';
function VarR4FromI4(lIn:LONG; var pfltOut:Single):HResult;stdcall;external oleaut32dll name 'VarR4FromI4';
function VarR4FromI8(i64In:LONG64; pfltOut:PSingle):HResult;stdcall;external oleaut32dll name 'VarR4FromI8';
function VarR4FromR8(dblIn:DOUBLE; var pfltOut:Single):HResult;stdcall;external oleaut32dll name 'VarR4FromR8';
function VarR4FromCy(cyIn:CY; var pfltOut:Single):HResult;stdcall;external oleaut32dll name 'VarR4FromCy';
function VarR4FromDate(dateIn:DATE; var pfltOut:Single):HResult;stdcall;external oleaut32dll name 'VarR4FromDate';
function VarR4FromStr(strIn:pOLECHAR; lcid:LCID; dwFlags:ULONG; var pfltOut:Single):HResult;stdcall;external oleaut32dll name 'VarR4FromStr';
function VarR4FromDisp(pdispIn:IDispatch; lcid:LCID; var pfltOut:Single):HResult;stdcall;external oleaut32dll name 'VarR4FromDisp';
function VarR4FromBool(boolIn:VARIANT_BOOL; var pfltOut:Single):HResult;stdcall;external oleaut32dll name 'VarR4FromBool';
function VarR4FromI1(cIn:CHAR; var pfltOut:Single):HResult;stdcall;external oleaut32dll name 'VarR4FromI1';
function VarR4FromUI2(uiIn:USHORT; var pfltOut:Single):HResult;stdcall;external oleaut32dll name 'VarR4FromUI2';
function VarR4FromUI4(ulIn:ULONG; var pfltOut:Single):HResult;stdcall;external oleaut32dll name 'VarR4FromUI4';
function VarR4FromUI8(ui64In:ULONG64; pfltOut:PSingle):HResult;stdcall;external oleaut32dll name 'VarR4FromUI8';
function VarR4FromDec(var pdecIn:TDecimal; var pfltOut:Single):HResult;stdcall;external oleaut32dll name 'VarR4FromDec';
function VarR8FromUI1(bIn:BYTE; var pdblOut:DOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromUI1';
function VarR8FromI2(sIn:SHORT; var pdblOut:DOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromI2';
function VarR8FromI4(lIn:LONG; var pdblOut:DOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromI4';
function VarR8FromI8(i64In:LONG64; pdblOut:PDOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromI8';
function VarR8FromR4(fltIn:Single; var pdblOut:DOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromR4';
function VarR8FromCy(cyIn:CY; var pdblOut:DOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromCy';
function VarR8FromDate(dateIn:DATE; var pdblOut:DOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromDate';
function VarR8FromStr(strIn:pOLECHAR; lcid:LCID; dwFlags:ULONG; var pdblOut:DOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromStr';
function VarR8FromDisp(pdispIn:IDispatch; lcid:LCID; var pdblOut:DOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromDisp';
function VarR8FromBool(boolIn:VARIANT_BOOL; var pdblOut:DOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromBool';
function VarR8FromI1(cIn:CHAR; var pdblOut:DOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromI1';
function VarR8FromUI2(uiIn:USHORT; var pdblOut:DOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromUI2';
function VarR8FromUI4(ulIn:ULONG; var pdblOut:DOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromUI4';
function VarR8FromUI8(ui64In:ULONG64; pdblOut:PDOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromUI8';
function VarR8FromDec(var pdecIn:TDecimal; var pdblOut:DOUBLE):HResult;stdcall;external oleaut32dll name 'VarR8FromDec';
function VarDateFromUI1(bIn:BYTE; var pdateOut:DATE):HResult;stdcall;external oleaut32dll name 'VarDateFromUI1';
function VarDateFromI2(sIn:SHORT; var pdateOut:DATE):HResult;stdcall;external oleaut32dll name 'VarDateFromI2';
function VarDateFromI4(lIn:LONG; var pdateOut:DATE):HResult;stdcall;external oleaut32dll name 'VarDateFromI4';
function VarDateFromI8(i64In:LONG64; pdateOut:PDATE):HResult;stdcall;external oleaut32dll name 'VarDateFromI8';
function VarDateFromR4(fltIn:Single; var pdateOut:DATE):HResult;stdcall;external oleaut32dll name 'VarDateFromR4';
function VarDateFromR8(dblIn:DOUBLE; var pdateOut:DATE):HResult;stdcall;external oleaut32dll name 'VarDateFromR8';
function VarDateFromCy(cyIn:CY; var pdateOut:DATE):HResult;stdcall;external oleaut32dll name 'VarDateFromCy';
function VarDateFromStr(strIn:pOLECHAR; lcid:LCID; dwFlags:ULONG; var pdateOut:DATE):HResult;stdcall;external oleaut32dll name 'VarDateFromStr';
function VarDateFromDisp(pdispIn:IDispatch; lcid:LCID; var pdateOut:DATE):HResult;stdcall;external oleaut32dll name 'VarDateFromDisp';
function VarDateFromBool(boolIn:VARIANT_BOOL; var pdateOut:DATE):HResult;stdcall;external oleaut32dll name 'VarDateFromBool';
function VarDateFromI1(cIn:CHAR; var pdateOut:DATE):HResult;stdcall;external oleaut32dll name 'VarDateFromI1';
function VarDateFromUI2(uiIn:USHORT; var pdateOut:DATE):HResult;stdcall;external oleaut32dll name 'VarDateFromUI2';
function VarDateFromUI4(ulIn:ULONG; var pdateOut:DATE):HResult;stdcall;external oleaut32dll name 'VarDateFromUI4';
function VarDateFromUI8(ui64In:ULONG64; pdateOut:PDATE):HResult;stdcall;external oleaut32dll name 'VarDateFromUI8';
function VarDateFromDec(var pdecIn:TDecimal; var pdateOut:DATE):HResult;stdcall;external oleaut32dll name 'VarDateFromDec';
function VarCyFromUI1(bIn:BYTE; var pcyOut:CY):HResult;stdcall;external oleaut32dll name 'VarCyFromUI1';
function VarCyFromI2(sIn:SHORT; var pcyOut:CY):HResult;stdcall;external oleaut32dll name 'VarCyFromI2';
function VarCyFromI4(lIn:LONG; var pcyOut:CY):HResult;stdcall;external oleaut32dll name 'VarCyFromI4';
function VarCyFromI8(i64In:LONG64; pcyOut:PCurrency):HResult;stdcall;external oleaut32dll name 'VarCyFromI8';
function VarCyFromR4(fltIn:Single; var pcyOut:CY):HResult;stdcall;external oleaut32dll name 'VarCyFromR4';
function VarCyFromR8(dblIn:DOUBLE; var pcyOut:CY):HResult;stdcall;external oleaut32dll name 'VarCyFromR8';
function VarCyFromDate(dateIn:DATE; var pcyOut:CY):HResult;stdcall;external oleaut32dll name 'VarCyFromDate';
function VarCyFromStr(strIn:pOLECHAR; lcid:LCID; dwFlags:ULONG; var pcyOut:CY):HResult;stdcall;external oleaut32dll name 'VarCyFromStr';
function VarCyFromDisp(pdispIn:IDispatch; lcid:LCID; var pcyOut:CY):HResult;stdcall;external oleaut32dll name 'VarCyFromDisp';
function VarCyFromBool(boolIn:VARIANT_BOOL; var pcyOut:CY):HResult;stdcall;external oleaut32dll name 'VarCyFromBool';
function VarCyFromI1(cIn:CHAR; var pcyOut:CY):HResult;stdcall;external oleaut32dll name 'VarCyFromI1';
function VarCyFromUI2(uiIn:USHORT; var pcyOut:CY):HResult;stdcall;external oleaut32dll name 'VarCyFromUI2';
function VarCyFromUI4(ulIn:ULONG; var pcyOut:CY):HResult;stdcall;external oleaut32dll name 'VarCyFromUI4';
function VarCyFromUI8(ui64In:ULONG64; pcyOut:PCurrency):HResult;stdcall;external oleaut32dll name 'VarCyFromUI8';
function VarCyFromDec(var pdecIn:TDecimal; var pcyOut:CY):HResult;stdcall;external oleaut32dll name 'VarCyFromDec';
function VarBstrFromUI1(bVal:BYTE; lcid:LCID; dwFlags:ULONG; var pbstrOut:BSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromUI1';
function VarBstrFromI2(iVal:SHORT; lcid:LCID; dwFlags:ULONG; var pbstrOut:BSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromI2';
function VarBstrFromI4(lIn:LONG; lcid:LCID; dwFlags:ULONG; var pbstrOut:BSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromI4';
function VarBstrFromI8(i64In:LONG64; lcid:LCID; dwFlags:dword; pbstrOut:PBSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromI8';
function VarBstrFromR4(fltIn:Single; lcid:LCID; dwFlags:ULONG; var pbstrOut:BSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromR4';
function VarBstrFromR8(dblIn:DOUBLE; lcid:LCID; dwFlags:ULONG; var pbstrOut:BSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromR8';
function VarBstrFromCy(cyIn:CY; lcid:LCID; dwFlags:ULONG; var pbstrOut:BSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromCy';
function VarBstrFromDate(dateIn:DATE; lcid:LCID; dwFlags:ULONG; var pbstrOut:BSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromDate';
function VarBstrFromDisp(pdispIn:IDispatch; lcid:LCID; dwFlags:ULONG; var pbstrOut:BSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromDisp';
function VarBstrFromBool(boolIn:VARIANT_BOOL; lcid:LCID; dwFlags:ULONG; var pbstrOut:BSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromBool';
function VarBstrFromI1(cIn:CHAR; lcid:LCID; dwFlags:ULONG; var pbstrOut:BSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromI1';
function VarBstrFromUI2(uiIn:USHORT; lcid:LCID; dwFlags:ULONG; var pbstrOut:BSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromUI2';
function VarBstrFromUI4(ulIn:ULONG; lcid:LCID; dwFlags:ULONG; var pbstrOut:BSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromUI4';
function VarBstrFromUI8(ui64In:ULONG64; lcid:LCID; dwFlags:dword; pbstrOut:PBSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromUI8';
function VarBstrFromDec(var pdecIn:TDecimal; lcid:LCID; dwFlags:ULONG; var pbstrOut:BSTR):HResult;stdcall;external oleaut32dll name 'VarBstrFromDec';
function VarBoolFromUI1(bIn:BYTE; var pboolOut:VARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromUI1';
function VarBoolFromI2(sIn:SHORT; var pboolOut:VARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromI2';
function VarBoolFromI4(lIn:LONG; var pboolOut:VARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromI4';
function VarBoolFromI8(i64In:LONG64; pboolOut:PVARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromI8';
function VarBoolFromR4(fltIn:Single; var pboolOut:VARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromR4';
function VarBoolFromR8(dblIn:DOUBLE; var pboolOut:VARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromR8';
function VarBoolFromDate(dateIn:DATE; var pboolOut:VARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromDate';
function VarBoolFromCy(cyIn:CY; var pboolOut:VARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromCy';
function VarBoolFromStr(strIn:pOLECHAR; lcid:LCID; dwFlags:ULONG; var pboolOut:VARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromStr';
function VarBoolFromDisp(pdispIn:IDispatch; lcid:LCID; var pboolOut:VARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromDisp';
function VarBoolFromI1(cIn:CHAR; var pboolOut:VARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromI1';
function VarBoolFromUI2(uiIn:USHORT; var pboolOut:VARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromUI2';
function VarBoolFromUI4(ulIn:ULONG; var pboolOut:VARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromUI4';
function VarBoolFromUI8(i64In:ULONG64; pboolOut:PVARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromUI8';
function VarBoolFromDec(var pdecIn:TDecimal; var pboolOut:VARIANT_BOOL):HResult;stdcall;external oleaut32dll name 'VarBoolFromDec';
function VarI1FromUI1(bIn:BYTE; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromUI1';
function VarI1FromI2(uiIn:SHORT; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromI2';
function VarI1FromI4(lIn:LONG; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromI4';
function VarI1FromI8(i64In:LONG64; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromI8';
function VarI1FromR4(fltIn:Single; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromR4';
function VarI1FromR8(dblIn:DOUBLE; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromR8';
function VarI1FromDate(dateIn:DATE; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromDate';
function VarI1FromCy(cyIn:CY; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromCy';
function VarI1FromStr(strIn:pOLECHAR; lcid:LCID; dwFlags:ULONG; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromStr';
function VarI1FromDisp(pdispIn:IDispatch; lcid:LCID; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromDisp';
function VarI1FromBool(boolIn:VARIANT_BOOL; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromBool';
function VarI1FromUI2(uiIn:USHORT; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromUI2';
function VarI1FromUI4(ulIn:ULONG; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromUI4';
function VarI1FromUI8(i64In:ULONG64; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromUI8';
function VarI1FromDec(var pdecIn:TDecimal; pcOut:pCHAR):HResult;stdcall;external oleaut32dll name 'VarI1FromDec';
function VarUI2FromUI1(bIn:BYTE; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromUI1';
function VarUI2FromI2(uiIn:SHORT; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromI2';
function VarUI2FromI4(lIn:LONG; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromI4';
function VarUI2FromI8(i64In:LONG64; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromI8';
function VarUI2FromR4(fltIn:Single; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromR4';
function VarUI2FromR8(dblIn:DOUBLE; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromR8';
function VarUI2FromDate(dateIn:DATE; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromDate';
function VarUI2FromCy(cyIn:CY; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromCy';
function VarUI2FromStr(strIn:pOLECHAR; lcid:LCID; dwFlags:ULONG; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromStr';
function VarUI2FromDisp(pdispIn:IDispatch; lcid:LCID; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromDisp';
function VarUI2FromBool(boolIn:VARIANT_BOOL; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromBool';
function VarUI2FromI1(cIn:CHAR; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromI1';
function VarUI2FromUI4(ulIn:ULONG; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromUI4';
function VarUI2FromUI8(i64In:ULONG64; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromUI8';
function VarUI2FromDec(var pdecIn:TDecimal; var puiOut:USHORT):HResult;stdcall;external oleaut32dll name 'VarUI2FromDec';
function VarUI4FromUI1(bIn:BYTE; var pulOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromUI1';
function VarUI4FromI2(uiIn:SHORT; var pulOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromI2';
function VarUI4FromI4(lIn:LONG; var pulOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromI4';
function VarUI4FromI8(i64In:LONG64; var plOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromI8';
function VarUI4FromR4(fltIn:Single; var pulOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromR4';
function VarUI4FromR8(dblIn:DOUBLE; var pulOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromR8';
function VarUI4FromDate(dateIn:DATE; var pulOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromDate';
function VarUI4FromCy(cyIn:CY; var pulOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromCy';
function VarUI4FromStr(strIn:pOLECHAR; lcid:LCID; dwFlags:ULONG; var pulOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromStr';
function VarUI4FromDisp(pdispIn:IDispatch; lcid:LCID; var pulOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromDisp';
function VarUI4FromBool(boolIn:VARIANT_BOOL; var pulOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromBool';
function VarUI4FromI1(cIn:CHAR; var pulOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromI1';
function VarUI4FromUI2(uiIn:USHORT; var pulOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromUI2';
function VarUI4FromUI8(ui64In:ULONG64; var plOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromUI8';
function VarUI4FromDec(var pdecIn:TDecimal; var pulOut:ULONG):HResult;stdcall;external oleaut32dll name 'VarUI4FromDec';
{**************************************** }
function VarUI8FromUI1(bIn:BYTE; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromUI1';
function VarUI8FromI2(sIn:SHORT; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromI2';
function VarUI8FromI4(lIn:LONG; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromI4';
function VarUI8FromI8(ui64In:LONG64; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromI8';
function VarUI8FromR4(fltIn:Single; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromR4';
function VarUI8FromR8(dblIn:DOUBLE; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromR8';
function VarUI8FromCy(cyIn:CY; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromCy';
function VarUI8FromDate(dateIn:DATE; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromDate';
function VarUI8FromStr(strIn:POLECHAR; lcid:LCID; dwFlags:dword; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromStr';
function VarUI8FromDisp(pdispIn:IDispatch; lcid:LCID; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromDisp';
function VarUI8FromBool(boolIn:VARIANT_BOOL; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromBool';
function VarUI8FromI1(cIn:CHAR; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromI1';
function VarUI8FromUI2(uiIn:USHORT; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromUI2';
function VarUI8FromUI4(ulIn:ULONG; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromUI4';
function VarUI8FromDec(var pdecIn:TDecimal; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromDec';
function VarUI8FromInt(intIn:cint; pi64Out:PULONG64):HResult;stdcall;external oleaut32dll name 'VarUI8FromInt';
implementation
function Succeeded(Res: HResult) : Boolean;inline;
begin
Result := Res and $80000000 = 0;
end;
function Failed(Res: HResult) : Boolean;inline;
begin
Result := Res and $80000000 <> 0;
end;
function ResultCode(Res: HResult) : Longint;inline;
begin
Result := Res and $0000FFFF;
end;
function ResultFacility(Res: HResult): Longint;inline;
begin
Result := (Res shr 16) and $00001FFF;
end;
function ResultSeverity(Res: HResult): Longint;inline;
begin
Result := Res shr 31;
end;
function MakeResult(Severity, Facility, Code: Longint): HResult;inline;
begin
Result := (Severity shl 31) or (Facility shl 16) or Code;
end;
end.
|