download activex.pp
Language: NonCode
LOC: 0
Project Info
FreePascal
Server: FreePascal
Type: zip
...rc\packages\extra\winunits\
   activex.pp
   buildjwa.pp
   commctrl.pp
   comobj.pp
   jedi.inc
   jediapilib.inc
   jwaaccctrl.pas
   jwaaclapi.pas
   jwaaclui.pas
   jwaactiveds.pas
   jwaadsdb.pas
   jwaadserr.pas
   jwaadshlp.pas
   jwaadsnms.pas
   jwaadsprop.pas
   jwaadssts.pas
   jwaadstlb.pas
   jwaadtgen.pas
   jwaaf_irda.pas
   jwaatalkwsh.pas
   jwaauthif.pas
   jwaauthz.pas
   jwabatclass.pas
   jwabits.pas
   jwabits1_5.pas
   jwabitscfg.pas
   jwabitsmsg.pas
   jwablberr.pas
   jwabluetoothapis.pas
   jwabthdef.pas
   jwabthsdpdef.pas
   jwabugcodes.pas
   jwacderr.pas
   jwacmnquery.pas
   jwacolordlg.pas
   jwacpl.pas
   jwacplext.pas
   jwacryptuiapi.pas
   jwadbt.pas
   jwadde.pas
   jwadhcpcsdk.pas
   jwadhcpsapi.pas
   jwadhcpssdk.pas
   jwadlgs.pas
   jwadsadmin.pas
   jwadsclient.pas
   jwadsgetdc.pas
   jwadskquota.pas
   jwadsquery.pas
   jwadsrole.pas
   jwadssec.pas
   jwaerrorrep.pas
   jwaexcpt.pas
   jwafaxdev.pas
   jwafaxext.pas
   jwafaxmmc.pas
   jwafaxroute.pas
   jwagpedit.pas
   jwahherror.pas
   jwahtmlGuid.pas
   jwahtmlhelp.pas
   jwaiaccess.pas
   jwaiadmext.pas
   jwaicmpapi.pas
   jwaiiscnfg.pas
   jwaimagehlp.pas
   jwaimapi.pas
   jwaimapierror.pas
   jwaime.pas
   jwaioevent.pas
   jwaipexport.pas
   jwaiphlpapi.pas
   jwaipifcons.pas
   jwaipinfoid.pas
   jwaiprtrmib.pas
   jwaiptypes.pas
   jwaisguids.pas
   jwaissper16.pas
   jwalmaccess.pas
   jwalmalert.pas
   jwalmapibuf.pas
   jwalmat.pas
   jwalmaudit.pas
   jwalmconfig.pas
   jwalmcons.pas
   jwalmdfs.pas
   jwalmerr.pas
   jwalmerrlog.pas
   jwalmjoin.pas
   jwalmmsg.pas
   jwalmremutl.pas
   jwalmrepl.pas
   jwalmserver.pas
   jwalmshare.pas
   jwalmsname.pas
   jwalmstats.pas
   jwalmsvc.pas
   jwalmuse.pas
   jwalmuseflg.pas
   jwalmwksta.pas
   jwaloadperf.pas
   jwalpmapi.pas
   jwamciavi.pas
   jwamprerror.pas
   jwamsi.pas
   jwamsidefs.pas
   jwamsiquery.pas
   jwamstask.pas
   jwamstcpip.pas
   jwamswsock.pas
   jwanative.pas
   jwanb30.pas
   jwanetsh.pas
   jwanspapi.pas
   jwantddpar.pas
   jwantdsapi.pas
   jwantdsbcli.pas
   jwantdsbmsg.pas
   jwantldap.pas
   jwantquery.pas
   jwantsecapi.pas
   jwantstatus.pas
   jwaObjsel.pas
   jwapatchapi.pas
   jwapatchwiz.pas
   jwapbt.pas
   jwapdh.pas
   jwapdhmsg.pas
   jwapowrprof.pas
   jwaprofinfo.pas
   jwaprotocol.pas
   jwaprsht.pas
   jwapsapi.pas
   jwaqos.pas
   jwaqosname.pas
   jwaqospol.pas
   jwaqossp.pas
   jwareason.pas
   jwaregstr.pas
   jwarpc.pas
   jwarpcasync.pas
   jwarpcdce.pas
   jwarpcnsi.pas
   jwarpcnterr.pas
   jwarpcssl.pas
   jwascesvc.pas
   jwaschedule.pas
   jwaschemadef.pas
   jwasddl.pas
   jwasecext.pas
   jwasecurity.pas
   jwasens.pas
   jwasensapi.pas
   jwasensevts.pas
   jwasfc.pas
   jwashlguid.pas
   jwasisbkup.pas
   jwasnmp.pas
   jwasporder.pas
   jwasrrestoreptapi.pas
   jwasspi.pas
   jwasubauth.pas
   jwasvcguid.pas
   jwatlhelp32.pas
   jwatmschema.pas
   jwatraffic.pas
   jwauserenv.pas
   jwauxtheme.pas
   jwawbemcli.pas
   jwawinable.pas
   jwawinber.pas
   jwawincon.pas
   jwawincpl.pas
   jwawincred.pas
   jwawindns.pas
   jwawinefs.pas
   jwawinfax.pas
   jwawingdi.pas
   jwawinioctl.pas
   jwawinldap.pas
   jwawinnetwk.pas
   jwawinnls.pas
   jwawinnt.pas
   jwawinperf.pas
   jwawinreg.pas
   jwawinresrc.pas
   jwawinsafer.pas
   jwawinsock.pas
   jwawinsock2.pas
   jwawinsvc.pas
   jwawintype.pas
   jwawinver.pas
   jwawinwlx.pas
   jwawmistr.pas
   jwawownt16.pas
   jwawownt32.pas
   jwawpapi.pas
   jwawpapimsg.pas
   jwawpcrsmsg.pas
   jwawpftpmsg.pas
   jwawppstmsg.pas
   jwawpspihlp.pas
   jwawptypes.pas
   jwawpwizmsg.pas
   jwaws2atm.pas
   jwaws2bth.pas
   jwaws2dnet.pas
   jwaws2spi.pas
   jwaws2tcpip.pas
   jwawshisotp.pas
   jwawsipx.pas
   jwawsnetbs.pas
   jwawsnwlink.pas
   jwawsrm.pas
   jwawsvns.pas
   jwawtsapi32.pas
   jwazmouse.pas
   Makefile.fpc
   mmsystem.pp
   ole2.pp
   shellapi.pp
   shfolder.pp
   shlobj.pp
   winver.pp

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
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,types;


type
{ extra types }
   TOleChar = Types.TOleChar;
   POleStr = Types.POleStr;
   PPOleStr = Types.PPOleStr;
   TBStr = POleStr;
   PBStr = ^TBStr;
   TOleEnum = type LongWord;

{Glue types, should be linked to the proper windows unit types}
TYPE
     Size_t              = DWord;       {??, probably, like Unix, typecastable to pointer?!?}
     OleChar             = WChar;
     LPOLESTR            = ^OLECHAR;

     // 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;

// 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;


    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;

TYPE
    VARTYPE             = USHORT;

//TypeInfo stuff.

    DISPID              = Long ;
    SCODE               = Long;
    pSCODE              = ^SCODE;
    lpDISPID            = ^DISPID;
    MEMBERID            = DispId;
    HREFTYPE            = DWord;


// Enums
    VARKIND             = DWord;
    DESCKIND            = DWord;
    SYSKIND             = DWord;
    FUNCKIND            = DWord;
    CHANGEKIND          = DWord;
    CALLCONV            = DWord;

    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: pointer {IUnknown};                // get these out (you must set to NULL before calling)
                          hr : Hresult;
                          END;
   MULTI_QI            = TagMULTI_QI;
   PMulti_QI           = PMultiQI;


   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;

   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                   = record
                                    pwcsName      : POleStr;
                                    dwType        : DWord;
                                    cbSize        : ULarge_integer;
                                    mtime         : TFileTime;
                                    ctime         : TFileTime;
                                    atime         : TFileTime;
                                    grfMode       : DWord;
                                    grfLocksSupported : DWord;
                                    clsid         : TCLSID;
                                    grfStateBits  : DWord;
                                    reserved      : DWord;
                                    end;

   TStatStg                     = tagSTATSTG;
   PStatStg                     = ^TStatStg;
   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;

// 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;
   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;
  tagDISPPARAMS                 = Record
                                   rgvarg            : lpVARIANTARG;
                                   rgdispidNamedArgs : lpDISPID;
                                   cArgs,
                                   cNamedArgs        : UINT;
                                   End;
  DISPPARAMS                    = tagDISPPARAMS;
  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  : DWord;    // 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,
                                    pfnDeferredFillIn : pULONG;
                                    SCODE          : scode;
                                    End;

  EXCEPINFO                     =  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;

  tagTLIBATTR                    = Record
                                     GUID        : guid;
                                     LCID        : lcid;
                                     SYSKIND     : syskind;
                                     wMajorVerNum,
                                     wMinorVerNum,
                                     wLibFlags   : Word
                                     End;

  TLIBATTR                       = tagTLIBATTR;
  LPTLIBATTR                     = ^tagTLIBATTR;

  LPFUNCDESC                     = ^FUNCDESC;

  tagFUNCDESC                    = Record
                                     memid             : MEMBERID;
                                     lprgscode         : pSCODE;
                                     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;

//  CURRENCY                       = CY;


// Forward interfaces.

   IStream             = Interface;
   IMoniker            = Interface;
   IEnumMoniker        = Interface;
   IEnumString         = Interface;
   IRunningObjectTable = Interface;
   IStorage            = Interface;
   IEnumSTATSTG        = Interface;
   IAdviseSink         = Interface;
   IBindCtx            = Interface;
   IAsyncManager       = Interface;
   ICallFactory        = Interface;
   ISynchronize        = Interface;
   ITypeLib            = Interface;

// 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;


// 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(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:IUnknown;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(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; RiidResult:TIID;Out vresult):HResult;StdCall;
//    Function RemoteBindToObject (const pbc:IBindCtx;const mktoleft:IMoniker;RiidResult:TIID;Out vresult):HResult;StdCall;
      Function BindToStorage(Const Pbc:IBindCtx;Const mktoLeft:IMoniker; Riid:TIID;Out vobj):HResult; StdCall;
//    Function RemoteBindToStorage(Const Pbc:IBindCtx;Const mktoLeft:IMoniker; 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:IMoniker;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 IsSystemMonitor(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 = interface(IUnknown)
       ['{0c733a30-2a1c-11ce-ade5-00aa0044773d}']
       function Read(pv : Pointer;cb : DWord;pcbRead : PDWord) : HRESULT;stdcall;
       function Write(pv : Pointer;cb : DWord;pcbWritten : PDWord): HRESULT;stdcall;
       end;

    IStream = interface(ISequentialStream)
       ['{0000000C-0000-0000-C000-000000000046}']
       function Seek(dlibMove : Large_integer; dwOrigin: Longint;
            out libNewPosition : Large_Integer): HResult; stdcall;
       function SetSize(libNewSize : Large_Integer) : HRESULT;stdcall;
       function CopyTo(stm: IStream;cb : Large_Integer;out cbRead : Large_Integer;
            out cbWritten: Large_Integer) : HRESULT;stdcall;
       function Commit(grfCommitFlags : Longint) : HRESULT; stdcall;
       function Revert : HRESULT; stdcall;
       function LockRegion(libOffset : Large_Integer;cb : Large_Integer;
            dwLockType: Longint) : HRESULT;stdcall;
       function UnlockRegion(libOffset: Large_Integer;cb: Large_Integer;
            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;Out pceltFetched:ULong):HResult; StdCall;
//     Function RemoteNext(Celt:ULong;Out Rgelt:FormatEtc;Out pceltFetched:ULong):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;Out pceltFetched:ULong):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 GetCanonicalFormatTEtc(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 EnumDAvise(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;Out lpcFetched : ULong):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;Out lpcFetched : ULong):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; OUT pCeltFetched: ULONG):HResult;StdCall;
     {$else}
      Function  Next(celt: ULONG; OUT rgVar: VARIANT; OUT pCeltFetched: ULONG):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; OUT rgBstrNames: WideString; 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; OUT rgBstrNames: WideString; 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;
     {$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(Const pTypeAttr: TypeAttr); StdCall;
     {$else}
      Function  ReleaseTypeAttr():HResult;StdCall;
     {$endif}

     {$ifndef Call_as}
      Procedure ReleaseFuncDesc(const pFuncDesc : FUNCDESC); StdCall;
     {$else}
      Function  LocalReleaseFuncDesc():HResult;StdCall;
     {$endif}
     {$ifndef Call_as}
      Procedure ReleaseVarDesc(Const pVarDesc : VarDesc);
     {$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; OUT pbstrHelpString: WideString; OUT pdwHelpStringContext: DWORD; OUT pbstrHelpStringDll: WideString):HResult;StdCall;
     {$else}
      Function  GetDocumentation2(memid: MEMBERID; lcid: LCID; refPtrFlags: DWORD; OUT pbstrHelpString: WideString; OUT pdwHelpStringContext: DWORD; OUT pbstrHelpStringDll: WideString):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; OUT pBstrName: WideString; OUT pBstrDocString: WideString; OUT pdwHelpContext: DWORD; OUT pBstrHelpFile: WideString):HResult;StdCall;
     {$else}
     Function  GetDocumentation(index: WINT; refPtrFlags: DWORD; OUT pBstrName: WideString; OUT pBstrDocString: WideString; OUT pdwHelpContext: DWORD; OUT pBstrHelpFile: WideString):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(Const pTLibAttr : TLIBATTR); 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; OUT pbstrHelpString: WideString; OUT pdwHelpStringContext: DWORD; OUT pbstrHelpStringDll: WideString):HResult;StdCall;
     {$else}
     Function  GetDocumentation2(index: WINT; lcid: LCID; refPtrFlags: DWORD; OUT pbstrHelpString: WideString; OUT pdwHelpStringContext: DWORD; OUT pbstrHelpStringDll: WideString):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; OUT pceltFetched: UINT):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;


{ ******************************************************************************************************************
                                                          stuff from objbase.h
  ****************************************************************************************************************** }

{ redefinitions }
  function CoCreateGuid(out _para1:TGUID):HRESULT;stdcall;external 'ole32.dll' name 'CoCreateGuid';

{ additional definitions }

  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';

{ 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): 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;

  tagOIFI = record
    cb: UINT;
    fMDIApp: BOOL;
    hwndFrame: HWND;
    haccel: HAccel;
    cAccelEntries: UINT;
  end;
  TOleInPlaceFrameInfo = tagOIFI;
  POleInPlaceFrameInfo = ^TOleInPlaceFrameInfo;
  OLEINPLACEFRAMEINFO = tagOIFI;

{ ole2.h }

  type
    WINOLEAPI = HResult;
    TLCID = DWORD;

  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  }

  function OleBuildVersion:DWORD;cdecl;external 'ole32.dll' name 'OleBuildVersion';

  { helper functions  }
  function ReadClassStg(pStg:IStorage; pclsid:PCLSID):WINOLEAPI;cdecl;external 'ole32.dll' name 'ReadClassStg';

  function WriteClassStg(pStg:IStorage;const rclsid:TLCID):WINOLEAPI;cdecl;external 'ole32.dll' name 'WriteClassStg';

  function ReadClassStm(pStm:IStream; pclsid:PCLSID):WINOLEAPI;cdecl;external 'ole32.dll' name 'ReadClassStm';

  function WriteClassStm(pStm:IStream;const rclsid:TLCID):WINOLEAPI;cdecl;external 'ole32.dll' name 'WriteClassStm';

  function WriteFmtUserTypeStg(pstg:IStorage; cf:CLIPFORMAT; lpszUserType:LPOLESTR):WINOLEAPI;cdecl;external 'ole32.dll' name 'WriteFmtUserTypeStg';

  function ReadFmtUserTypeStg(pstg:IStorage; pcf:PCLIPFORMAT;out lplpszUserType:POleStr):WINOLEAPI;cdecl;external 'ole32.dll' name 'ReadFmtUserTypeStg';

  { init/term  }
  function OleInitialize(pvReserved:LPVOID):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleInitialize';

  procedure OleUninitialize;cdecl;external 'ole32.dll' name 'OleUninitialize';

  { APIs to query whether (Embedded/Linked) object can be created from
     the data object  }
  function OleQueryLinkFromData(pSrcDataObject:IDataObject):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleQueryLinkFromData';

  function OleQueryCreateFromData(pSrcDataObject:IDataObject):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleQueryCreateFromData';

  { Object creation APIs  } function OleCreate(const rclsid:TLCID; const riid:TIID;
  renderopt:DWORD; pFormatEtc:LPFORMATETC; pClientSite:IOleClientSite;
  pStg:IStorage; out ppvObj):WINOLEAPI;cdecl;external 'ole32.dll' name
  'OleCreate';

  function OleCreateEx(const rclsid:TLCID; const riid:TIID; dwFlags:DWORD; renderopt:DWORD; cFormats:ULONG;
             rgAdvf:PDWORD; rgFormatEtc:LPFORMATETC; lpAdviseSink:IAdviseSink; rgdwConnection:PDWORD; pClientSite:IOleClientSite;
             pStg:IStorage; out ppvObj):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleCreateEx';

  function OleCreateFromData(pSrcDataObj:IDataObject; const riid:TIID; renderopt:DWORD; pFormatEtc:LPFORMATETC; pClientSite:IOleClientSite;
             pStg:IStorage; out ppvObj):WINOLEAPI;cdecl;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;cdecl;external 'ole32.dll' name 'OleCreateFromDataEx';

  function OleCreateLinkFromData(pSrcDataObj:IDataObject; const riid:TIID; renderopt:DWORD; pFormatEtc:LPFORMATETC; pClientSite:IOleClientSite;
             pStg:IStorage; out ppvObj):WINOLEAPI;cdecl;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;cdecl;external 'ole32.dll' name 'OleCreateLinkFromDataEx';

  function OleCreateStaticFromData(pSrcDataObj:IDataObject; const iid:TIID; renderopt:DWORD; pFormatEtc:LPFORMATETC; pClientSite:IOleClientSite;
             pStg:IStorage; out ppvObj):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleCreateStaticFromData';

  function OleCreateLink(pmkLinkSrc:IMoniker; constriid:TIID; renderopt:DWORD; lpFormatEtc:LPFORMATETC; pClientSite:IOleClientSite;
             pStg:IStorage; out ppvObj):WINOLEAPI;cdecl;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;cdecl;external 'ole32.dll' name 'OleCreateLinkEx';

  function OleCreateLinkToFile(lpszFileName:POleStr; const riid:TIID; renderopt:DWORD; lpFormatEtc:LPFORMATETC; pClientSite:IOleClientSite;
             pStg:IStorage; out ppvObj):WINOLEAPI;cdecl;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;cdecl;external 'ole32.dll' name 'OleCreateLinkToFileEx';

  function OleCreateFromFile(const rclsid:TLCID; lpszFileName:POleStr; const riid:TIID; renderopt:DWORD; lpFormatEtc:LPFORMATETC;
             pClientSite:IOleClientSite; pStg:IStorage; out ppvObj):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleCreateFromFile';

  function OleCreateFromFileEx(const rclsid:TLCID; 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;cdecl;external 'ole32.dll' name 'OleCreateFromFileEx';

  function OleLoad(pStg:IStorage; const riid:TIID; pClientSite:IOleClientSite; out ppvObj):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleLoad';

  function OleSave(pPS:IPersistStorage; pStg:IStorage; fSameAsLoad:BOOL):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleSave';

  function OleLoadFromStream(pStm:IStream; const iidInterface:TIID; out ppvObj):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleLoadFromStream';

  function OleSaveToStream(pPStm:IPersistStream; pStm:IStream):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleSaveToStream';

  function OleSetContainedObject(pUnknown:IUnknown; fContained:BOOL):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleSetContainedObject';

  function OleNoteObjectVisible(pUnknown:IUnknown; fVisible:BOOL):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleNoteObjectVisible';

  { Drag/Drop APIs  }
  function RegisterDragDrop(hwnd:HWND; pDropTarget:IDropTarget):WINOLEAPI;cdecl;external 'ole32.dll' name 'RegisterDragDrop';

  function RevokeDragDrop(hwnd:HWND):WINOLEAPI;cdecl;external 'ole32.dll' name 'RevokeDragDrop';

  function DoDragDrop(pDataObj:IDataObject; pDropSource:IDropSource; dwOKEffects:DWORD; pdwEffect:LPDWORD):WINOLEAPI;cdecl;external 'ole32.dll' name 'DoDragDrop';

  { Clipboard APIs  }
  function OleSetClipboard(pDataObj:IDataObject):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleSetClipboard';

  function OleGetClipboard(out ppDataObj:IDataObject):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleGetClipboard';

  function OleFlushClipboard:WINOLEAPI;cdecl;external 'ole32.dll' name 'OleFlushClipboard';

  function OleIsCurrentClipboard(pDataObj:IDataObject):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleIsCurrentClipboard';

type
  HOLEMENU = HMenu;

  { InPlace Editing APIs  }
  function OleCreateMenuDescriptor(hmenuCombined:HMENU; lpMenuWidths:LPOLEMENUGROUPWIDTHS):HOLEMENU;cdecl;external 'ole32.dll' name 'OleCreateMenuDescriptor';

  function OleSetMenuDescriptor(holemenu:HOLEMENU; hwndFrame:HWND; hwndActiveObject:HWND; lpFrame:IOleInPlaceFrame; lpActiveObj:IOleInPlaceActiveObject):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleSetMenuDescriptor';

  function OleDestroyMenuDescriptor(holemenu:HOLEMENU):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleDestroyMenuDescriptor';

  function OleTranslateAccelerator(lpFrame:IOleInPlaceFrame; lpFrameInfo:TOleInPlaceFrameInfo; lpmsg:LPMSG):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleTranslateAccelerator';

  { Helper APIs  }
  function OleDuplicateData(hSrc:HANDLE; cfFormat:CLIPFORMAT; uiFlags:UINT):HANDLE;cdecl;external 'ole32.dll' name 'OleDuplicateData';

  function OleDraw(pUnknown:IUnknown; dwAspect:DWORD; hdcDraw:HDC;const lprcBounds:TRect):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleDraw';

  function OleRun(pUnknown:IUnknown):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleRun';

  function OleIsRunning(pObject:IOleObject):BOOL;cdecl;external 'ole32.dll' name 'OleIsRunning';

  function OleLockRunning(pUnknown:IUnknown; fLock:BOOL; fLastUnlockCloses:BOOL):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleLockRunning';

  procedure ReleaseStgMedium(_para1:LPSTGMEDIUM);cdecl;external 'ole32.dll' name 'ReleaseStgMedium';

  function CreateOleAdviseHolder(out ppOAHolder:IOleAdviseHolder):WINOLEAPI;cdecl;external 'ole32.dll' name 'CreateOleAdviseHolder';

  function OleCreateDefaultHandler(const clsid:TLCID; pUnkOuter:IUnknown; const riid:TIID; out lplpObj):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleCreateDefaultHandler';

  function OleCreateEmbeddingHelper(const clsid:TLCID; pUnkOuter:IUnknown; flags:DWORD; pCF:IClassFactory; const riid:TIID;
             out lplpObj):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleCreateEmbeddingHelper';

  function IsAccelerator(hAccel:HACCEL; cAccelEntries:longint; lpMsg:LPMSG; lpwCmd:PWORD):BOOL;cdecl;external 'ole32.dll' name 'IsAccelerator';

  { Icon extraction Helper APIs  }
  function OleGetIconOfFile(lpszPath:LPOLESTR; fUseFileAsLabel:BOOL):HGLOBAL;cdecl;external 'ole32.dll' name 'OleGetIconOfFile';

  function OleGetIconOfClass(const rclsid:TLCID; lpszLabel:LPOLESTR; fUseTypeAsLabel:BOOL):HGLOBAL;cdecl;external 'ole32.dll' name 'OleGetIconOfClass';

  function OleMetafilePictFromIconAndLabel(hIcon:HICON; lpszLabel:LPOLESTR; lpszSourceFile:LPOLESTR; iIconIndex:UINT):HGLOBAL;cdecl;external 'ole32.dll' name 'OleMetafilePictFromIconAndLabel';

  { Registration Database Helper APIs  }
  function OleRegGetUserType(const clsid:TLCID; dwFormOfType:DWORD;out pszUserType:POleStr):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleRegGetUserType';

  function OleRegGetMiscStatus(const clsid:TLCID; dwAspect:DWORD; pdwStatus:PDWORD):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleRegGetMiscStatus';

  function OleRegEnumFormatEtc(const clsid:TLCID; dwDirection:DWORD;out ppenum:IEnumFormatEtc):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleRegEnumFormatEtc';

  function OleRegEnumVerbs(const clsid:TLCID;out ppenum:IEnumOLEVERB):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleRegEnumVerbs';

{$ifdef _MAC}
  { WlmOLE helper APIs  }

  function WlmOleCheckoutMacInterface(pUnk:IUnknown; out ppv):WINOLEAPI;cdecl;external 'ole32.dll' name 'WlmOleCheckoutMacInterface';

  function WlmOleCheckinMacInterface(pUnk:IUnknown):WINOLEAPI;cdecl;external 'ole32.dll' name 'WlmOleCheckinMacInterface';

  function WlmOleWrapMacInterface(pUnk:IUnknown; const riid:TIID; out ppv):WINOLEAPI;cdecl;external 'ole32.dll' name 'WlmOleWrapMacInterface';

  function WlmOleUnwrapMacInterface(pv:LPVOID):WINOLEAPI;cdecl;external 'ole32.dll' name 'WlmOleUnwrapMacInterface';

  function WlmOleCheckoutWinInterface(pUnk:LPVOID; ppv:PIUnknown):WINOLEAPI;cdecl;external 'ole32.dll' name 'WlmOleCheckoutWinInterface';

  function WlmOleCheckinWinInterface(pUnk:LPVOID):WINOLEAPI;cdecl;external 'ole32.dll' name 'WlmOleCheckinWinInterface';

  function WlmOleWrapWinInterface(pUnk:LPVOID; const riid:TIID; ppv:PIUnknown):WINOLEAPI;cdecl;external 'ole32.dll' name 'WlmOleWrapWinInterface';

  function WlmOleUnwrapWinInterface(pv:LPVOID):WINOLEAPI;cdecl;external 'ole32.dll' name 'WlmOleUnwrapWinInterface';

  procedure WlmOleVersion;cdecl;external 'ole32.dll' name 'WlmOleVersion';

  procedure WlmOleSetInPlaceWindow(hwnd:HWND);cdecl;external 'ole32.dll' name 'WlmOleSetInPlaceWindow';

  { typedef HRESULT (STDAPICALLTYPE* OLEWRAPPROC) (TIID riid, LPVOID* ppvWin, LPVOID* ppvMac); }
  function WlmOleRegisterUserWrap(procNew:OLEWRAPPROC; pprocOld:POLEWRAPPROC):WINOLEAPI;cdecl;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 *)

  function OleConvertOLESTREAMToIStorage(_lpolestream:LPOLESTREAM; pstg:IStorage; ptd:PDVTARGETDEVICE):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleConvertOLESTREAMToIStorage';

  function OleConvertIStorageToOLESTREAM(pstg:IStorage; lpolestream:LPOLESTREAM):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleConvertIStorageToOLESTREAM';

  { Storage Utility APIs  }
  function GetHGlobalFromILockBytes(plkbyt:ILockBytes;out phglobal:HGLOBAL):WINOLEAPI;cdecl;external 'ole32.dll' name 'GetHGlobalFromILockBytes';

  function CreateILockBytesOnHGlobal(hGlobal:HGLOBAL; fDeleteOnRelease:BOOL;out pplkbyt:ILockBytes):WINOLEAPI;cdecl;external 'ole32.dll' name 'CreateILockBytesOnHGlobal';

  function GetHGlobalFromStream(pstm:IStream;out phglobal:HGLOBAL):WINOLEAPI;cdecl;external 'ole32.dll' name 'GetHGlobalFromStream';

  function CreateStreamOnHGlobal(hGlobal:HGLOBAL; fDeleteOnRelease:BOOL;out stm:IStream):WINOLEAPI;cdecl;external 'ole32.dll' name 'CreateStreamOnHGlobal';

  { ConvertTo APIS  }
  function OleDoAutoConvert(pStg:IStorage; pClsidNew:LPCLSID):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleDoAutoConvert';

  function OleGetAutoConvert(const clsidOld:TLCID; pClsidNew:LPCLSID):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleGetAutoConvert';

  function OleSetAutoConvert(const clsidOld:TLCID; clsidNew:TLCID):WINOLEAPI;cdecl;external 'ole32.dll' name 'OleSetAutoConvert';

  function GetConvertStg(pStg:IStorage):WINOLEAPI;cdecl;external 'ole32.dll' name 'GetConvertStg';

  function SetConvertStg(pStg:IStorage; fConvert:BOOL):WINOLEAPI;cdecl;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;cdecl;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;cdecl;external 'ole32.dll' name 'OleConvertOLESTREAMToIStorageEx';


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 CoBuildVersion:DWORD;stdcall; external  'ole32.dll' name 'CoBuildVersion';

  function CoInitialize(_para1:PVOID):HRESULT;stdcall; external  'ole32.dll' name 'CoInitialize';

  function CoInitializeEx(_para1:LPVOID; _para2:DWORD):HRESULT;stdcall; external  'ole32.dll' name 'CoInitializeEx';

  procedure CoUninitialize;stdcall; external  'ole32.dll' name 'CoUninitialize';

  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 CoGetClassObject(const _para1:TCLSID; _para2:DWORD; _para3:PVOID; const _para4:TIID; out _para5):HRESULT;stdcall; external  'ole32.dll' name 'CoGetClassObject';

  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';

  function CoLoadLibrary(_para1:LPOLESTR; _para2:BOOL):THandle;stdcall; external  'ole32.dll' name 'CoLoadLibrary';

  procedure CoFreeLibrary(_para1:THandle);stdcall; external  'ole32.dll' name 'CoFreeLibrary';

  procedure CoFreeAllLibraries;stdcall; external  'ole32.dll' name 'CoFreeAllLibraries';

  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 CoCreateInstanceEx(const _para1:TCLSID; _para2:IUnknown; _para3:DWORD; _para4:PCOSERVERINFO; _para5:DWORD;
             _para6:PMULTI_QI):HRESULT;stdcall; external  'ole32.dll' name 'CoCreateInstanceEx';

  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 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 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 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';

  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';


  type

     LPFNGETCLASSOBJECT = function (const _para1:TCLSID; const _para2:TIID;out _para3):HRESULT;stdcall;

     LPFNCANUNLOADNOW = function:HRESULT;stdcall;

  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';

  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';

  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';

(* 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';

  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 BindMoniker(_para1:IMoniker; _para2:DWORD; _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';

  function CreateBindCtx(_para1:DWORD;out _para2:IBindCtx):HRESULT;stdcall; external  'ole32.dll' name 'CreateBindCtx';

  function CreateGenericComposite(_para1:IMoniker; _para2:IMoniker; out _para3:IMoniker):HRESULT;stdcall; external  'ole32.dll' name 'CreateGenericComposite';

  function GetClassFile(_para1:POLESTR; out _para2:TCLSID):HRESULT;stdcall; external  'ole32.dll' name 'GetClassFile';

  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';


implementation

end.

About Koders | Resources | Downloads | Support | Black Duck | Submit Project | Terms of Service | DMCA | Privacy Policy | Site Map| Contact Us