Source

xemacs-beta / src / intl-auto-encap-win32.c

Full commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
/* Automatically-generated Unicode-encapsulation file,
   using the command

   ../lib-src/make-mswin-unicode.pl --c-output intl-auto-encap-win32.c --h-output intl-auto-encap-win32.h intl-encap-win32.c

   Do not edit.  See `make-mswin-unicode.pl'.
*/

#include <config.h>
#include "lisp.h"

#include "syswindows.h"


/*----------------------------------------------------------------------*/
/*                       Processing file WINCON.H                       */
/*----------------------------------------------------------------------*/

/* Error if FillConsoleOutputCharacter used: split CHAR */

DWORD
qxeGetConsoleTitle (Extbyte * arg1, DWORD arg2)
{
  if (XEUNICODE_P)
    return GetConsoleTitleW ((LPWSTR) arg1, arg2);
  else
    return GetConsoleTitleA ((LPSTR) arg1, arg2);
}

BOOL
qxePeekConsoleInput (HANDLE arg1, PINPUT_RECORD arg2, DWORD arg3, PDWORD arg4)
{
  if (XEUNICODE_P)
    return PeekConsoleInputW (arg1, arg2, arg3, arg4);
  else
    return PeekConsoleInputA (arg1, arg2, arg3, arg4);
}

BOOL
qxeReadConsole (HANDLE arg1, PVOID arg2, DWORD arg3, PDWORD arg4, PVOID arg5)
{
  if (XEUNICODE_P)
    return ReadConsoleW (arg1, arg2, arg3, arg4, arg5);
  else
    return ReadConsoleA (arg1, arg2, arg3, arg4, arg5);
}

BOOL
qxeReadConsoleInput (HANDLE arg1, PINPUT_RECORD arg2, DWORD arg3, PDWORD arg4)
{
  if (XEUNICODE_P)
    return ReadConsoleInputW (arg1, arg2, arg3, arg4);
  else
    return ReadConsoleInputA (arg1, arg2, arg3, arg4);
}

BOOL
qxeReadConsoleOutputCharacter (HANDLE arg1, Extbyte * arg2, DWORD arg3, COORD arg4, PDWORD arg5)
{
  if (XEUNICODE_P)
    return ReadConsoleOutputCharacterW (arg1, (LPWSTR) arg2, arg3, arg4, arg5);
  else
    return ReadConsoleOutputCharacterA (arg1, (LPSTR) arg2, arg3, arg4, arg5);
}

BOOL
qxeReadConsoleOutput (HANDLE arg1, PCHAR_INFO arg2, COORD arg3, COORD arg4, PSMALL_RECT arg5)
{
  if (XEUNICODE_P)
    return ReadConsoleOutputW (arg1, arg2, arg3, arg4, arg5);
  else
    return ReadConsoleOutputA (arg1, arg2, arg3, arg4, arg5);
}

BOOL
qxeScrollConsoleScreenBuffer (HANDLE arg1, const SMALL_RECT* arg2, const SMALL_RECT* arg3, COORD arg4, const CHAR_INFO* arg5)
{
  if (XEUNICODE_P)
    return ScrollConsoleScreenBufferW (arg1, arg2, arg3, arg4, arg5);
  else
    return ScrollConsoleScreenBufferA (arg1, arg2, arg3, arg4, arg5);
}

BOOL
qxeSetConsoleTitle (const Extbyte * arg1)
{
  if (XEUNICODE_P)
    return SetConsoleTitleW ((LPCWSTR) arg1);
  else
    return SetConsoleTitleA ((LPCSTR) arg1);
}

BOOL
qxeWriteConsole (HANDLE arg1, PCVOID arg2, DWORD arg3, PDWORD arg4, PVOID arg5)
{
  if (XEUNICODE_P)
    return WriteConsoleW (arg1, arg2, arg3, arg4, arg5);
  else
    return WriteConsoleA (arg1, arg2, arg3, arg4, arg5);
}

BOOL
qxeWriteConsoleInput (HANDLE arg1, const INPUT_RECORD* arg2, DWORD arg3, PDWORD arg4)
{
  if (XEUNICODE_P)
    return WriteConsoleInputW (arg1, arg2, arg3, arg4);
  else
    return WriteConsoleInputA (arg1, arg2, arg3, arg4);
}

BOOL
qxeWriteConsoleOutput (HANDLE arg1, const CHAR_INFO* arg2, COORD arg3, COORD arg4, PSMALL_RECT arg5)
{
  if (XEUNICODE_P)
    return WriteConsoleOutputW (arg1, arg2, arg3, arg4, arg5);
  else
    return WriteConsoleOutputA (arg1, arg2, arg3, arg4, arg5);
}

BOOL
qxeWriteConsoleOutputCharacter (HANDLE arg1, const Extbyte * arg2, DWORD arg3, COORD arg4, PDWORD arg5)
{
  if (XEUNICODE_P)
    return WriteConsoleOutputCharacterW (arg1, (LPCWSTR) arg2, arg3, arg4, arg5);
  else
    return WriteConsoleOutputCharacterA (arg1, (LPCSTR) arg2, arg3, arg4, arg5);
}


/*----------------------------------------------------------------------*/
/*                      Processing file SHELLAPI.H                      */
/*----------------------------------------------------------------------*/

/* Error if CommandLineToArgv used: Unicode-only */

UINT
qxeDragQueryFile (HDROP arg1, UINT arg2, Extbyte * arg3, UINT arg4)
{
  if (XEUNICODE_P)
    return DragQueryFileW (arg1, arg2, (LPWSTR) arg3, arg4);
  else
    return DragQueryFileA (arg1, arg2, (LPSTR) arg3, arg4);
}

/* NOTE: error arg2, Cygwin prototype, extra const.
   NOTE: Prototype manually overridden.
         Header file claims:
           HICON WINAPI ExtractAssociatedIcon(HINSTANCE,LPCWSTR,PWORD)
         Overridden with:
           HICON ExtractAssociatedIcon(HINSTANCE, LPWSTR, LPWORD)
         Differences in return-type qualifiers, e.g. WINAPI, are not important.
 */
HICON
qxeExtractAssociatedIcon (HINSTANCE arg1, Extbyte * arg2, LPWORD arg3)
{
  if (XEUNICODE_P)
    return ExtractAssociatedIconW (arg1, (LPWSTR) arg2, arg3);
  else
    return ExtractAssociatedIconA (arg1, (LPSTR) arg2, arg3);
}

HICON
qxeExtractIcon (HINSTANCE arg1, const Extbyte * arg2, UINT arg3)
{
  if (XEUNICODE_P)
    return ExtractIconW (arg1, (LPCWSTR) arg2, arg3);
  else
    return ExtractIconA (arg1, (LPCSTR) arg2, arg3);
}

/* NOTE: NT 4.0+ only, former error in Cygwin prototype but no more (Cygwin 1.7, 1-30-10) */
UINT
qxeExtractIconEx (const Extbyte * arg1, int arg2, HICON* arg3, HICON* arg4, UINT arg5)
{
  if (XEUNICODE_P)
    return ExtractIconExW ((LPCWSTR) arg1, arg2, arg3, arg4, arg5);
  else
    return ExtractIconExA ((LPCSTR) arg1, arg2, arg3, arg4, arg5);
}

HINSTANCE
qxeFindExecutable (const Extbyte * arg1, const Extbyte * arg2, Extbyte * arg3)
{
  if (XEUNICODE_P)
    return FindExecutableW ((LPCWSTR) arg1, (LPCWSTR) arg2, (LPWSTR) arg3);
  else
    return FindExecutableA ((LPCSTR) arg1, (LPCSTR) arg2, (LPSTR) arg3);
}

/* Error if Shell_NotifyIcon used: split-sized NOTIFYICONDATA, NT 4.0+ only */

int
qxeShellAbout (HWND arg1, const Extbyte * arg2, const Extbyte * arg3, HICON arg4)
{
  if (XEUNICODE_P)
    return ShellAboutW (arg1, (LPCWSTR) arg2, (LPCWSTR) arg3, arg4);
  else
    return ShellAboutA (arg1, (LPCSTR) arg2, (LPCSTR) arg3, arg4);
}

HINSTANCE
qxeShellExecute (HWND arg1, const Extbyte * arg2, const Extbyte * arg3, const Extbyte * arg4, const Extbyte * arg5, INT arg6)
{
  if (XEUNICODE_P)
    return ShellExecuteW (arg1, (LPCWSTR) arg2, (LPCWSTR) arg3, (LPCWSTR) arg4, (LPCWSTR) arg5, arg6);
  else
    return ShellExecuteA (arg1, (LPCSTR) arg2, (LPCSTR) arg3, (LPCSTR) arg4, (LPCSTR) arg5, arg6);
}

/* NOTE: NT 4.0+ only */
BOOL
qxeShellExecuteEx (LPSHELLEXECUTEINFOW arg1)
{
  if (XEUNICODE_P)
    return ShellExecuteExW (arg1);
  else
    return ShellExecuteExA ((LPSHELLEXECUTEINFOA) arg1);
}

/* NOTE: NT 4.0+ only */
int
qxeSHFileOperation (LPSHFILEOPSTRUCTW arg1)
{
  if (XEUNICODE_P)
    return SHFileOperationW (arg1);
  else
    return SHFileOperationA ((LPSHFILEOPSTRUCTA) arg1);
}

/* Skipping SHGetFileInfo because split-sized SHFILEINFO, NT 4.0+ only */

#if !defined (CYGWIN_HEADERS)

/* NOTE: NT 4.0+ only */
HRESULT
qxeSHQueryRecycleBin (const Extbyte * arg1, LPSHQUERYRBINFO arg2)
{
  if (XEUNICODE_P)
    return SHQueryRecycleBinW ((LPCWSTR) arg1, arg2);
  else
    return SHQueryRecycleBinA ((LPCSTR) arg1, arg2);
}

#endif /* !defined (CYGWIN_HEADERS) */

#if !defined (CYGWIN_HEADERS)

/* NOTE: NT 4.0+ only */
HRESULT
qxeSHEmptyRecycleBin (HWND arg1, const Extbyte * arg2, DWORD arg3)
{
  if (XEUNICODE_P)
    return SHEmptyRecycleBinW (arg1, (LPCWSTR) arg2, arg3);
  else
    return SHEmptyRecycleBinA (arg1, (LPCSTR) arg2, arg3);
}

#endif /* !defined (CYGWIN_HEADERS) */


/*----------------------------------------------------------------------*/
/*                      Processing file WINSPOOL.H                      */
/*----------------------------------------------------------------------*/

#if defined (HAVE_MS_WINDOWS)

/* Error if AddForm used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if AddJob used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if AddMonitor used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if AddPort used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if AddPrinter used: split-sized DEVMODE pointer in split PRINTER_INFO_2 */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if AddPrinterConnection used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if AddPrinterDriver used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if AddPrintProcessor used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if AddPrintProvidor used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if AdvancedDocumentProperties used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if ConfigurePort used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if DeleteForm used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if DeleteMonitor used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if DeletePort used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if DeletePrinterConnection used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if DeletePrinterData used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if DeletePrinterDriver used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if DeletePrintProcessor used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if DeletePrintProvidor used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Skipping DocumentProperties because split-sized DEVMODE, error in Cygwin prototype */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if EnumForms used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if EnumJobs used: split-sized DEVMODE pointer in split JOB_INFO_2 */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if EnumMonitors used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if EnumPorts used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if EnumPrinterData used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if EnumPrinterDrivers used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* NOTE: #### problems with DEVMODE pointer in PRINTER_INFO_2 */
BOOL
qxeEnumPrinters (DWORD arg1, Extbyte * arg2, DWORD arg3, PBYTE arg4, DWORD arg5, PDWORD arg6, PDWORD arg7)
{
  if (XEUNICODE_P)
    return EnumPrintersW (arg1, (LPWSTR) arg2, arg3, arg4, arg5, arg6, arg7);
  else
    return EnumPrintersA (arg1, (LPSTR) arg2, arg3, arg4, arg5, arg6, arg7);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if EnumPrintProcessorDatatypes used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if EnumPrintProcessors used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if GetDefaultPrinter used: Function needs review to determine how to handle it */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if GetForm used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if GetJob used: split-sized DEVMODE pointer in split JOB_INFO_2 */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if GetPrinter used: split-sized DEVMODE pointer in split PRINTER_INFO_2 */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if GetPrinterData used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if GetPrinterDriver used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if GetPrinterDriverDirectory used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if GetPrintProcessorDirectory used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Skipping OpenPrinter because split-sized DEVMODE pointer in split PRINTER_DEFAULTS */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if PrinterMessageBox used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if ResetPrinter used: split-sized DEVMODE pointer in split PRINTER_DEFAULTS */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if SetForm used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if SetJob used: split-sized DEVMODE pointer in split JOB_INFO_2 */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if SetPrinter used: split-sized DEVMODE pointer in split PRINTER_INFO_2 */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if SetPrinterData used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if StartDocPrinter used: not used, complicated interface with split structures */

#endif /* defined (HAVE_MS_WINDOWS) */


/*----------------------------------------------------------------------*/
/*                      Processing file WINNETWK.H                      */
/*----------------------------------------------------------------------*/

#if defined (HAVE_MS_WINDOWS)

DWORD 
qxeWNetAddConnection (const Extbyte * arg1, const Extbyte * arg2, const Extbyte * arg3)
{
  if (XEUNICODE_P)
    return WNetAddConnectionW ((LPCWSTR) arg1, (LPCWSTR) arg2, (LPCWSTR) arg3);
  else
    return WNetAddConnectionA ((LPCSTR) arg1, (LPCSTR) arg2, (LPCSTR) arg3);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

DWORD 
qxeWNetAddConnection2 (LPNETRESOURCEW arg1, const Extbyte * arg2, const Extbyte * arg3, DWORD arg4)
{
  if (XEUNICODE_P)
    return WNetAddConnection2W (arg1, (LPCWSTR) arg2, (LPCWSTR) arg3, arg4);
  else
    return WNetAddConnection2A ((LPNETRESOURCEA) arg1, (LPCSTR) arg2, (LPCSTR) arg3, arg4);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

DWORD 
qxeWNetAddConnection3 (HWND arg1, LPNETRESOURCEW arg2, const Extbyte * arg3, const Extbyte * arg4, DWORD arg5)
{
  if (XEUNICODE_P)
    return WNetAddConnection3W (arg1, arg2, (LPCWSTR) arg3, (LPCWSTR) arg4, arg5);
  else
    return WNetAddConnection3A (arg1, (LPNETRESOURCEA) arg2, (LPCSTR) arg3, (LPCSTR) arg4, arg5);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

DWORD 
qxeWNetCancelConnection (const Extbyte * arg1, BOOL arg2)
{
  if (XEUNICODE_P)
    return WNetCancelConnectionW ((LPCWSTR) arg1, arg2);
  else
    return WNetCancelConnectionA ((LPCSTR) arg1, arg2);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

DWORD 
qxeWNetCancelConnection2 (const Extbyte * arg1, DWORD arg2, BOOL arg3)
{
  if (XEUNICODE_P)
    return WNetCancelConnection2W ((LPCWSTR) arg1, arg2, arg3);
  else
    return WNetCancelConnection2A ((LPCSTR) arg1, arg2, arg3);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

DWORD 
qxeWNetGetConnection (const Extbyte * arg1, Extbyte * arg2, PDWORD arg3)
{
  if (XEUNICODE_P)
    return WNetGetConnectionW ((LPCWSTR) arg1, (LPWSTR) arg2, arg3);
  else
    return WNetGetConnectionA ((LPCSTR) arg1, (LPSTR) arg2, arg3);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

DWORD 
qxeWNetUseConnection (HWND arg1, LPNETRESOURCEW arg2, const Extbyte * arg3, const Extbyte * arg4, DWORD arg5, Extbyte * arg6, PDWORD arg7, PDWORD arg8)
{
  if (XEUNICODE_P)
    return WNetUseConnectionW (arg1, arg2, (LPCWSTR) arg3, (LPCWSTR) arg4, arg5, (LPWSTR) arg6, arg7, arg8);
  else
    return WNetUseConnectionA (arg1, (LPNETRESOURCEA) arg2, (LPCSTR) arg3, (LPCSTR) arg4, arg5, (LPSTR) arg6, arg7, arg8);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if WNetSetConnection used: Function needs review to determine how to handle it */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* NOTE: contains split-simple LPNETRESOURCE */
DWORD 
qxeWNetConnectionDialog1 (LPCONNECTDLGSTRUCTW arg1)
{
  if (XEUNICODE_P)
    return WNetConnectionDialog1W (arg1);
  else
    return WNetConnectionDialog1A ((LPCONNECTDLGSTRUCTA) arg1);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

DWORD 
qxeWNetDisconnectDialog1 (LPDISCDLGSTRUCTW arg1)
{
  if (XEUNICODE_P)
    return WNetDisconnectDialog1W (arg1);
  else
    return WNetDisconnectDialog1A ((LPDISCDLGSTRUCTA) arg1);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

DWORD 
qxeWNetOpenEnum (DWORD arg1, DWORD arg2, DWORD arg3, LPNETRESOURCEW arg4, LPHANDLE arg5)
{
  if (XEUNICODE_P)
    return WNetOpenEnumW (arg1, arg2, arg3, arg4, arg5);
  else
    return WNetOpenEnumA (arg1, arg2, arg3, (LPNETRESOURCEA) arg4, arg5);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

DWORD 
qxeWNetEnumResource (HANDLE arg1, PDWORD arg2, PVOID arg3, PDWORD arg4)
{
  if (XEUNICODE_P)
    return WNetEnumResourceW (arg1, arg2, arg3, arg4);
  else
    return WNetEnumResourceA (arg1, arg2, arg3, arg4);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

DWORD 
qxeWNetGetUniversalName (const Extbyte * arg1, DWORD arg2, PVOID arg3, PDWORD arg4)
{
  if (XEUNICODE_P)
    return WNetGetUniversalNameW ((LPCWSTR) arg1, arg2, arg3, arg4);
  else
    return WNetGetUniversalNameA ((LPCSTR) arg1, arg2, arg3, arg4);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

DWORD 
qxeWNetGetUser (const Extbyte * arg1, Extbyte * arg2, PDWORD arg3)
{
  if (XEUNICODE_P)
    return WNetGetUserW ((LPCWSTR) arg1, (LPWSTR) arg2, arg3);
  else
    return WNetGetUserA ((LPCSTR) arg1, (LPSTR) arg2, arg3);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

DWORD 
qxeWNetGetProviderName (DWORD arg1, Extbyte * arg2, PDWORD arg3)
{
  if (XEUNICODE_P)
    return WNetGetProviderNameW (arg1, (LPWSTR) arg2, arg3);
  else
    return WNetGetProviderNameA (arg1, (LPSTR) arg2, arg3);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

DWORD 
qxeWNetGetNetworkInformation (const Extbyte * arg1, LPNETINFOSTRUCT arg2)
{
  if (XEUNICODE_P)
    return WNetGetNetworkInformationW ((LPCWSTR) arg1, arg2);
  else
    return WNetGetNetworkInformationA ((LPCSTR) arg1, arg2);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if WNetGetResourceInformation used: Function needs review to determine how to handle it */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if WNetGetResourceParent used: Function needs review to determine how to handle it */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

DWORD 
qxeWNetGetLastError (PDWORD arg1, Extbyte * arg2, DWORD arg3, Extbyte * arg4, DWORD arg5)
{
  if (XEUNICODE_P)
    return WNetGetLastErrorW (arg1, (LPWSTR) arg2, arg3, (LPWSTR) arg4, arg5);
  else
    return WNetGetLastErrorA (arg1, (LPSTR) arg2, arg3, (LPSTR) arg4, arg5);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

DWORD 
qxeMultinetGetConnectionPerformance (LPNETRESOURCEW arg1, LPNETCONNECTINFOSTRUCT arg2)
{
  if (XEUNICODE_P)
    return MultinetGetConnectionPerformanceW (arg1, arg2);
  else
    return MultinetGetConnectionPerformanceA ((LPNETRESOURCEA) arg1, arg2);
}

#endif /* defined (HAVE_MS_WINDOWS) */


/*----------------------------------------------------------------------*/
/*                      Processing file WINUSER.H                       */
/*----------------------------------------------------------------------*/

BOOL
qxeAppendMenu (HMENU arg1, UINT arg2, UINT_PTR arg3, const Extbyte * arg4)
{
  if (XEUNICODE_P)
    return AppendMenuW (arg1, arg2, arg3, (LPCWSTR) arg4);
  else
    return AppendMenuA (arg1, arg2, arg3, (LPCSTR) arg4);
}

/* Error if BroadcastSystemMessage used: win95 version not split; NT 4.0+ only */

/* Error if BroadcastSystemMessageEx used: Function needs review to determine how to handle it */

#if !defined (CYGWIN_HEADERS)

BOOL
qxeCallMsgFilter (LPMSG arg1, INT arg2)
{
  if (XEUNICODE_P)
    return CallMsgFilterW (arg1, arg2);
  else
    return CallMsgFilterA (arg1, arg2);
}

#endif /* !defined (CYGWIN_HEADERS) */

/* Error if CallWindowProc used: two versions, STRICT and non-STRICT */

/* Error if ChangeDisplaySettings used: split-sized LPDEVMODE */

/* Error if ChangeDisplaySettingsEx used: split-sized LPDEVMODE; NT 5.0/Win98+ only */

BOOL
qxeChangeMenu (HMENU arg1, UINT arg2, const Extbyte * arg3, UINT arg4, UINT arg5)
{
  if (XEUNICODE_P)
    return ChangeMenuW (arg1, arg2, (LPCWSTR) arg3, arg4, arg5);
  else
    return ChangeMenuA (arg1, arg2, (LPCSTR) arg3, arg4, arg5);
}

Extbyte *
qxeCharLower (Extbyte * arg1)
{
  if (XEUNICODE_P)
    return (Extbyte *) CharLowerW ((LPWSTR) arg1);
  else
    return (Extbyte *) CharLowerA ((LPSTR) arg1);
}

DWORD
qxeCharLowerBuff (Extbyte * arg1, DWORD arg2)
{
  if (XEUNICODE_P)
    return CharLowerBuffW ((LPWSTR) arg1, arg2);
  else
    return CharLowerBuffA ((LPSTR) arg1, arg2);
}

Extbyte *
qxeCharNext (const Extbyte * arg1)
{
  if (XEUNICODE_P)
    return (Extbyte *) CharNextW ((LPCWSTR) arg1);
  else
    return (Extbyte *) CharNextA ((LPCSTR) arg1);
}

Extbyte *
qxeCharPrev (const Extbyte * arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    return (Extbyte *) CharPrevW ((LPCWSTR) arg1, (LPCWSTR) arg2);
  else
    return (Extbyte *) CharPrevA ((LPCSTR) arg1, (LPCSTR) arg2);
}

BOOL
qxeCharToOem (const Extbyte * arg1, LPSTR arg2)
{
  if (XEUNICODE_P)
    return CharToOemW ((LPCWSTR) arg1, arg2);
  else
    return CharToOemA ((LPCSTR) arg1, arg2);
}

BOOL
qxeCharToOemBuff (const Extbyte * arg1, LPSTR arg2, DWORD arg3)
{
  if (XEUNICODE_P)
    return CharToOemBuffW ((LPCWSTR) arg1, arg2, arg3);
  else
    return CharToOemBuffA ((LPCSTR) arg1, arg2, arg3);
}

Extbyte *
qxeCharUpper (Extbyte * arg1)
{
  if (XEUNICODE_P)
    return (Extbyte *) CharUpperW ((LPWSTR) arg1);
  else
    return (Extbyte *) CharUpperA ((LPSTR) arg1);
}

DWORD
qxeCharUpperBuff (Extbyte * arg1, DWORD arg2)
{
  if (XEUNICODE_P)
    return CharUpperBuffW ((LPWSTR) arg1, arg2);
  else
    return CharUpperBuffA ((LPSTR) arg1, arg2);
}

int
qxeCopyAcceleratorTable (HACCEL arg1, LPACCEL arg2, int arg3)
{
  if (XEUNICODE_P)
    return CopyAcceleratorTableW (arg1, arg2, arg3);
  else
    return CopyAcceleratorTableA (arg1, arg2, arg3);
}

HACCEL
qxeCreateAcceleratorTable (LPACCEL arg1, int arg2)
{
  if (XEUNICODE_P)
    return CreateAcceleratorTableW (arg1, arg2);
  else
    return CreateAcceleratorTableA (arg1, arg2);
}

/* Error if CreateDesktop used: split-sized LPDEVMODE */

/* NOTE: error in Cygwin prototype (no split) but fixable with typedef */
HWND
qxeCreateDialogIndirectParam (HINSTANCE arg1, LPCDLGTEMPLATE arg2, HWND arg3, DLGPROC arg4, LPARAM arg5)
{
  if (XEUNICODE_P)
    return CreateDialogIndirectParamW (arg1, arg2, arg3, arg4, arg5);
  else
    return CreateDialogIndirectParamA (arg1, arg2, arg3, arg4, arg5);
}

HWND
qxeCreateDialogParam (HINSTANCE arg1, const Extbyte * arg2, HWND arg3, DLGPROC arg4, LPARAM arg5)
{
  if (XEUNICODE_P)
    return CreateDialogParamW (arg1, (LPCWSTR) arg2, arg3, arg4, arg5);
  else
    return CreateDialogParamA (arg1, (LPCSTR) arg2, arg3, arg4, arg5);
}

/* NOTE: error arg 1, VS6 prototype, missing const.
   NOTE: Prototype manually overridden.
         Header file claims:
           WINUSERAPI HWND WINAPI CreateMDIWindow(LPCWSTR,LPCWSTR,DWORD,int,int,int,int,HWND,HINSTANCE,LPARAM)
         Overridden with:
           HWND CreateMDIWindow(LPWSTR,LPWSTR,DWORD,int,int,int,int,HWND,HINSTANCE,LPARAM)
         Differences in return-type qualifiers, e.g. WINAPI, are not important.
 */
HWND
qxeCreateMDIWindow (Extbyte * arg1, Extbyte * arg2, DWORD arg3, int arg4, int arg5, int arg6, int arg7, HWND arg8, HINSTANCE arg9, LPARAM arg10)
{
  if (XEUNICODE_P)
    return CreateMDIWindowW ((LPWSTR) arg1, (LPWSTR) arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
  else
    return CreateMDIWindowA ((LPSTR) arg1, (LPSTR) arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
}

HWND
qxeCreateWindowEx (DWORD arg1, const Extbyte * arg2, const Extbyte * arg3, DWORD arg4, int arg5, int arg6, int arg7, int arg8, HWND arg9, HMENU arg10, HINSTANCE arg11, LPVOID arg12)
{
  if (XEUNICODE_P)
    return CreateWindowExW (arg1, (LPCWSTR) arg2, (LPCWSTR) arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12);
  else
    return CreateWindowExA (arg1, (LPCSTR) arg2, (LPCSTR) arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12);
}

/* NOTE: error arg 1, VS6 prototype, missing const.
   NOTE: Prototype manually overridden.
         Header file claims:
           WINUSERAPI HWINSTA WINAPI CreateWindowStation(LPCWSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES)
         Overridden with:
           HWINSTA CreateWindowStation(LPWSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES)
         Differences in return-type qualifiers, e.g. WINAPI, are not important.
 */
HWINSTA
qxeCreateWindowStation (Extbyte * arg1, DWORD arg2, DWORD arg3, LPSECURITY_ATTRIBUTES arg4)
{
  if (XEUNICODE_P)
    return CreateWindowStationW ((LPWSTR) arg1, arg2, arg3, arg4);
  else
    return CreateWindowStationA ((LPSTR) arg1, arg2, arg3, arg4);
}

/* Error if DefDlgProc used: return value is conditionalized on _MAC, messes up parser */

LRESULT
qxeDefFrameProc (HWND arg1, HWND arg2, UINT arg3, WPARAM arg4, LPARAM arg5)
{
  if (XEUNICODE_P)
    return DefFrameProcW (arg1, arg2, arg3, arg4, arg5);
  else
    return DefFrameProcA (arg1, arg2, arg3, arg4, arg5);
}

/* Error if DefMDIChildProc used: return value is conditionalized on _MAC, messes up parser */

/* Skipping DefWindowProc because return value is conditionalized on _MAC, messes up parser */

/* NOTE: error in Cygwin prototype (no split) but fixable with typedef */
int
qxeDialogBoxIndirectParam (HINSTANCE arg1, LPCDLGTEMPLATE arg2, HWND arg3, DLGPROC arg4, LPARAM arg5)
{
  if (XEUNICODE_P)
    return DialogBoxIndirectParamW (arg1, arg2, arg3, arg4, arg5);
  else
    return DialogBoxIndirectParamA (arg1, arg2, arg3, arg4, arg5);
}

int
qxeDialogBoxParam (HINSTANCE arg1, const Extbyte * arg2, HWND arg3, DLGPROC arg4, LPARAM arg5)
{
  if (XEUNICODE_P)
    return DialogBoxParamW (arg1, (LPCWSTR) arg2, arg3, arg4, arg5);
  else
    return DialogBoxParamA (arg1, (LPCSTR) arg2, arg3, arg4, arg5);
}

LONG
qxeDispatchMessage (const MSG* arg1)
{
  if (XEUNICODE_P)
    return DispatchMessageW (arg1);
  else
    return DispatchMessageA (arg1);
}

int
qxeDlgDirList (HWND arg1, Extbyte * arg2, int arg3, int arg4, UINT arg5)
{
  if (XEUNICODE_P)
    return DlgDirListW (arg1, (LPWSTR) arg2, arg3, arg4, arg5);
  else
    return DlgDirListA (arg1, (LPSTR) arg2, arg3, arg4, arg5);
}

int
qxeDlgDirListComboBox (HWND arg1, Extbyte * arg2, int arg3, int arg4, UINT arg5)
{
  if (XEUNICODE_P)
    return DlgDirListComboBoxW (arg1, (LPWSTR) arg2, arg3, arg4, arg5);
  else
    return DlgDirListComboBoxA (arg1, (LPSTR) arg2, arg3, arg4, arg5);
}

BOOL
qxeDlgDirSelectComboBoxEx (HWND arg1, Extbyte * arg2, int arg3, int arg4)
{
  if (XEUNICODE_P)
    return DlgDirSelectComboBoxExW (arg1, (LPWSTR) arg2, arg3, arg4);
  else
    return DlgDirSelectComboBoxExA (arg1, (LPSTR) arg2, arg3, arg4);
}

BOOL
qxeDlgDirSelectEx (HWND arg1, Extbyte * arg2, int arg3, int arg4)
{
  if (XEUNICODE_P)
    return DlgDirSelectExW (arg1, (LPWSTR) arg2, arg3, arg4);
  else
    return DlgDirSelectExA (arg1, (LPSTR) arg2, arg3, arg4);
}

/* NOTE: NT 4.0+ only */
BOOL
qxeDrawState (HDC arg1, HBRUSH arg2, DRAWSTATEPROC arg3, LPARAM arg4, WPARAM arg5, int arg6, int arg7, int arg8, int arg9, UINT arg10)
{
  if (XEUNICODE_P)
    return DrawStateW (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
  else
    return DrawStateA (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
}

int
qxeDrawText (HDC arg1, const Extbyte * arg2, int arg3, LPRECT arg4, UINT arg5)
{
  if (XEUNICODE_P)
    return DrawTextW (arg1, (LPCWSTR) arg2, arg3, arg4, arg5);
  else
    return DrawTextA (arg1, (LPCSTR) arg2, arg3, arg4, arg5);
}

/* NOTE: NT 4.0+ only */
int
qxeDrawTextEx (HDC arg1, Extbyte * arg2, int arg3, LPRECT arg4, UINT arg5, LPDRAWTEXTPARAMS arg6)
{
  if (XEUNICODE_P)
    return DrawTextExW (arg1, (LPWSTR) arg2, arg3, arg4, arg5, arg6);
  else
    return DrawTextExA (arg1, (LPSTR) arg2, arg3, arg4, arg5, arg6);
}

/* NOTE: // callback fun differs only in string pointer type */
BOOL
qxeEnumDesktops (HWINSTA arg1, DESKTOPENUMPROCW arg2, LPARAM arg3)
{
  if (XEUNICODE_P)
    return EnumDesktopsW (arg1, arg2, arg3);
  else
    return EnumDesktopsA (arg1, (DESKTOPENUMPROCA) arg2, arg3);
}

/* Error if EnumDisplaySettings used: split-sized LPDEVMODE */

/* Error if EnumDisplaySettingsEx used: Function needs review to determine how to handle it */

/* Error if EnumDisplayDevices used: split-sized PDISPLAY_DEVICE; NT 5.0+ only, no Win98 */

/* NOTE: // callback fun differs only in string pointer type */
int
qxeEnumProps (HWND arg1, PROPENUMPROCW arg2)
{
  if (XEUNICODE_P)
    return EnumPropsW (arg1, arg2);
  else
    return EnumPropsA (arg1, (PROPENUMPROCA) arg2);
}

/* NOTE: // callback fun differs only in string pointer type */
int
qxeEnumPropsEx (HWND arg1, PROPENUMPROCEXW arg2, LPARAM arg3)
{
  if (XEUNICODE_P)
    return EnumPropsExW (arg1, arg2, arg3);
  else
    return EnumPropsExA (arg1, (PROPENUMPROCEXA) arg2, arg3);
}

/* NOTE: // callback fun differs only in string pointer type */
BOOL
qxeEnumWindowStations (WINSTAENUMPROCW arg1, LPARAM arg2)
{
  if (XEUNICODE_P)
    return EnumWindowStationsW (arg1, arg2);
  else
    return EnumWindowStationsA ((WINSTAENUMPROCA) arg1, arg2);
}

/* NOTE: NT 4.0+ only */
HWND
qxeFindWindowEx (HWND arg1, HWND arg2, const Extbyte * arg3, const Extbyte * arg4)
{
  if (XEUNICODE_P)
    return FindWindowExW (arg1, arg2, (LPCWSTR) arg3, (LPCWSTR) arg4);
  else
    return FindWindowExA (arg1, arg2, (LPCSTR) arg3, (LPCSTR) arg4);
}

HWND
qxeFindWindow (const Extbyte * arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    return FindWindowW ((LPCWSTR) arg1, (LPCWSTR) arg2);
  else
    return FindWindowA ((LPCSTR) arg1, (LPCSTR) arg2);
}

BOOL
qxeGetClassInfo (HINSTANCE arg1, const Extbyte * arg2, LPWNDCLASSW arg3)
{
  if (XEUNICODE_P)
    return GetClassInfoW (arg1, (LPCWSTR) arg2, arg3);
  else
    return GetClassInfoA (arg1, (LPCSTR) arg2, (LPWNDCLASSA) arg3);
}

/* NOTE: NT 4.0+ only */
BOOL
qxeGetClassInfoEx (HINSTANCE arg1, const Extbyte * arg2, LPWNDCLASSEXW arg3)
{
  if (XEUNICODE_P)
    return GetClassInfoExW (arg1, (LPCWSTR) arg2, arg3);
  else
    return GetClassInfoExA (arg1, (LPCSTR) arg2, (LPWNDCLASSEXA) arg3);
}

DWORD
qxeGetClassLong (HWND arg1, int arg2)
{
  if (XEUNICODE_P)
    return GetClassLongW (arg1, arg2);
  else
    return GetClassLongA (arg1, arg2);
}

/* Error if GetClassLongPtr used: Function needs review to determine how to handle it */

int
qxeGetClassName (HWND arg1, Extbyte * arg2, int arg3)
{
  if (XEUNICODE_P)
    return GetClassNameW (arg1, (LPWSTR) arg2, arg3);
  else
    return GetClassNameA (arg1, (LPSTR) arg2, arg3);
}

int
qxeGetClipboardFormatName (UINT arg1, Extbyte * arg2, int arg3)
{
  if (XEUNICODE_P)
    return GetClipboardFormatNameW (arg1, (LPWSTR) arg2, arg3);
  else
    return GetClipboardFormatNameA (arg1, (LPSTR) arg2, arg3);
}

UINT
qxeGetDlgItemText (HWND arg1, int arg2, Extbyte * arg3, int arg4)
{
  if (XEUNICODE_P)
    return GetDlgItemTextW (arg1, arg2, (LPWSTR) arg3, arg4);
  else
    return GetDlgItemTextA (arg1, arg2, (LPSTR) arg3, arg4);
}

BOOL
qxeGetKeyboardLayoutName (Extbyte * arg1)
{
  if (XEUNICODE_P)
    return GetKeyboardLayoutNameW ((LPWSTR) arg1);
  else
    return GetKeyboardLayoutNameA ((LPSTR) arg1);
}

int
qxeGetKeyNameText (LONG arg1, Extbyte * arg2, int arg3)
{
  if (XEUNICODE_P)
    return GetKeyNameTextW (arg1, (LPWSTR) arg2, arg3);
  else
    return GetKeyNameTextA (arg1, (LPSTR) arg2, arg3);
}

/* NOTE: NT 4.0+ only */
BOOL
qxeGetMenuItemInfo (HMENU arg1, UINT arg2, BOOL arg3, LPMENUITEMINFOW arg4)
{
  if (XEUNICODE_P)
    return GetMenuItemInfoW (arg1, arg2, arg3, arg4);
  else
    return GetMenuItemInfoA (arg1, arg2, arg3, (LPMENUITEMINFOA) arg4);
}

int
qxeGetMenuString (HMENU arg1, UINT arg2, Extbyte * arg3, int arg4, UINT arg5)
{
  if (XEUNICODE_P)
    return GetMenuStringW (arg1, arg2, (LPWSTR) arg3, arg4, arg5);
  else
    return GetMenuStringA (arg1, arg2, (LPSTR) arg3, arg4, arg5);
}

BOOL
qxeGetMessage (LPMSG arg1, HWND arg2, UINT arg3, UINT arg4)
{
  if (XEUNICODE_P)
    return GetMessageW (arg1, arg2, arg3, arg4);
  else
    return GetMessageA (arg1, arg2, arg3, arg4);
}

HANDLE
qxeGetProp (HWND arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    return GetPropW (arg1, (LPCWSTR) arg2);
  else
    return GetPropA (arg1, (LPCSTR) arg2);
}

/* Error if GetRawInputDeviceInfo used: Function needs review to determine how to handle it */

DWORD
qxeGetTabbedTextExtent (HDC arg1, const Extbyte * arg2, int arg3, int arg4, LPINT arg5)
{
  if (XEUNICODE_P)
    return GetTabbedTextExtentW (arg1, (LPCWSTR) arg2, arg3, arg4, arg5);
  else
    return GetTabbedTextExtentA (arg1, (LPCSTR) arg2, arg3, arg4, arg5);
}

LONG
qxeGetWindowLong (HWND arg1, int arg2)
{
  if (XEUNICODE_P)
    return GetWindowLongW (arg1, arg2);
  else
    return GetWindowLongA (arg1, arg2);
}

/* Error if GetWindowLongPtr used: Function needs review to determine how to handle it */

BOOL
qxeGetUserObjectInformation (HANDLE arg1, int arg2, PVOID arg3, DWORD arg4, PDWORD arg5)
{
  if (XEUNICODE_P)
    return GetUserObjectInformationW (arg1, arg2, arg3, arg4, arg5);
  else
    return GetUserObjectInformationA (arg1, arg2, arg3, arg4, arg5);
}

int
qxeGetWindowTextLength (HWND arg1)
{
  if (XEUNICODE_P)
    return GetWindowTextLengthW (arg1);
  else
    return GetWindowTextLengthA (arg1);
}

int
qxeGetWindowText (HWND arg1, Extbyte * arg2, int arg3)
{
  if (XEUNICODE_P)
    return GetWindowTextW (arg1, (LPWSTR) arg2, arg3);
  else
    return GetWindowTextA (arg1, (LPSTR) arg2, arg3);
}

/* Error if GetAltTabInfo used: NT 5.0+ only */

/* Error if GetMonitorInfo used: NT 5.0/Win98+ only */

/* Error if GetWindowModuleFileName used: NT 5.0+ only */

BOOL
qxeGrayString (HDC arg1, HBRUSH arg2, GRAYSTRINGPROC arg3, LPARAM arg4, int arg5, int arg6, int arg7, int arg8, int arg9)
{
  if (XEUNICODE_P)
    return GrayStringW (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
  else
    return GrayStringA (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
}

BOOL
qxeInsertMenu (HMENU arg1, UINT arg2, UINT arg3, UINT arg4, const Extbyte * arg5)
{
  if (XEUNICODE_P)
    return InsertMenuW (arg1, arg2, arg3, arg4, (LPCWSTR) arg5);
  else
    return InsertMenuA (arg1, arg2, arg3, arg4, (LPCSTR) arg5);
}

/* NOTE: NT 4.0+ only */
BOOL
qxeInsertMenuItem (HMENU arg1, UINT arg2, BOOL arg3, LPCMENUITEMINFOW arg4)
{
  if (XEUNICODE_P)
    return InsertMenuItemW (arg1, arg2, arg3, arg4);
  else
    return InsertMenuItemA (arg1, arg2, arg3, (LPCMENUITEMINFOA) arg4);
}

/* Error if IsCharAlphaNumeric used: split CHAR */

/* Error if IsCharAlpha used: split CHAR */

/* Error if IsCharLower used: split CHAR */

/* Error if IsCharUpper used: split CHAR */

BOOL
qxeIsDialogMessage (HWND arg1, LPMSG arg2)
{
  if (XEUNICODE_P)
    return IsDialogMessageW (arg1, arg2);
  else
    return IsDialogMessageA (arg1, arg2);
}

HACCEL
qxeLoadAccelerators (HINSTANCE arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    return LoadAcceleratorsW (arg1, (LPCWSTR) arg2);
  else
    return LoadAcceleratorsA (arg1, (LPCSTR) arg2);
}

HBITMAP
qxeLoadBitmap (HINSTANCE arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    return LoadBitmapW (arg1, (LPCWSTR) arg2);
  else
    return LoadBitmapA (arg1, (LPCSTR) arg2);
}

HCURSOR
qxeLoadCursorFromFile (const Extbyte * arg1)
{
  if (XEUNICODE_P)
    return LoadCursorFromFileW ((LPCWSTR) arg1);
  else
    return LoadCursorFromFileA ((LPCSTR) arg1);
}

HCURSOR
qxeLoadCursor (HINSTANCE arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    return LoadCursorW (arg1, (LPCWSTR) arg2);
  else
    return LoadCursorA (arg1, (LPCSTR) arg2);
}

HICON
qxeLoadIcon (HINSTANCE arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    return LoadIconW (arg1, (LPCWSTR) arg2);
  else
    return LoadIconA (arg1, (LPCSTR) arg2);
}

/* NOTE: NT 4.0+ only */
HANDLE
qxeLoadImage (HINSTANCE arg1, const Extbyte * arg2, UINT arg3, int arg4, int arg5, UINT arg6)
{
  if (XEUNICODE_P)
    return LoadImageW (arg1, (LPCWSTR) arg2, arg3, arg4, arg5, arg6);
  else
    return LoadImageA (arg1, (LPCSTR) arg2, arg3, arg4, arg5, arg6);
}

HKL
qxeLoadKeyboardLayout (const Extbyte * arg1, UINT arg2)
{
  if (XEUNICODE_P)
    return LoadKeyboardLayoutW ((LPCWSTR) arg1, arg2);
  else
    return LoadKeyboardLayoutA ((LPCSTR) arg1, arg2);
}

HMENU
qxeLoadMenuIndirect (const MENUTEMPLATE* arg1)
{
  if (XEUNICODE_P)
    return LoadMenuIndirectW (arg1);
  else
    return LoadMenuIndirectA (arg1);
}

HMENU
qxeLoadMenu (HINSTANCE arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    return LoadMenuW (arg1, (LPCWSTR) arg2);
  else
    return LoadMenuA (arg1, (LPCSTR) arg2);
}

int
qxeLoadString (HINSTANCE arg1, UINT arg2, Extbyte * arg3, int arg4)
{
  if (XEUNICODE_P)
    return LoadStringW (arg1, arg2, (LPWSTR) arg3, arg4);
  else
    return LoadStringA (arg1, arg2, (LPSTR) arg3, arg4);
}

/* NOTE: NT 4.0+ only */
UINT
qxeMapVirtualKeyEx (UINT arg1, UINT arg2, HKL arg3)
{
  if (XEUNICODE_P)
    return MapVirtualKeyExW (arg1, arg2, arg3);
  else
    return MapVirtualKeyExA (arg1, arg2, arg3);
}

UINT
qxeMapVirtualKey (UINT arg1, UINT arg2)
{
  if (XEUNICODE_P)
    return MapVirtualKeyW (arg1, arg2);
  else
    return MapVirtualKeyA (arg1, arg2);
}

int
qxeMessageBox (HWND arg1, const Extbyte * arg2, const Extbyte * arg3, UINT arg4)
{
  if (XEUNICODE_P)
    return MessageBoxW (arg1, (LPCWSTR) arg2, (LPCWSTR) arg3, arg4);
  else
    return MessageBoxA (arg1, (LPCSTR) arg2, (LPCSTR) arg3, arg4);
}

int
qxeMessageBoxEx (HWND arg1, const Extbyte * arg2, const Extbyte * arg3, UINT arg4, WORD arg5)
{
  if (XEUNICODE_P)
    return MessageBoxExW (arg1, (LPCWSTR) arg2, (LPCWSTR) arg3, arg4, arg5);
  else
    return MessageBoxExA (arg1, (LPCSTR) arg2, (LPCSTR) arg3, arg4, arg5);
}

/* Error if MessageBoxIndirect used: Cygwin has split MSGBOXPARAMS* instead of LPMSGBOXPARAMS */

BOOL
qxeModifyMenu (HMENU arg1, UINT arg2, UINT arg3, UINT arg4, const Extbyte * arg5)
{
  if (XEUNICODE_P)
    return ModifyMenuW (arg1, arg2, arg3, arg4, (LPCWSTR) arg5);
  else
    return ModifyMenuA (arg1, arg2, arg3, arg4, (LPCSTR) arg5);
}

BOOL
qxeOemToCharBuff (LPCSTR arg1, Extbyte * arg2, DWORD arg3)
{
  if (XEUNICODE_P)
    return OemToCharBuffW (arg1, (LPWSTR) arg2, arg3);
  else
    return OemToCharBuffA (arg1, (LPSTR) arg2, arg3);
}

BOOL
qxeOemToChar (LPCSTR arg1, Extbyte * arg2)
{
  if (XEUNICODE_P)
    return OemToCharW (arg1, (LPWSTR) arg2);
  else
    return OemToCharA (arg1, (LPSTR) arg2);
}

HDESK
qxeOpenDesktop (Extbyte * arg1, DWORD arg2, BOOL arg3, DWORD arg4)
{
  if (XEUNICODE_P)
    return OpenDesktopW ((LPWSTR) arg1, arg2, arg3, arg4);
  else
    return OpenDesktopA ((LPSTR) arg1, arg2, arg3, arg4);
}

HWINSTA
qxeOpenWindowStation (Extbyte * arg1, BOOL arg2, DWORD arg3)
{
  if (XEUNICODE_P)
    return OpenWindowStationW ((LPWSTR) arg1, arg2, arg3);
  else
    return OpenWindowStationA ((LPSTR) arg1, arg2, arg3);
}

BOOL
qxePeekMessage (LPMSG arg1, HWND arg2, UINT arg3, UINT arg4, UINT arg5)
{
  if (XEUNICODE_P)
    return PeekMessageW (arg1, arg2, arg3, arg4, arg5);
  else
    return PeekMessageA (arg1, arg2, arg3, arg4, arg5);
}

BOOL
qxePostMessage (HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
{
  if (XEUNICODE_P)
    return PostMessageW (arg1, arg2, arg3, arg4);
  else
    return PostMessageA (arg1, arg2, arg3, arg4);
}

BOOL
qxePostThreadMessage (DWORD arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
{
  if (XEUNICODE_P)
    return PostThreadMessageW (arg1, arg2, arg3, arg4);
  else
    return PostThreadMessageA (arg1, arg2, arg3, arg4);
}

/* Error if RealGetWindowClass used: NT 5.0+ only */

/* Skipping RegisterClass because need to intercept so we can provide our own window procedure and handle split notify messages; split-simple WNDCLASS */

/* Skipping RegisterClassEx because need to intercept so we can provide our own window procedure and handle split notify messages; split-simple WNDCLASSEX; NT 4.0+ only */

UINT
qxeRegisterClipboardFormat (const Extbyte * arg1)
{
  if (XEUNICODE_P)
    return RegisterClipboardFormatW ((LPCWSTR) arg1);
  else
    return RegisterClipboardFormatA ((LPCSTR) arg1);
}

/* Error if RegisterDeviceNotification used: NT 5.0+ only */

UINT
qxeRegisterWindowMessage (const Extbyte * arg1)
{
  if (XEUNICODE_P)
    return RegisterWindowMessageW ((LPCWSTR) arg1);
  else
    return RegisterWindowMessageA ((LPCSTR) arg1);
}

HANDLE
qxeRemoveProp (HWND arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    return RemovePropW (arg1, (LPCWSTR) arg2);
  else
    return RemovePropA (arg1, (LPCSTR) arg2);
}

LONG
qxeSendDlgItemMessage (HWND arg1, int arg2, UINT arg3, WPARAM arg4, LPARAM arg5)
{
  if (XEUNICODE_P)
    return SendDlgItemMessageW (arg1, arg2, arg3, arg4, arg5);
  else
    return SendDlgItemMessageA (arg1, arg2, arg3, arg4, arg5);
}

BOOL
qxeSendMessageCallback (HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4, SENDASYNCPROC arg5, DWORD arg6)
{
  if (XEUNICODE_P)
    return SendMessageCallbackW (arg1, arg2, arg3, arg4, arg5, arg6);
  else
    return SendMessageCallbackA (arg1, arg2, arg3, arg4, arg5, arg6);
}

/* Error if SendMessageTimeout used: VS6 has erroneous seventh parameter DWORD_PTR instead of PDWORD_PTR */

/* Skipping SendMessage because split messages and structures */

BOOL
qxeSendNotifyMessage (HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
{
  if (XEUNICODE_P)
    return SendNotifyMessageW (arg1, arg2, arg3, arg4);
  else
    return SendNotifyMessageA (arg1, arg2, arg3, arg4);
}

DWORD
qxeSetClassLong (HWND arg1, int arg2, LONG arg3)
{
  if (XEUNICODE_P)
    return SetClassLongW (arg1, arg2, arg3);
  else
    return SetClassLongA (arg1, arg2, arg3);
}

/* Error if SetClassLongPtr used: Function needs review to determine how to handle it */

BOOL
qxeSetDlgItemText (HWND arg1, int arg2, const Extbyte * arg3)
{
  if (XEUNICODE_P)
    return SetDlgItemTextW (arg1, arg2, (LPCWSTR) arg3);
  else
    return SetDlgItemTextA (arg1, arg2, (LPCSTR) arg3);
}

/* NOTE: NT 4.0+ only */
BOOL
qxeSetMenuItemInfo (HMENU arg1, UINT arg2, BOOL arg3, LPCMENUITEMINFOW arg4)
{
  if (XEUNICODE_P)
    return SetMenuItemInfoW (arg1, arg2, arg3, arg4);
  else
    return SetMenuItemInfoA (arg1, arg2, arg3, (LPCMENUITEMINFOA) arg4);
}

BOOL
qxeSetProp (HWND arg1, const Extbyte * arg2, HANDLE arg3)
{
  if (XEUNICODE_P)
    return SetPropW (arg1, (LPCWSTR) arg2, arg3);
  else
    return SetPropA (arg1, (LPCSTR) arg2, arg3);
}

BOOL
qxeSetUserObjectInformation (HANDLE arg1, int arg2, PVOID arg3, DWORD arg4)
{
  if (XEUNICODE_P)
    return SetUserObjectInformationW (arg1, arg2, arg3, arg4);
  else
    return SetUserObjectInformationA (arg1, arg2, arg3, arg4);
}

LONG
qxeSetWindowLong (HWND arg1, int arg2, LONG arg3)
{
  if (XEUNICODE_P)
    return SetWindowLongW (arg1, arg2, arg3);
  else
    return SetWindowLongA (arg1, arg2, arg3);
}

/* Error if SetWindowLongPtr used: Function needs review to determine how to handle it */

/* Error if SetWindowsHook used: obsolete; two versions, STRICT and non-STRICT */

HHOOK
qxeSetWindowsHookEx (int arg1, HOOKPROC arg2, HINSTANCE arg3, DWORD arg4)
{
  if (XEUNICODE_P)
    return SetWindowsHookExW (arg1, arg2, arg3, arg4);
  else
    return SetWindowsHookExA (arg1, arg2, arg3, arg4);
}

BOOL
qxeSetWindowText (HWND arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    return SetWindowTextW (arg1, (LPCWSTR) arg2);
  else
    return SetWindowTextA (arg1, (LPCSTR) arg2);
}

/* NOTE: probs w/ICONMETRICS, NONCLIENTMETRICS */
BOOL
qxeSystemParametersInfo (UINT arg1, UINT arg2, PVOID arg3, UINT arg4)
{
  if (XEUNICODE_P)
    return SystemParametersInfoW (arg1, arg2, arg3, arg4);
  else
    return SystemParametersInfoA (arg1, arg2, arg3, arg4);
}

LONG
qxeTabbedTextOut (HDC arg1, int arg2, int arg3, const Extbyte * arg4, int arg5, int arg6, LPINT arg7, int arg8)
{
  if (XEUNICODE_P)
    return TabbedTextOutW (arg1, arg2, arg3, (LPCWSTR) arg4, arg5, arg6, arg7, arg8);
  else
    return TabbedTextOutA (arg1, arg2, arg3, (LPCSTR) arg4, arg5, arg6, arg7, arg8);
}

int
qxeTranslateAccelerator (HWND arg1, HACCEL arg2, LPMSG arg3)
{
  if (XEUNICODE_P)
    return TranslateAcceleratorW (arg1, arg2, arg3);
  else
    return TranslateAcceleratorA (arg1, arg2, arg3);
}

/* Skipping UnregisterClass because need to intercept for reasons related to RegisterClass */

/* Error if VkKeyScanEx used: split CHAR; NT 4.0+ only */

/* Skipping VkKeyScan because split CHAR */

BOOL
qxeWinHelp (HWND arg1, const Extbyte * arg2, UINT arg3, DWORD arg4)
{
  if (XEUNICODE_P)
    return WinHelpW (arg1, (LPCWSTR) arg2, arg3, arg4);
  else
    return WinHelpA (arg1, (LPCSTR) arg2, arg3, arg4);
}

int
qxewvsprintf (Extbyte * arg1, const Extbyte * arg2, va_list arglist)
{
  if (XEUNICODE_P)
    return wvsprintfW ((LPWSTR) arg1, (LPCWSTR) arg2, arglist);
  else
    return wvsprintfA ((LPSTR) arg1, (LPCSTR) arg2, arglist);
}


/*----------------------------------------------------------------------*/
/*                       Processing file DDEML.H                        */
/*----------------------------------------------------------------------*/

/* NOTE: former error in Cygwin prototype, but no more (Cygwin 1.7, 1-30-10) */
HSZ
qxeDdeCreateStringHandle (DWORD arg1, const Extbyte * arg2, int arg3)
{
  if (XEUNICODE_P)
    return DdeCreateStringHandleW (arg1, (LPCWSTR) arg2, arg3);
  else
    return DdeCreateStringHandleA (arg1, (LPCSTR) arg2, arg3);
}

UINT
qxeDdeInitialize (PDWORD arg1, PFNCALLBACK arg2, DWORD arg3, DWORD arg4)
{
  if (XEUNICODE_P)
    return DdeInitializeW (arg1, arg2, arg3, arg4);
  else
    return DdeInitializeA (arg1, arg2, arg3, arg4);
}

DWORD
qxeDdeQueryString (DWORD arg1, HSZ arg2, Extbyte * arg3, DWORD arg4, int arg5)
{
  if (XEUNICODE_P)
    return DdeQueryStringW (arg1, arg2, (LPWSTR) arg3, arg4, arg5);
  else
    return DdeQueryStringA (arg1, arg2, (LPSTR) arg3, arg4, arg5);
}


/*----------------------------------------------------------------------*/
/*                       Processing file WINREG.H                       */
/*----------------------------------------------------------------------*/

/* NOTE: error arg 1, Cygwin prototype, extra const.
   NOTE: Prototype manually overridden.
         Header file claims:
           WINADVAPI BOOL WINAPI AbortSystemShutdown(LPCWSTR)
         Overridden with:
           BOOL AbortSystemShutdown(LPWSTR)
         Differences in return-type qualifiers, e.g. WINAPI, are not important.
 */
BOOL
qxeAbortSystemShutdown (Extbyte * arg1)
{
  if (XEUNICODE_P)
    return AbortSystemShutdownW ((LPWSTR) arg1);
  else
    return AbortSystemShutdownA ((LPSTR) arg1);
}

BOOL
qxeInitiateSystemShutdown (Extbyte * arg1, Extbyte * arg2, DWORD arg3, BOOL arg4, BOOL arg5)
{
  if (XEUNICODE_P)
    return InitiateSystemShutdownW ((LPWSTR) arg1, (LPWSTR) arg2, arg3, arg4, arg5);
  else
    return InitiateSystemShutdownA ((LPSTR) arg1, (LPSTR) arg2, arg3, arg4, arg5);
}

/* NOTE: former error in Cygwin prototype, but no more (Cygwin 1.7, 1-30-10) */
LONG
qxeRegConnectRegistry (const Extbyte * arg1, HKEY arg2, PHKEY arg3)
{
  if (XEUNICODE_P)
    return RegConnectRegistryW ((LPCWSTR) arg1, arg2, arg3);
  else
    return RegConnectRegistryA ((LPCSTR) arg1, arg2, arg3);
}

LONG
qxeRegCreateKeyEx (HKEY arg1, const Extbyte * arg2, DWORD arg3, Extbyte * arg4, DWORD arg5, REGSAM arg6, LPSECURITY_ATTRIBUTES arg7, PHKEY arg8, PDWORD arg9)
{
  if (XEUNICODE_P)
    return RegCreateKeyExW (arg1, (LPCWSTR) arg2, arg3, (LPWSTR) arg4, arg5, arg6, arg7, arg8, arg9);
  else
    return RegCreateKeyExA (arg1, (LPCSTR) arg2, arg3, (LPSTR) arg4, arg5, arg6, arg7, arg8, arg9);
}

LONG
qxeRegCreateKey (HKEY arg1, const Extbyte * arg2, PHKEY arg3)
{
  if (XEUNICODE_P)
    return RegCreateKeyW (arg1, (LPCWSTR) arg2, arg3);
  else
    return RegCreateKeyA (arg1, (LPCSTR) arg2, arg3);
}

LONG
qxeRegDeleteKey (HKEY arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    return RegDeleteKeyW (arg1, (LPCWSTR) arg2);
  else
    return RegDeleteKeyA (arg1, (LPCSTR) arg2);
}

/* Error if RegDeleteKeyEx used: Function needs review to determine how to handle it */

LONG
qxeRegDeleteValue (HKEY arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    return RegDeleteValueW (arg1, (LPCWSTR) arg2);
  else
    return RegDeleteValueA (arg1, (LPCSTR) arg2);
}

LONG
qxeRegEnumKey (HKEY arg1, DWORD arg2, Extbyte * arg3, DWORD arg4)
{
  if (XEUNICODE_P)
    return RegEnumKeyW (arg1, arg2, (LPWSTR) arg3, arg4);
  else
    return RegEnumKeyA (arg1, arg2, (LPSTR) arg3, arg4);
}

LONG
qxeRegEnumKeyEx (HKEY arg1, DWORD arg2, Extbyte * arg3, PDWORD arg4, PDWORD arg5, Extbyte * arg6, PDWORD arg7, PFILETIME arg8)
{
  if (XEUNICODE_P)
    return RegEnumKeyExW (arg1, arg2, (LPWSTR) arg3, arg4, arg5, (LPWSTR) arg6, arg7, arg8);
  else
    return RegEnumKeyExA (arg1, arg2, (LPSTR) arg3, arg4, arg5, (LPSTR) arg6, arg7, arg8);
}

LONG
qxeRegEnumValue (HKEY arg1, DWORD arg2, Extbyte * arg3, PDWORD arg4, PDWORD arg5, PDWORD arg6, LPBYTE arg7, PDWORD arg8)
{
  if (XEUNICODE_P)
    return RegEnumValueW (arg1, arg2, (LPWSTR) arg3, arg4, arg5, arg6, arg7, arg8);
  else
    return RegEnumValueA (arg1, arg2, (LPSTR) arg3, arg4, arg5, arg6, arg7, arg8);
}

LONG
qxeRegLoadKey (HKEY arg1, const Extbyte * arg2, const Extbyte * arg3)
{
  if (XEUNICODE_P)
    return RegLoadKeyW (arg1, (LPCWSTR) arg2, (LPCWSTR) arg3);
  else
    return RegLoadKeyA (arg1, (LPCSTR) arg2, (LPCSTR) arg3);
}

LONG
qxeRegOpenKeyEx (HKEY arg1, const Extbyte * arg2, DWORD arg3, REGSAM arg4, PHKEY arg5)
{
  if (XEUNICODE_P)
    return RegOpenKeyExW (arg1, (LPCWSTR) arg2, arg3, arg4, arg5);
  else
    return RegOpenKeyExA (arg1, (LPCSTR) arg2, arg3, arg4, arg5);
}

LONG
qxeRegOpenKey (HKEY arg1, const Extbyte * arg2, PHKEY arg3)
{
  if (XEUNICODE_P)
    return RegOpenKeyW (arg1, (LPCWSTR) arg2, arg3);
  else
    return RegOpenKeyA (arg1, (LPCSTR) arg2, arg3);
}

LONG
qxeRegQueryInfoKey (HKEY arg1, Extbyte * arg2, PDWORD arg3, PDWORD arg4, PDWORD arg5, PDWORD arg6, PDWORD arg7, PDWORD arg8, PDWORD arg9, PDWORD arg10, PDWORD arg11, PFILETIME arg12)
{
  if (XEUNICODE_P)
    return RegQueryInfoKeyW (arg1, (LPWSTR) arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12);
  else
    return RegQueryInfoKeyA (arg1, (LPSTR) arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12);
}

LONG
qxeRegQueryMultipleValues (HKEY arg1, PVALENTW arg2, DWORD arg3, Extbyte * arg4, LPDWORD arg5)
{
  if (XEUNICODE_P)
    return RegQueryMultipleValuesW (arg1, arg2, arg3, (LPWSTR) arg4, arg5);
  else
    return RegQueryMultipleValuesA (arg1, (PVALENTA) arg2, arg3, (LPSTR) arg4, arg5);
}

LONG
qxeRegQueryValueEx (HKEY arg1, const Extbyte * arg2, LPDWORD arg3, LPDWORD arg4, LPBYTE arg5, LPDWORD arg6)
{
  if (XEUNICODE_P)
    return RegQueryValueExW (arg1, (LPCWSTR) arg2, arg3, arg4, arg5, arg6);
  else
    return RegQueryValueExA (arg1, (LPCSTR) arg2, arg3, arg4, arg5, arg6);
}

LONG
qxeRegQueryValue (HKEY arg1, const Extbyte * arg2, Extbyte * arg3, PLONG arg4)
{
  if (XEUNICODE_P)
    return RegQueryValueW (arg1, (LPCWSTR) arg2, (LPWSTR) arg3, arg4);
  else
    return RegQueryValueA (arg1, (LPCSTR) arg2, (LPSTR) arg3, arg4);
}

LONG
qxeRegReplaceKey (HKEY arg1, const Extbyte * arg2, const Extbyte * arg3, const Extbyte * arg4)
{
  if (XEUNICODE_P)
    return RegReplaceKeyW (arg1, (LPCWSTR) arg2, (LPCWSTR) arg3, (LPCWSTR) arg4);
  else
    return RegReplaceKeyA (arg1, (LPCSTR) arg2, (LPCSTR) arg3, (LPCSTR) arg4);
}

LONG
qxeRegRestoreKey (HKEY arg1, const Extbyte * arg2, DWORD arg3)
{
  if (XEUNICODE_P)
    return RegRestoreKeyW (arg1, (LPCWSTR) arg2, arg3);
  else
    return RegRestoreKeyA (arg1, (LPCSTR) arg2, arg3);
}

LONG
qxeRegSaveKey (HKEY arg1, const Extbyte * arg2, LPSECURITY_ATTRIBUTES arg3)
{
  if (XEUNICODE_P)
    return RegSaveKeyW (arg1, (LPCWSTR) arg2, arg3);
  else
    return RegSaveKeyA (arg1, (LPCSTR) arg2, arg3);
}

LONG
qxeRegSetValueEx (HKEY arg1, const Extbyte * arg2, DWORD arg3, DWORD arg4, const BYTE* arg5, DWORD arg6)
{
  if (XEUNICODE_P)
    return RegSetValueExW (arg1, (LPCWSTR) arg2, arg3, arg4, arg5, arg6);
  else
    return RegSetValueExA (arg1, (LPCSTR) arg2, arg3, arg4, arg5, arg6);
}

LONG
qxeRegSetValue (HKEY arg1, const Extbyte * arg2, DWORD arg3, const Extbyte * arg4, DWORD arg5)
{
  if (XEUNICODE_P)
    return RegSetValueW (arg1, (LPCWSTR) arg2, arg3, (LPCWSTR) arg4, arg5);
  else
    return RegSetValueA (arg1, (LPCSTR) arg2, arg3, (LPCSTR) arg4, arg5);
}

LONG
qxeRegUnLoadKey (HKEY arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    return RegUnLoadKeyW (arg1, (LPCWSTR) arg2);
  else
    return RegUnLoadKeyA (arg1, (LPCSTR) arg2);
}


/*----------------------------------------------------------------------*/
/*                       Processing file WINNLS.H                       */
/*----------------------------------------------------------------------*/

/* Error if CompareString used: not used, not examined yet */

/* Error if EnumCalendarInfo used: not used, not examined yet */

/* Error if EnumDateFormats used: not used, not examined yet */

/* Error if EnumSystemCodePages used: not used, not examined yet */

/* Error if EnumSystemLocales used: not used, not examined yet */

/* Error if EnumTimeFormats used: not used, not examined yet */

/* Error if FoldString used: not used, not examined yet */

/* Error if GetCalendarInfo used: Function needs review to determine how to handle it */

/* Error if GetCPInfoEx used: not used, not examined yet */

/* Error if GetCurrencyFormat used: not used, not examined yet */

/* Error if GetDateFormat used: not used, not examined yet */

/* Error if GetGeoInfo used: Function needs review to determine how to handle it */

int
qxeGetLocaleInfo (LCID arg1, LCTYPE arg2, Extbyte * arg3, int arg4)
{
  if (XEUNICODE_P)
    return GetLocaleInfoW (arg1, arg2, (LPWSTR) arg3, arg4);
  else
    return GetLocaleInfoA (arg1, arg2, (LPSTR) arg3, arg4);
}

/* Error if GetNumberFormat used: not used, not examined yet */

/* Error if GetStringType used: no such fun; A and W versions have different nos. of args */

/* Error if GetStringTypeEx used: not used, not examined yet */

/* Error if GetTimeFormat used: not used, not examined yet */

/* Error if LCMapString used: not used, not examined yet */

/* Error if SetCalendarInfo used: Function needs review to determine how to handle it */

BOOL
qxeSetLocaleInfo (LCID arg1, LCTYPE arg2, const Extbyte * arg3)
{
  if (XEUNICODE_P)
    return SetLocaleInfoW (arg1, arg2, (LPCWSTR) arg3);
  else
    return SetLocaleInfoA (arg1, arg2, (LPCSTR) arg3);
}

/* Error if EnumCalendarInfoEx used: not used, not examined yet */

/* Error if EnumDateFormatsEx used: not used, not examined yet */

/* Error if EnumSystemLanguageGroups used: Function needs review to determine how to handle it */

/* Error if EnumLanguageGroupLocales used: Function needs review to determine how to handle it */

/* Error if EnumUILanguages used: Function needs review to determine how to handle it */


/*----------------------------------------------------------------------*/
/*                       Processing file WINGDI.H                       */
/*----------------------------------------------------------------------*/

#if defined (HAVE_MS_WINDOWS)

int
qxeAddFontResource (const Extbyte * arg1)
{
  if (XEUNICODE_P)
    return AddFontResourceW ((LPCWSTR) arg1);
  else
    return AddFontResourceA ((LPCSTR) arg1);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if AddFontResourceEx used: NT 5.0+ only */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

HENHMETAFILE
qxeCopyEnhMetaFile (HENHMETAFILE arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    return CopyEnhMetaFileW (arg1, (LPCWSTR) arg2);
  else
    return CopyEnhMetaFileA (arg1, (LPCSTR) arg2);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

HMETAFILE
qxeCopyMetaFile (HMETAFILE arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    return CopyMetaFileW (arg1, (LPCWSTR) arg2);
  else
    return CopyMetaFileA (arg1, (LPCSTR) arg2);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if CreateColorSpace used: split-sized LPLOGCOLORSPACE; NT 4.0+ only */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Skipping CreateDC because split-sized DEVMODE */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

HDC
qxeCreateEnhMetaFile (HDC arg1, const Extbyte * arg2, LPCRECT arg3, const Extbyte * arg4)
{
  if (XEUNICODE_P)
    return CreateEnhMetaFileW (arg1, (LPCWSTR) arg2, arg3, (LPCWSTR) arg4);
  else
    return CreateEnhMetaFileA (arg1, (LPCSTR) arg2, arg3, (LPCSTR) arg4);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

HFONT
qxeCreateFont (int arg1, int arg2, int arg3, int arg4, int arg5, DWORD arg6, DWORD arg7, DWORD arg8, DWORD arg9, DWORD arg10, DWORD arg11, DWORD arg12, DWORD arg13, const Extbyte * arg14)
{
  if (XEUNICODE_P)
    return CreateFontW (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, (LPCWSTR) arg14);
  else
    return CreateFontA (arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, (LPCSTR) arg14);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Skipping CreateFontIndirect because split-sized LOGFONT */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Skipping CreateIC because split-sized DEVMODE */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

HDC
qxeCreateMetaFile (const Extbyte * arg1)
{
  if (XEUNICODE_P)
    return CreateMetaFileW ((LPCWSTR) arg1);
  else
    return CreateMetaFileA ((LPCSTR) arg1);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

BOOL
qxeCreateScalableFontResource (DWORD arg1, const Extbyte * arg2, const Extbyte * arg3, const Extbyte * arg4)
{
  if (XEUNICODE_P)
    return CreateScalableFontResourceW (arg1, (LPCWSTR) arg2, (LPCWSTR) arg3, (LPCWSTR) arg4);
  else
    return CreateScalableFontResourceA (arg1, (LPCSTR) arg2, (LPCSTR) arg3, (LPCSTR) arg4);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Skipping DeviceCapabilities because split-sized DEVMODE */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if EnumFontFamilies used: split-complex FONTENUMPROC */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Skipping EnumFontFamiliesEx because split-complex FONTENUMPROC; NT 4.0+ only */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if EnumFonts used: split-complex FONTENUMPROC */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* NOTE: NT 4.0+ only */
int
qxeEnumICMProfiles (HDC arg1, ICMENUMPROCW arg2, LPARAM arg3)
{
  if (XEUNICODE_P)
    return EnumICMProfilesW (arg1, arg2, arg3);
  else
    return EnumICMProfilesA (arg1, (ICMENUMPROCA) arg2, arg3);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

BOOL
qxeExtTextOut (HDC arg1, int arg2, int arg3, UINT arg4, LPCRECT arg5, const Extbyte * arg6, UINT arg7, const INT* arg8)
{
  if (XEUNICODE_P)
    return ExtTextOutW (arg1, arg2, arg3, arg4, arg5, (LPCWSTR) arg6, arg7, arg8);
  else
    return ExtTextOutA (arg1, arg2, arg3, arg4, arg5, (LPCSTR) arg6, arg7, arg8);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

BOOL
qxeGetCharABCWidths (HDC arg1, UINT arg2, UINT arg3, LPABC arg4)
{
  if (XEUNICODE_P)
    return GetCharABCWidthsW (arg1, arg2, arg3, arg4);
  else
    return GetCharABCWidthsA (arg1, arg2, arg3, arg4);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

BOOL
qxeGetCharABCWidthsFloat (HDC arg1, UINT arg2, UINT arg3, LPABCFLOAT arg4)
{
  if (XEUNICODE_P)
    return GetCharABCWidthsFloatW (arg1, arg2, arg3, arg4);
  else
    return GetCharABCWidthsFloatA (arg1, arg2, arg3, arg4);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* NOTE: NT 4.0+ only */
DWORD
qxeGetCharacterPlacement (HDC arg1, const Extbyte * arg2, int arg3, int arg4, LPGCP_RESULTSW arg5, DWORD arg6)
{
  if (XEUNICODE_P)
    return GetCharacterPlacementW (arg1, (LPCWSTR) arg2, arg3, arg4, arg5, arg6);
  else
    return GetCharacterPlacementA (arg1, (LPCSTR) arg2, arg3, arg4, (LPGCP_RESULTSA) arg5, arg6);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

BOOL
qxeGetCharWidth32 (HDC arg1, UINT arg2, UINT arg3, LPINT arg4)
{
  if (XEUNICODE_P)
    return GetCharWidth32W (arg1, arg2, arg3, arg4);
  else
    return GetCharWidth32A (arg1, arg2, arg3, arg4);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

BOOL
qxeGetCharWidth (HDC arg1, UINT arg2, UINT arg3, LPINT arg4)
{
  if (XEUNICODE_P)
    return GetCharWidthW (arg1, arg2, arg3, arg4);
  else
    return GetCharWidthA (arg1, arg2, arg3, arg4);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

BOOL
qxeGetCharWidthFloat (HDC arg1, UINT arg2, UINT arg3, PFLOAT arg4)
{
  if (XEUNICODE_P)
    return GetCharWidthFloatW (arg1, arg2, arg3, arg4);
  else
    return GetCharWidthFloatA (arg1, arg2, arg3, arg4);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

HENHMETAFILE
qxeGetEnhMetaFile (const Extbyte * arg1)
{
  if (XEUNICODE_P)
    return GetEnhMetaFileW ((LPCWSTR) arg1);
  else
    return GetEnhMetaFileA ((LPCSTR) arg1);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

UINT
qxeGetEnhMetaFileDescription (HENHMETAFILE arg1, UINT arg2, Extbyte * arg3)
{
  if (XEUNICODE_P)
    return GetEnhMetaFileDescriptionW (arg1, arg2, (LPWSTR) arg3);
  else
    return GetEnhMetaFileDescriptionA (arg1, arg2, (LPSTR) arg3);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

DWORD
qxeGetGlyphOutline (HDC arg1, UINT arg2, UINT arg3, LPGLYPHMETRICS arg4, DWORD arg5, PVOID arg6, const MAT2* arg7)
{
  if (XEUNICODE_P)
    return GetGlyphOutlineW (arg1, arg2, arg3, arg4, arg5, arg6, arg7);
  else
    return GetGlyphOutlineA (arg1, arg2, arg3, arg4, arg5, arg6, arg7);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* NOTE: NT 4.0+ only, former error in Cygwin prototype but no more (Cygwin 1.7, 1-30-10) */
BOOL
qxeGetICMProfile (HDC arg1, LPDWORD arg2, Extbyte * arg3)
{
  if (XEUNICODE_P)
    return GetICMProfileW (arg1, arg2, (LPWSTR) arg3);
  else
    return GetICMProfileA (arg1, arg2, (LPSTR) arg3);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

DWORD
qxeGetKerningPairs (HDC arg1, DWORD arg2, LPKERNINGPAIR arg3)
{
  if (XEUNICODE_P)
    return GetKerningPairsW (arg1, arg2, arg3);
  else
    return GetKerningPairsA (arg1, arg2, arg3);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if GetLogColorSpace used: split-sized LPLOGCOLORSPACE; NT 4.0+ only */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

HMETAFILE
qxeGetMetaFile (const Extbyte * arg1)
{
  if (XEUNICODE_P)
    return GetMetaFileW ((LPCWSTR) arg1);
  else
    return GetMetaFileA ((LPCSTR) arg1);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Skipping GetObject because split-sized LOGFONT */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if GetOutlineTextMetrics used: split-sized LPOUTLINETEXTMETRIC */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

BOOL
qxeGetTextExtentExPoint (HDC arg1, const Extbyte * arg2, int arg3, int arg4, LPINT arg5, LPINT arg6, LPSIZE arg7)
{
  if (XEUNICODE_P)
    return GetTextExtentExPointW (arg1, (LPCWSTR) arg2, arg3, arg4, arg5, arg6, arg7);
  else
    return GetTextExtentExPointA (arg1, (LPCSTR) arg2, arg3, arg4, arg5, arg6, arg7);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

BOOL
qxeGetTextExtentPoint (HDC arg1, const Extbyte * arg2, int arg3, LPSIZE arg4)
{
  if (XEUNICODE_P)
    return GetTextExtentPointW (arg1, (LPCWSTR) arg2, arg3, arg4);
  else
    return GetTextExtentPointA (arg1, (LPCSTR) arg2, arg3, arg4);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

BOOL
qxeGetTextExtentPoint32 (HDC arg1, const Extbyte * arg2, int arg3, LPSIZE arg4)
{
  if (XEUNICODE_P)
    return GetTextExtentPoint32W (arg1, (LPCWSTR) arg2, arg3, arg4);
  else
    return GetTextExtentPoint32A (arg1, (LPCSTR) arg2, arg3, arg4);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

int
qxeGetTextFace (HDC arg1, int arg2, Extbyte * arg3)
{
  if (XEUNICODE_P)
    return GetTextFaceW (arg1, arg2, (LPWSTR) arg3);
  else
    return GetTextFaceA (arg1, arg2, (LPSTR) arg3);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Skipping GetTextMetrics because split-sized LPTEXTMETRIC */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

BOOL
qxePolyTextOut (HDC arg1, const POLYTEXTW* arg2, int arg3)
{
  if (XEUNICODE_P)
    return PolyTextOutW (arg1, arg2, arg3);
  else
    return PolyTextOutA (arg1, (const POLYTEXTA*) arg2, arg3);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

BOOL
qxeRemoveFontResource (const Extbyte * arg1)
{
  if (XEUNICODE_P)
    return RemoveFontResourceW ((LPCWSTR) arg1);
  else
    return RemoveFontResourceA ((LPCSTR) arg1);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if RemoveFontResourceEx used: NT 5.0+ only */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Skipping ResetDC because split-sized DEVMODE */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* NOTE: NT 4.0+ only */
BOOL
qxeSetICMProfile (HDC arg1, Extbyte * arg2)
{
  if (XEUNICODE_P)
    return SetICMProfileW (arg1, (LPWSTR) arg2);
  else
    return SetICMProfileA (arg1, (LPSTR) arg2);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

int
qxeStartDoc (HDC arg1, const DOCINFOW* arg2)
{
  if (XEUNICODE_P)
    return StartDocW (arg1, arg2);
  else
    return StartDocA (arg1, (const DOCINFOA*) arg2);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

BOOL
qxeTextOut (HDC arg1, int arg2, int arg3, const Extbyte * arg4, int arg5)
{
  if (XEUNICODE_P)
    return TextOutW (arg1, arg2, arg3, (LPCWSTR) arg4, arg5);
  else
    return TextOutA (arg1, arg2, arg3, (LPCSTR) arg4, arg5);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Skipping UpdateICMRegKey because NT 4.0+ only, error in Cygwin prototype */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if wglUseFontBitmaps used: causes link error */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if wglUseFontOutlines used: causes link error */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if GetGlyphIndices used: NT 5.0+ only */

#endif /* defined (HAVE_MS_WINDOWS) */


/*----------------------------------------------------------------------*/
/*                       Processing file SHLOBJ.H                       */
/*----------------------------------------------------------------------*/

/* Skipping SHBrowseForFolder because need to intercept callback for SendMessage */

/* Skipping SHGetDataFromIDList because split-sized WIN32_FIND_DATA or split-simple NETRESOURCE, missing from Cygwin libraries */

BOOL
qxeSHGetPathFromIDList (LPCITEMIDLIST arg1, Extbyte * arg2)
{
  if (XEUNICODE_P)
    return SHGetPathFromIDListW (arg1, (LPWSTR) arg2);
  else
    return SHGetPathFromIDListA (arg1, (LPSTR) arg2);
}

/* Skipping SHGetSpecialFolderPath because error in Cygwin prototype, missing from Cygwin libraries */

/* Error if SHGetFolderPath used: Function needs review to determine how to handle it */

/* Error if SHGetIconOverlayIndex used: Function needs review to determine how to handle it */

/* Error if SHCreateDirectoryEx used: Function needs review to determine how to handle it */

/* Error if SHGetFolderPathAndSubDir used: Function needs review to determine how to handle it */


/*----------------------------------------------------------------------*/
/*                      Processing file COMMDLG.H                       */
/*----------------------------------------------------------------------*/

#if defined (HAVE_MS_WINDOWS)

BOOL
qxeChooseColor (LPCHOOSECOLORW arg1)
{
  if (XEUNICODE_P)
    return ChooseColorW (arg1);
  else
    return ChooseColorA ((LPCHOOSECOLORA) arg1);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if ChooseFont used: split-sized LPLOGFONT in LPCHOOSEFONT */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

HWND
qxeFindText (LPFINDREPLACEW arg1)
{
  if (XEUNICODE_P)
    return FindTextW (arg1);
  else
    return FindTextA ((LPFINDREPLACEA) arg1);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

short
qxeGetFileTitle (const Extbyte * arg1, Extbyte * arg2, WORD arg3)
{
  if (XEUNICODE_P)
    return GetFileTitleW ((LPCWSTR) arg1, (LPWSTR) arg2, arg3);
  else
    return GetFileTitleA ((LPCSTR) arg1, (LPSTR) arg2, arg3);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

BOOL
qxeGetOpenFileName (LPOPENFILENAMEW arg1)
{
  if (XEUNICODE_P)
    return GetOpenFileNameW (arg1);
  else
    return GetOpenFileNameA ((LPOPENFILENAMEA) arg1);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

BOOL
qxeGetSaveFileName (LPOPENFILENAMEW arg1)
{
  if (XEUNICODE_P)
    return GetSaveFileNameW (arg1);
  else
    return GetSaveFileNameA ((LPOPENFILENAMEA) arg1);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Skipping PageSetupDlg because LPPAGESETUPDLG with split-sized DEVMODE handle */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Skipping PrintDlg because LPPRINTDLG with split-sized DEVMODE handle */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

HWND
qxeReplaceText (LPFINDREPLACEW arg1)
{
  if (XEUNICODE_P)
    return ReplaceTextW (arg1);
  else
    return ReplaceTextA ((LPFINDREPLACEA) arg1);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if PrintDlgEx used: Function needs review to determine how to handle it */

#endif /* defined (HAVE_MS_WINDOWS) */


/*----------------------------------------------------------------------*/
/*                        Processing file IMM.H                         */
/*----------------------------------------------------------------------*/

#if defined (HAVE_MS_WINDOWS)

HKL
qxeImmInstallIME (const Extbyte * arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    return ImmInstallIMEW ((LPCWSTR) arg1, (LPCWSTR) arg2);
  else
    return ImmInstallIMEA ((LPCSTR) arg1, (LPCSTR) arg2);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

UINT
qxeImmGetDescription (HKL arg1, Extbyte * arg2, UINT arg3)
{
  if (XEUNICODE_P)
    return ImmGetDescriptionW (arg1, (LPWSTR) arg2, arg3);
  else
    return ImmGetDescriptionA (arg1, (LPSTR) arg2, arg3);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

UINT
qxeImmGetIMEFileName (HKL arg1, Extbyte * arg2, UINT arg3)
{
  if (XEUNICODE_P)
    return ImmGetIMEFileNameW (arg1, (LPWSTR) arg2, arg3);
  else
    return ImmGetIMEFileNameA (arg1, (LPSTR) arg2, arg3);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

LONG
qxeImmGetCompositionString (HIMC arg1, DWORD arg2, PVOID arg3, DWORD arg4)
{
  if (XEUNICODE_P)
    return ImmGetCompositionStringW (arg1, arg2, arg3, arg4);
  else
    return ImmGetCompositionStringA (arg1, arg2, arg3, arg4);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Skipping ImmSetCompositionString because different prototypes in VC6 and VC7 */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

DWORD
qxeImmGetCandidateListCount (HIMC arg1, PDWORD arg2)
{
  if (XEUNICODE_P)
    return ImmGetCandidateListCountW (arg1, arg2);
  else
    return ImmGetCandidateListCountA (arg1, arg2);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

DWORD
qxeImmGetCandidateList (HIMC arg1, DWORD arg2, PCANDIDATELIST arg3, DWORD arg4)
{
  if (XEUNICODE_P)
    return ImmGetCandidateListW (arg1, arg2, arg3, arg4);
  else
    return ImmGetCandidateListA (arg1, arg2, arg3, arg4);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

DWORD
qxeImmGetGuideLine (HIMC arg1, DWORD arg2, Extbyte * arg3, DWORD arg4)
{
  if (XEUNICODE_P)
    return ImmGetGuideLineW (arg1, arg2, (LPWSTR) arg3, arg4);
  else
    return ImmGetGuideLineA (arg1, arg2, (LPSTR) arg3, arg4);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Skipping ImmGetCompositionFont because split-sized LOGFONT */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Skipping ImmSetCompositionFont because split-sized LOGFONT */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* NOTE: // split-simple REGISTERWORD */
BOOL
qxeImmConfigureIME (HKL arg1, HWND arg2, DWORD arg3, PVOID arg4)
{
  if (XEUNICODE_P)
    return ImmConfigureIMEW (arg1, arg2, arg3, arg4);
  else
    return ImmConfigureIMEA (arg1, arg2, arg3, arg4);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* NOTE: // strings of various sorts */
LRESULT
qxeImmEscape (HKL arg1, HIMC arg2, UINT arg3, PVOID arg4)
{
  if (XEUNICODE_P)
    return ImmEscapeW (arg1, arg2, arg3, arg4);
  else
    return ImmEscapeA (arg1, arg2, arg3, arg4);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

DWORD
qxeImmGetConversionList (HKL arg1, HIMC arg2, const Extbyte * arg3, PCANDIDATELIST arg4, DWORD arg5, UINT arg6)
{
  if (XEUNICODE_P)
    return ImmGetConversionListW (arg1, arg2, (LPCWSTR) arg3, arg4, arg5, arg6);
  else
    return ImmGetConversionListA (arg1, arg2, (LPCSTR) arg3, arg4, arg5, arg6);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

BOOL
qxeImmIsUIMessage (HWND arg1, UINT arg2, WPARAM arg3, LPARAM arg4)
{
  if (XEUNICODE_P)
    return ImmIsUIMessageW (arg1, arg2, arg3, arg4);
  else
    return ImmIsUIMessageA (arg1, arg2, arg3, arg4);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

BOOL
qxeImmRegisterWord (HKL arg1, const Extbyte * arg2, DWORD arg3, const Extbyte * arg4)
{
  if (XEUNICODE_P)
    return ImmRegisterWordW (arg1, (LPCWSTR) arg2, arg3, (LPCWSTR) arg4);
  else
    return ImmRegisterWordA (arg1, (LPCSTR) arg2, arg3, (LPCSTR) arg4);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

BOOL
qxeImmUnregisterWord (HKL arg1, const Extbyte * arg2, DWORD arg3, const Extbyte * arg4)
{
  if (XEUNICODE_P)
    return ImmUnregisterWordW (arg1, (LPCWSTR) arg2, arg3, (LPCWSTR) arg4);
  else
    return ImmUnregisterWordA (arg1, (LPCSTR) arg2, arg3, (LPCSTR) arg4);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if ImmGetRegisterWordStyle used: split-sized STYLEBUF */

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

UINT
qxeImmEnumRegisterWord (HKL arg1, REGISTERWORDENUMPROCW arg2, const Extbyte * arg3, DWORD arg4, const Extbyte * arg5, PVOID arg6)
{
  if (XEUNICODE_P)
    return ImmEnumRegisterWordW (arg1, arg2, (LPCWSTR) arg3, arg4, (LPCWSTR) arg5, arg6);
  else
    return ImmEnumRegisterWordA (arg1, (REGISTERWORDENUMPROCA) arg2, (LPCSTR) arg3, arg4, (LPCSTR) arg5, arg6);
}

#endif /* defined (HAVE_MS_WINDOWS) */

#if defined (HAVE_MS_WINDOWS)

/* Error if ImmGetImeMenuItems used: split-sized IMEMENUITEMINFO */

#endif /* defined (HAVE_MS_WINDOWS) */


/*----------------------------------------------------------------------*/
/*                      Processing file WINBASE.H                       */
/*----------------------------------------------------------------------*/

BOOL
qxeAccessCheckAndAuditAlarm (const Extbyte * arg1, LPVOID arg2, Extbyte * arg3, Extbyte * arg4, PSECURITY_DESCRIPTOR arg5, DWORD arg6, PGENERIC_MAPPING arg7, BOOL arg8, PDWORD arg9, PBOOL arg10, PBOOL arg11)
{
  if (XEUNICODE_P)
    return AccessCheckAndAuditAlarmW ((LPCWSTR) arg1, arg2, (LPWSTR) arg3, (LPWSTR) arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11);
  else
    return AccessCheckAndAuditAlarmA ((LPCSTR) arg1, arg2, (LPSTR) arg3, (LPSTR) arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11);
}

ATOM
qxeAddAtom (const Extbyte * arg1)
{
  if (XEUNICODE_P)
    return AddAtomW ((LPCWSTR) arg1);
  else
    return AddAtomA ((LPCSTR) arg1);
}

BOOL
qxeBackupEventLog (HANDLE arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    return BackupEventLogW (arg1, (LPCWSTR) arg2);
  else
    return BackupEventLogA (arg1, (LPCSTR) arg2);
}

HANDLE
qxeBeginUpdateResource (const Extbyte * arg1, BOOL arg2)
{
  if (XEUNICODE_P)
    return BeginUpdateResourceW ((LPCWSTR) arg1, arg2);
  else
    return BeginUpdateResourceA ((LPCSTR) arg1, arg2);
}

BOOL
qxeBuildCommDCB (const Extbyte * arg1, LPDCB arg2)
{
  if (XEUNICODE_P)
    return BuildCommDCBW ((LPCWSTR) arg1, arg2);
  else
    return BuildCommDCBA ((LPCSTR) arg1, arg2);
}

BOOL
qxeBuildCommDCBAndTimeouts (const Extbyte * arg1, LPDCB arg2, LPCOMMTIMEOUTS arg3)
{
  if (XEUNICODE_P)
    return BuildCommDCBAndTimeoutsW ((LPCWSTR) arg1, arg2, arg3);
  else
    return BuildCommDCBAndTimeoutsA ((LPCSTR) arg1, arg2, arg3);
}

BOOL
qxeCallNamedPipe (const Extbyte * arg1, PVOID arg2, DWORD arg3, PVOID arg4, DWORD arg5, PDWORD arg6, DWORD arg7)
{
  if (XEUNICODE_P)
    return CallNamedPipeW ((LPCWSTR) arg1, arg2, arg3, arg4, arg5, arg6, arg7);
  else
    return CallNamedPipeA ((LPCSTR) arg1, arg2, arg3, arg4, arg5, arg6, arg7);
}

/* Error if CheckNameLegalDOS8Dot3 used: Function needs review to determine how to handle it */

BOOL
qxeClearEventLog (HANDLE arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    return ClearEventLogW (arg1, (LPCWSTR) arg2);
  else
    return ClearEventLogA (arg1, (LPCSTR) arg2);
}

BOOL
qxeCommConfigDialog (const Extbyte * arg1, HWND arg2, LPCOMMCONFIG arg3)
{
  if (XEUNICODE_P)
    return CommConfigDialogW ((LPCWSTR) arg1, arg2, arg3);
  else
    return CommConfigDialogA ((LPCSTR) arg1, arg2, arg3);
}

BOOL
qxeCopyFile (const Extbyte * arg1, const Extbyte * arg2, BOOL arg3)
{
  if (XEUNICODE_P)
    return CopyFileW ((LPCWSTR) arg1, (LPCWSTR) arg2, arg3);
  else
    return CopyFileA ((LPCSTR) arg1, (LPCSTR) arg2, arg3);
}

/* NOTE: NT 4.0+ only */
BOOL
qxeCopyFileEx (const Extbyte * arg1, const Extbyte * arg2, LPPROGRESS_ROUTINE arg3, LPVOID arg4, LPBOOL arg5, DWORD arg6)
{
  if (XEUNICODE_P)
    return CopyFileExW ((LPCWSTR) arg1, (LPCWSTR) arg2, arg3, arg4, arg5, arg6);
  else
    return CopyFileExA ((LPCSTR) arg1, (LPCSTR) arg2, arg3, arg4, arg5, arg6);
}

/* Error if CreateActCtx used: Function needs review to determine how to handle it */

BOOL
qxeCreateDirectory (const Extbyte * arg1, LPSECURITY_ATTRIBUTES arg2)
{
  if (XEUNICODE_P)
    return CreateDirectoryW ((LPCWSTR) arg1, arg2);
  else
    return CreateDirectoryA ((LPCSTR) arg1, arg2);
}

BOOL
qxeCreateDirectoryEx (const Extbyte * arg1, const Extbyte * arg2, LPSECURITY_ATTRIBUTES arg3)
{
  if (XEUNICODE_P)
    return CreateDirectoryExW ((LPCWSTR) arg1, (LPCWSTR) arg2, arg3);
  else
    return CreateDirectoryExA ((LPCSTR) arg1, (LPCSTR) arg2, arg3);
}

HANDLE
qxeCreateEvent (LPSECURITY_ATTRIBUTES arg1, BOOL arg2, BOOL arg3, const Extbyte * arg4)
{
  if (XEUNICODE_P)
    return CreateEventW (arg1, arg2, arg3, (LPCWSTR) arg4);
  else
    return CreateEventA (arg1, arg2, arg3, (LPCSTR) arg4);
}

HANDLE
qxeCreateFile (const Extbyte * arg1, DWORD arg2, DWORD arg3, LPSECURITY_ATTRIBUTES arg4, DWORD arg5, DWORD arg6, HANDLE arg7)
{
  if (XEUNICODE_P)
    return CreateFileW ((LPCWSTR) arg1, arg2, arg3, arg4, arg5, arg6, arg7);
  else
    return CreateFileA ((LPCSTR) arg1, arg2, arg3, arg4, arg5, arg6, arg7);
}

HANDLE
qxeCreateFileMapping (HANDLE arg1, LPSECURITY_ATTRIBUTES arg2, DWORD arg3, DWORD arg4, DWORD arg5, const Extbyte * arg6)
{
  if (XEUNICODE_P)
    return CreateFileMappingW (arg1, arg2, arg3, arg4, arg5, (LPCWSTR) arg6);
  else
    return CreateFileMappingA (arg1, arg2, arg3, arg4, arg5, (LPCSTR) arg6);
}

/* Error if CreateHardLink used: NT 5.0+ only */

/* Error if CreateJobObject used: NT 5.0+ only */

HANDLE
qxeCreateMailslot (const Extbyte * arg1, DWORD arg2, DWORD arg3, LPSECURITY_ATTRIBUTES arg4)
{
  if (XEUNICODE_P)
    return CreateMailslotW ((LPCWSTR) arg1, arg2, arg3, arg4);
  else
    return CreateMailslotA ((LPCSTR) arg1, arg2, arg3, arg4);
}

HANDLE
qxeCreateMutex (LPSECURITY_ATTRIBUTES arg1, BOOL arg2, const Extbyte * arg3)
{
  if (XEUNICODE_P)
    return CreateMutexW (arg1, arg2, (LPCWSTR) arg3);
  else
    return CreateMutexA (arg1, arg2, (LPCSTR) arg3);
}

HANDLE
qxeCreateNamedPipe (const Extbyte * arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7, LPSECURITY_ATTRIBUTES arg8)
{
  if (XEUNICODE_P)
    return CreateNamedPipeW ((LPCWSTR) arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
  else
    return CreateNamedPipeA ((LPCSTR) arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
}

BOOL
qxeCreateProcess (const Extbyte * arg1, Extbyte * arg2, LPSECURITY_ATTRIBUTES arg3, LPSECURITY_ATTRIBUTES arg4, BOOL arg5, DWORD arg6, PVOID arg7, const Extbyte * arg8, LPSTARTUPINFOW arg9, LPPROCESS_INFORMATION arg10)
{
  if (XEUNICODE_P)
    return CreateProcessW ((LPCWSTR) arg1, (LPWSTR) arg2, arg3, arg4, arg5, arg6, arg7, (LPCWSTR) arg8, arg9, arg10);
  else
    return CreateProcessA ((LPCSTR) arg1, (LPSTR) arg2, arg3, arg4, arg5, arg6, arg7, (LPCSTR) arg8, (LPSTARTUPINFOA) arg9, arg10);
}

BOOL
qxeCreateProcessAsUser (HANDLE arg1, const Extbyte * arg2, Extbyte * arg3, LPSECURITY_ATTRIBUTES arg4, LPSECURITY_ATTRIBUTES arg5, BOOL arg6, DWORD arg7, PVOID arg8, const Extbyte * arg9, LPSTARTUPINFOW arg10, LPPROCESS_INFORMATION arg11)
{
  if (XEUNICODE_P)
    return CreateProcessAsUserW (arg1, (LPCWSTR) arg2, (LPWSTR) arg3, arg4, arg5, arg6, arg7, arg8, (LPCWSTR) arg9, arg10, arg11);
  else
    return CreateProcessAsUserA (arg1, (LPCSTR) arg2, (LPSTR) arg3, arg4, arg5, arg6, arg7, arg8, (LPCSTR) arg9, (LPSTARTUPINFOA) arg10, arg11);
}

/* Error if CreateProcessWithLogon used: Function needs review to determine how to handle it */

HANDLE
qxeCreateSemaphore (LPSECURITY_ATTRIBUTES arg1, LONG arg2, LONG arg3, const Extbyte * arg4)
{
  if (XEUNICODE_P)
    return CreateSemaphoreW (arg1, arg2, arg3, (LPCWSTR) arg4);
  else
    return CreateSemaphoreA (arg1, arg2, arg3, (LPCSTR) arg4);
}

HANDLE
qxeCreateWaitableTimer (LPSECURITY_ATTRIBUTES arg1, BOOL arg2, const Extbyte * arg3)
{
  if (XEUNICODE_P)
    return CreateWaitableTimerW (arg1, arg2, (LPCWSTR) arg3);
  else
    return CreateWaitableTimerA (arg1, arg2, (LPCSTR) arg3);
}

BOOL
qxeDefineDosDevice (DWORD arg1, const Extbyte * arg2, const Extbyte * arg3)
{
  if (XEUNICODE_P)
    return DefineDosDeviceW (arg1, (LPCWSTR) arg2, (LPCWSTR) arg3);
  else
    return DefineDosDeviceA (arg1, (LPCSTR) arg2, (LPCSTR) arg3);
}

BOOL
qxeDeleteFile (const Extbyte * arg1)
{
  if (XEUNICODE_P)
    return DeleteFileW ((LPCWSTR) arg1);
  else
    return DeleteFileA ((LPCSTR) arg1);
}

/* Error if DeleteVolumeMountPoint used: Function needs review to determine how to handle it */

/* Error if DnsHostnameToComputerName used: Function needs review to determine how to handle it */

#if !defined (CYGWIN_HEADERS)

/* Error if EncryptFile used: Win2K+ only */

#endif /* !defined (CYGWIN_HEADERS) */

BOOL
qxeEndUpdateResource (HANDLE arg1, BOOL arg2)
{
  if (XEUNICODE_P)
    return EndUpdateResourceW (arg1, arg2);
  else
    return EndUpdateResourceA (arg1, arg2);
}

/* Skipping EnumResourceLanguages because different prototypes in VC6 and VC7 */

/* Skipping EnumResourceNames because different prototypes in VC6 and VC7 */

/* Skipping EnumResourceTypes because different prototypes in VC6 and VC7 */

DWORD
qxeExpandEnvironmentStrings (const Extbyte * arg1, Extbyte * arg2, DWORD arg3)
{
  if (XEUNICODE_P)
    return ExpandEnvironmentStringsW ((LPCWSTR) arg1, (LPWSTR) arg2, arg3);
  else
    return ExpandEnvironmentStringsA ((LPCSTR) arg1, (LPSTR) arg2, arg3);
}

void
qxeFatalAppExit (UINT arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    FatalAppExitW (arg1, (LPCWSTR) arg2);
  else
    FatalAppExitA (arg1, (LPCSTR) arg2);
}

/* Error if FileEncryptionStatus used: Function needs review to determine how to handle it */

/* Error if FindActCtxSectionString used: Function needs review to determine how to handle it */

ATOM
qxeFindAtom (const Extbyte * arg1)
{
  if (XEUNICODE_P)
    return FindAtomW ((LPCWSTR) arg1);
  else
    return FindAtomA ((LPCSTR) arg1);
}

HANDLE
qxeFindFirstChangeNotification (const Extbyte * arg1, BOOL arg2, DWORD arg3)
{
  if (XEUNICODE_P)
    return FindFirstChangeNotificationW ((LPCWSTR) arg1, arg2, arg3);
  else
    return FindFirstChangeNotificationA ((LPCSTR) arg1, arg2, arg3);
}

/* Skipping FindFirstFile because split-sized LPWIN32_FIND_DATA */

/* Error if FindFirstFileEx used: split-sized LPWIN32_FIND_DATA; not used, NT 4.0+ only */

/* Error if FindFirstVolume used: Function needs review to determine how to handle it */

/* Error if FindFirstVolumeMountPoint used: Function needs review to determine how to handle it */

/* Skipping FindNextFile because split-sized LPWIN32_FIND_DATA */

/* Error if FindNextVolume used: Function needs review to determine how to handle it */

/* Error if FindNextVolumeMountPoint used: Function needs review to determine how to handle it */

HRSRC
qxeFindResource (HINSTANCE arg1, const Extbyte * arg2, const Extbyte * arg3)
{
  if (XEUNICODE_P)
    return FindResourceW (arg1, (LPCWSTR) arg2, (LPCWSTR) arg3);
  else
    return FindResourceA (arg1, (LPCSTR) arg2, (LPCSTR) arg3);
}

HRSRC
qxeFindResourceEx (HINSTANCE arg1, const Extbyte * arg2, const Extbyte * arg3, WORD arg4)
{
  if (XEUNICODE_P)
    return FindResourceExW (arg1, (LPCWSTR) arg2, (LPCWSTR) arg3, arg4);
  else
    return FindResourceExA (arg1, (LPCSTR) arg2, (LPCSTR) arg3, arg4);
}

/* Error if GetFirmwareEnvironmentVariable used: Function needs review to determine how to handle it */

DWORD
qxeFormatMessage (DWORD arg1, PCVOID arg2, DWORD arg3, DWORD arg4, Extbyte * arg5, DWORD arg6, va_list* arg7)
{
  if (XEUNICODE_P)
    return FormatMessageW (arg1, arg2, arg3, arg4, (LPWSTR) arg5, arg6, arg7);
  else
    return FormatMessageA (arg1, arg2, arg3, arg4, (LPSTR) arg5, arg6, arg7);
}

BOOL
qxeFreeEnvironmentStrings (Extbyte * arg1)
{
  if (XEUNICODE_P)
    return FreeEnvironmentStringsW ((LPWSTR) arg1);
  else
    return FreeEnvironmentStringsA ((LPSTR) arg1);
}

UINT
qxeGetAtomName (ATOM arg1, Extbyte * arg2, int arg3)
{
  if (XEUNICODE_P)
    return GetAtomNameW (arg1, (LPWSTR) arg2, arg3);
  else
    return GetAtomNameA (arg1, (LPSTR) arg2, arg3);
}

BOOL
qxeGetBinaryType (const Extbyte * arg1, PDWORD arg2)
{
  if (XEUNICODE_P)
    return GetBinaryTypeW ((LPCWSTR) arg1, arg2);
  else
    return GetBinaryTypeA ((LPCSTR) arg1, arg2);
}

Extbyte *
qxeGetCommandLine (void)
{
  if (XEUNICODE_P)
    return (Extbyte *) GetCommandLineW ();
  else
    return (Extbyte *) GetCommandLineA ();
}

DWORD
qxeGetCompressedFileSize (const Extbyte * arg1, PDWORD arg2)
{
  if (XEUNICODE_P)
    return GetCompressedFileSizeW ((LPCWSTR) arg1, arg2);
  else
    return GetCompressedFileSizeA ((LPCSTR) arg1, arg2);
}

BOOL
qxeGetComputerName (Extbyte * arg1, PDWORD arg2)
{
  if (XEUNICODE_P)
    return GetComputerNameW ((LPWSTR) arg1, arg2);
  else
    return GetComputerNameA ((LPSTR) arg1, arg2);
}

/* Error if GetComputerNameEx used: Function needs review to determine how to handle it */

DWORD
qxeGetCurrentDirectory (DWORD arg1, Extbyte * arg2)
{
  if (XEUNICODE_P)
    return GetCurrentDirectoryW (arg1, (LPWSTR) arg2);
  else
    return GetCurrentDirectoryA (arg1, (LPSTR) arg2);
}

/* Error if GetCurrentHwProfile used: split-sized LPHW_PROFILE_INFO; NT 4.0+ only */

BOOL
qxeGetDefaultCommConfig (const Extbyte * arg1, LPCOMMCONFIG arg2, PDWORD arg3)
{
  if (XEUNICODE_P)
    return GetDefaultCommConfigW ((LPCWSTR) arg1, arg2, arg3);
  else
    return GetDefaultCommConfigA ((LPCSTR) arg1, arg2, arg3);
}

BOOL
qxeGetDiskFreeSpace (const Extbyte * arg1, PDWORD arg2, PDWORD arg3, PDWORD arg4, PDWORD arg5)
{
  if (XEUNICODE_P)
    return GetDiskFreeSpaceW ((LPCWSTR) arg1, arg2, arg3, arg4, arg5);
  else
    return GetDiskFreeSpaceA ((LPCSTR) arg1, arg2, arg3, arg4, arg5);
}

BOOL
qxeGetDiskFreeSpaceEx (const Extbyte * arg1, PULARGE_INTEGER arg2, PULARGE_INTEGER arg3, PULARGE_INTEGER arg4)
{
  if (XEUNICODE_P)
    return GetDiskFreeSpaceExW ((LPCWSTR) arg1, arg2, arg3, arg4);
  else
    return GetDiskFreeSpaceExA ((LPCSTR) arg1, arg2, arg3, arg4);
}

/* Error if GetDllDirectory used: Function needs review to determine how to handle it */

UINT
qxeGetDriveType (const Extbyte * arg1)
{
  if (XEUNICODE_P)
    return GetDriveTypeW ((LPCWSTR) arg1);
  else
    return GetDriveTypeA ((LPCSTR) arg1);
}

DWORD
qxeGetEnvironmentVariable (const Extbyte * arg1, Extbyte * arg2, DWORD arg3)
{
  if (XEUNICODE_P)
    return GetEnvironmentVariableW ((LPCWSTR) arg1, (LPWSTR) arg2, arg3);
  else
    return GetEnvironmentVariableA ((LPCSTR) arg1, (LPSTR) arg2, arg3);
}

DWORD
qxeGetFileAttributes (const Extbyte * arg1)
{
  if (XEUNICODE_P)
    return GetFileAttributesW ((LPCWSTR) arg1);
  else
    return GetFileAttributesA ((LPCSTR) arg1);
}

BOOL
qxeGetFileAttributesEx (const Extbyte * arg1, GET_FILEEX_INFO_LEVELS arg2, PVOID arg3)
{
  if (XEUNICODE_P)
    return GetFileAttributesExW ((LPCWSTR) arg1, arg2, arg3);
  else
    return GetFileAttributesExA ((LPCSTR) arg1, arg2, arg3);
}

BOOL
qxeGetFileSecurity (const Extbyte * arg1, SECURITY_INFORMATION arg2, PSECURITY_DESCRIPTOR arg3, DWORD arg4, PDWORD arg5)
{
  if (XEUNICODE_P)
    return GetFileSecurityW ((LPCWSTR) arg1, arg2, arg3, arg4, arg5);
  else
    return GetFileSecurityA ((LPCSTR) arg1, arg2, arg3, arg4, arg5);
}

DWORD
qxeGetFullPathName (const Extbyte * arg1, DWORD arg2, Extbyte * arg3, Extbyte ** arg4)
{
  if (XEUNICODE_P)
    return GetFullPathNameW ((LPCWSTR) arg1, arg2, (LPWSTR) arg3, (LPWSTR*) arg4);
  else
    return GetFullPathNameA ((LPCSTR) arg1, arg2, (LPSTR) arg3, (LPSTR*) arg4);
}

DWORD
qxeGetLogicalDriveStrings (DWORD arg1, Extbyte * arg2)
{
  if (XEUNICODE_P)
    return GetLogicalDriveStringsW (arg1, (LPWSTR) arg2);
  else
    return GetLogicalDriveStringsA (arg1, (LPSTR) arg2);
}

/* Error if GetLongPathName used: Win98/2K+ only */

DWORD
qxeGetModuleFileName (HINSTANCE arg1, Extbyte * arg2, DWORD arg3)
{
  if (XEUNICODE_P)
    return GetModuleFileNameW (arg1, (LPWSTR) arg2, arg3);
  else
    return GetModuleFileNameA (arg1, (LPSTR) arg2, arg3);
}

HMODULE
qxeGetModuleHandle (const Extbyte * arg1)
{
  if (XEUNICODE_P)
    return GetModuleHandleW ((LPCWSTR) arg1);
  else
    return GetModuleHandleA ((LPCSTR) arg1);
}

/* Error if GetModuleHandleEx used: Function needs review to determine how to handle it */

BOOL
qxeGetNamedPipeHandleState (HANDLE arg1, PDWORD arg2, PDWORD arg3, PDWORD arg4, PDWORD arg5, Extbyte * arg6, DWORD arg7)
{
  if (XEUNICODE_P)
    return GetNamedPipeHandleStateW (arg1, arg2, arg3, arg4, arg5, (LPWSTR) arg6, arg7);
  else
    return GetNamedPipeHandleStateA (arg1, arg2, arg3, arg4, arg5, (LPSTR) arg6, arg7);
}

UINT
qxeGetPrivateProfileInt (const Extbyte * arg1, const Extbyte * arg2, INT arg3, const Extbyte * arg4)
{
  if (XEUNICODE_P)
    return GetPrivateProfileIntW ((LPCWSTR) arg1, (LPCWSTR) arg2, arg3, (LPCWSTR) arg4);
  else
    return GetPrivateProfileIntA ((LPCSTR) arg1, (LPCSTR) arg2, arg3, (LPCSTR) arg4);
}

DWORD
qxeGetPrivateProfileSection (const Extbyte * arg1, Extbyte * arg2, DWORD arg3, const Extbyte * arg4)
{
  if (XEUNICODE_P)
    return GetPrivateProfileSectionW ((LPCWSTR) arg1, (LPWSTR) arg2, arg3, (LPCWSTR) arg4);
  else
    return GetPrivateProfileSectionA ((LPCSTR) arg1, (LPSTR) arg2, arg3, (LPCSTR) arg4);
}

DWORD
qxeGetPrivateProfileSectionNames (Extbyte * arg1, DWORD arg2, const Extbyte * arg3)
{
  if (XEUNICODE_P)
    return GetPrivateProfileSectionNamesW ((LPWSTR) arg1, arg2, (LPCWSTR) arg3);
  else
    return GetPrivateProfileSectionNamesA ((LPSTR) arg1, arg2, (LPCSTR) arg3);
}

DWORD
qxeGetPrivateProfileString (const Extbyte * arg1, const Extbyte * arg2, const Extbyte * arg3, Extbyte * arg4, DWORD arg5, const Extbyte * arg6)
{
  if (XEUNICODE_P)
    return GetPrivateProfileStringW ((LPCWSTR) arg1, (LPCWSTR) arg2, (LPCWSTR) arg3, (LPWSTR) arg4, arg5, (LPCWSTR) arg6);
  else
    return GetPrivateProfileStringA ((LPCSTR) arg1, (LPCSTR) arg2, (LPCSTR) arg3, (LPSTR) arg4, arg5, (LPCSTR) arg6);
}

BOOL
qxeGetPrivateProfileStruct (const Extbyte * arg1, const Extbyte * arg2, LPVOID arg3, UINT arg4, const Extbyte * arg5)
{
  if (XEUNICODE_P)
    return GetPrivateProfileStructW ((LPCWSTR) arg1, (LPCWSTR) arg2, arg3, arg4, (LPCWSTR) arg5);
  else
    return GetPrivateProfileStructA ((LPCSTR) arg1, (LPCSTR) arg2, arg3, arg4, (LPCSTR) arg5);
}

UINT
qxeGetProfileInt (const Extbyte * arg1, const Extbyte * arg2, INT arg3)
{
  if (XEUNICODE_P)
    return GetProfileIntW ((LPCWSTR) arg1, (LPCWSTR) arg2, arg3);
  else
    return GetProfileIntA ((LPCSTR) arg1, (LPCSTR) arg2, arg3);
}

DWORD
qxeGetProfileSection (const Extbyte * arg1, Extbyte * arg2, DWORD arg3)
{
  if (XEUNICODE_P)
    return GetProfileSectionW ((LPCWSTR) arg1, (LPWSTR) arg2, arg3);
  else
    return GetProfileSectionA ((LPCSTR) arg1, (LPSTR) arg2, arg3);
}

DWORD
qxeGetProfileString (const Extbyte * arg1, const Extbyte * arg2, const Extbyte * arg3, Extbyte * arg4, DWORD arg5)
{
  if (XEUNICODE_P)
    return GetProfileStringW ((LPCWSTR) arg1, (LPCWSTR) arg2, (LPCWSTR) arg3, (LPWSTR) arg4, arg5);
  else
    return GetProfileStringA ((LPCSTR) arg1, (LPCSTR) arg2, (LPCSTR) arg3, (LPSTR) arg4, arg5);
}

DWORD
qxeGetShortPathName (const Extbyte * arg1, Extbyte * arg2, DWORD arg3)
{
  if (XEUNICODE_P)
    return GetShortPathNameW ((LPCWSTR) arg1, (LPWSTR) arg2, arg3);
  else
    return GetShortPathNameA ((LPCSTR) arg1, (LPSTR) arg2, arg3);
}

VOID
qxeGetStartupInfo (LPSTARTUPINFOW arg1)
{
  if (XEUNICODE_P)
    GetStartupInfoW (arg1);
  else
    GetStartupInfoA ((LPSTARTUPINFOA) arg1);
}

UINT
qxeGetSystemDirectory (Extbyte * arg1, UINT arg2)
{
  if (XEUNICODE_P)
    return GetSystemDirectoryW ((LPWSTR) arg1, arg2);
  else
    return GetSystemDirectoryA ((LPSTR) arg1, arg2);
}

/* Error if GetSystemWindowsDirectory used: Function needs review to determine how to handle it */

/* Error if GetSystemWow64Directory used: Function needs review to determine how to handle it */

UINT
qxeGetTempFileName (const Extbyte * arg1, const Extbyte * arg2, UINT arg3, Extbyte * arg4)
{
  if (XEUNICODE_P)
    return GetTempFileNameW ((LPCWSTR) arg1, (LPCWSTR) arg2, arg3, (LPWSTR) arg4);
  else
    return GetTempFileNameA ((LPCSTR) arg1, (LPCSTR) arg2, arg3, (LPSTR) arg4);
}

DWORD
qxeGetTempPath (DWORD arg1, Extbyte * arg2)
{
  if (XEUNICODE_P)
    return GetTempPathW (arg1, (LPWSTR) arg2);
  else
    return GetTempPathA (arg1, (LPSTR) arg2);
}

BOOL
qxeGetUserName (Extbyte * arg1, PDWORD arg2)
{
  if (XEUNICODE_P)
    return GetUserNameW ((LPWSTR) arg1, arg2);
  else
    return GetUserNameA ((LPSTR) arg1, arg2);
}

/* Error if GetVersionEx used: split-sized LPOSVERSIONINFO */

BOOL
qxeGetVolumeInformation (const Extbyte * arg1, Extbyte * arg2, DWORD arg3, PDWORD arg4, PDWORD arg5, PDWORD arg6, Extbyte * arg7, DWORD arg8)
{
  if (XEUNICODE_P)
    return GetVolumeInformationW ((LPCWSTR) arg1, (LPWSTR) arg2, arg3, arg4, arg5, arg6, (LPWSTR) arg7, arg8);
  else
    return GetVolumeInformationA ((LPCSTR) arg1, (LPSTR) arg2, arg3, arg4, arg5, arg6, (LPSTR) arg7, arg8);
}

/* Error if GetVolumeNameForVolumeMountPoint used: Function needs review to determine how to handle it */

/* Error if GetVolumePathName used: Function needs review to determine how to handle it */

/* Error if GetVolumePathNamesForVolumeName used: Function needs review to determine how to handle it */

UINT
qxeGetWindowsDirectory (Extbyte * arg1, UINT arg2)
{
  if (XEUNICODE_P)
    return GetWindowsDirectoryW ((LPWSTR) arg1, arg2);
  else
    return GetWindowsDirectoryA ((LPSTR) arg1, arg2);
}

ATOM
qxeGlobalAddAtom (const Extbyte * arg1)
{
  if (XEUNICODE_P)
    return GlobalAddAtomW ((LPCWSTR) arg1);
  else
    return GlobalAddAtomA ((LPCSTR) arg1);
}

ATOM
qxeGlobalFindAtom (const Extbyte * arg1)
{
  if (XEUNICODE_P)
    return GlobalFindAtomW ((LPCWSTR) arg1);
  else
    return GlobalFindAtomA ((LPCSTR) arg1);
}

UINT
qxeGlobalGetAtomName (ATOM arg1, Extbyte * arg2, int arg3)
{
  if (XEUNICODE_P)
    return GlobalGetAtomNameW (arg1, (LPWSTR) arg2, arg3);
  else
    return GlobalGetAtomNameA (arg1, (LPSTR) arg2, arg3);
}

BOOL
qxeIsBadStringPtr (const Extbyte * arg1, UINT arg2)
{
  if (XEUNICODE_P)
    return IsBadStringPtrW ((LPCWSTR) arg1, arg2);
  else
    return IsBadStringPtrA ((LPCSTR) arg1, arg2);
}

HINSTANCE
qxeLoadLibraryEx (const Extbyte * arg1, HANDLE arg2, DWORD arg3)
{
  if (XEUNICODE_P)
    return LoadLibraryExW ((LPCWSTR) arg1, arg2, arg3);
  else
    return LoadLibraryExA ((LPCSTR) arg1, arg2, arg3);
}

HINSTANCE
qxeLoadLibrary (const Extbyte * arg1)
{
  if (XEUNICODE_P)
    return LoadLibraryW ((LPCWSTR) arg1);
  else
    return LoadLibraryA ((LPCSTR) arg1);
}

BOOL
qxeLogonUser (Extbyte * arg1, Extbyte * arg2, Extbyte * arg3, DWORD arg4, DWORD arg5, PHANDLE arg6)
{
  if (XEUNICODE_P)
    return LogonUserW ((LPWSTR) arg1, (LPWSTR) arg2, (LPWSTR) arg3, arg4, arg5, arg6);
  else
    return LogonUserA ((LPSTR) arg1, (LPSTR) arg2, (LPSTR) arg3, arg4, arg5, arg6);
}

BOOL
qxeLookupAccountName (const Extbyte * arg1, const Extbyte * arg2, PSID arg3, PDWORD arg4, Extbyte * arg5, PDWORD arg6, PSID_NAME_USE arg7)
{
  if (XEUNICODE_P)
    return LookupAccountNameW ((LPCWSTR) arg1, (LPCWSTR) arg2, arg3, arg4, (LPWSTR) arg5, arg6, arg7);
  else
    return LookupAccountNameA ((LPCSTR) arg1, (LPCSTR) arg2, arg3, arg4, (LPSTR) arg5, arg6, arg7);
}

BOOL
qxeLookupAccountSid (const Extbyte * arg1, PSID arg2, Extbyte * arg3, PDWORD arg4, Extbyte * arg5, PDWORD arg6, PSID_NAME_USE arg7)
{
  if (XEUNICODE_P)
    return LookupAccountSidW ((LPCWSTR) arg1, arg2, (LPWSTR) arg3, arg4, (LPWSTR) arg5, arg6, arg7);
  else
    return LookupAccountSidA ((LPCSTR) arg1, arg2, (LPSTR) arg3, arg4, (LPSTR) arg5, arg6, arg7);
}

BOOL
qxeLookupPrivilegeDisplayName (const Extbyte * arg1, const Extbyte * arg2, Extbyte * arg3, PDWORD arg4, PDWORD arg5)
{
  if (XEUNICODE_P)
    return LookupPrivilegeDisplayNameW ((LPCWSTR) arg1, (LPCWSTR) arg2, (LPWSTR) arg3, arg4, arg5);
  else
    return LookupPrivilegeDisplayNameA ((LPCSTR) arg1, (LPCSTR) arg2, (LPSTR) arg3, arg4, arg5);
}

BOOL
qxeLookupPrivilegeName (const Extbyte * arg1, PLUID arg2, Extbyte * arg3, PDWORD arg4)
{
  if (XEUNICODE_P)
    return LookupPrivilegeNameW ((LPCWSTR) arg1, arg2, (LPWSTR) arg3, arg4);
  else
    return LookupPrivilegeNameA ((LPCSTR) arg1, arg2, (LPSTR) arg3, arg4);
}

BOOL
qxeLookupPrivilegeValue (const Extbyte * arg1, const Extbyte * arg2, PLUID arg3)
{
  if (XEUNICODE_P)
    return LookupPrivilegeValueW ((LPCWSTR) arg1, (LPCWSTR) arg2, arg3);
  else
    return LookupPrivilegeValueA ((LPCSTR) arg1, (LPCSTR) arg2, arg3);
}

Extbyte *
qxelstrcat (Extbyte * arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    return (Extbyte *) lstrcatW ((LPWSTR) arg1, (LPCWSTR) arg2);
  else
    return (Extbyte *) lstrcatA ((LPSTR) arg1, (LPCSTR) arg2);
}

int
qxelstrcmpi (const Extbyte * arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    return lstrcmpiW ((LPCWSTR) arg1, (LPCWSTR) arg2);
  else
    return lstrcmpiA ((LPCSTR) arg1, (LPCSTR) arg2);
}

int
qxelstrcmp (const Extbyte * arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    return lstrcmpW ((LPCWSTR) arg1, (LPCWSTR) arg2);
  else
    return lstrcmpA ((LPCSTR) arg1, (LPCSTR) arg2);
}

Extbyte *
qxelstrcpyn (Extbyte * arg1, const Extbyte * arg2, int arg3)
{
  if (XEUNICODE_P)
    return (Extbyte *) lstrcpynW ((LPWSTR) arg1, (LPCWSTR) arg2, arg3);
  else
    return (Extbyte *) lstrcpynA ((LPSTR) arg1, (LPCSTR) arg2, arg3);
}

Extbyte *
qxelstrcpy (Extbyte * arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    return (Extbyte *) lstrcpyW ((LPWSTR) arg1, (LPCWSTR) arg2);
  else
    return (Extbyte *) lstrcpyA ((LPSTR) arg1, (LPCSTR) arg2);
}

int
qxelstrlen (const Extbyte * arg1)
{
  if (XEUNICODE_P)
    return lstrlenW ((LPCWSTR) arg1);
  else
    return lstrlenA ((LPCSTR) arg1);
}

BOOL
qxeMoveFileEx (const Extbyte * arg1, const Extbyte * arg2, DWORD arg3)
{
  if (XEUNICODE_P)
    return MoveFileExW ((LPCWSTR) arg1, (LPCWSTR) arg2, arg3);
  else
    return MoveFileExA ((LPCSTR) arg1, (LPCSTR) arg2, arg3);
}

BOOL
qxeMoveFile (const Extbyte * arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    return MoveFileW ((LPCWSTR) arg1, (LPCWSTR) arg2);
  else
    return MoveFileA ((LPCSTR) arg1, (LPCSTR) arg2);
}

BOOL
qxeObjectCloseAuditAlarm (const Extbyte * arg1, PVOID arg2, BOOL arg3)
{
  if (XEUNICODE_P)
    return ObjectCloseAuditAlarmW ((LPCWSTR) arg1, arg2, arg3);
  else
    return ObjectCloseAuditAlarmA ((LPCSTR) arg1, arg2, arg3);
}

BOOL
qxeObjectDeleteAuditAlarm (const Extbyte * arg1, PVOID arg2, BOOL arg3)
{
  if (XEUNICODE_P)
    return ObjectDeleteAuditAlarmW ((LPCWSTR) arg1, arg2, arg3);
  else
    return ObjectDeleteAuditAlarmA ((LPCSTR) arg1, arg2, arg3);
}

BOOL
qxeObjectOpenAuditAlarm (const Extbyte * arg1, PVOID arg2, Extbyte * arg3, Extbyte * arg4, PSECURITY_DESCRIPTOR arg5, HANDLE arg6, DWORD arg7, DWORD arg8, PPRIVILEGE_SET arg9, BOOL arg10, BOOL arg11, PBOOL arg12)
{
  if (XEUNICODE_P)
    return ObjectOpenAuditAlarmW ((LPCWSTR) arg1, arg2, (LPWSTR) arg3, (LPWSTR) arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12);
  else
    return ObjectOpenAuditAlarmA ((LPCSTR) arg1, arg2, (LPSTR) arg3, (LPSTR) arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12);
}

BOOL
qxeObjectPrivilegeAuditAlarm (const Extbyte * arg1, PVOID arg2, HANDLE arg3, DWORD arg4, PPRIVILEGE_SET arg5, BOOL arg6)
{
  if (XEUNICODE_P)
    return ObjectPrivilegeAuditAlarmW ((LPCWSTR) arg1, arg2, arg3, arg4, arg5, arg6);
  else
    return ObjectPrivilegeAuditAlarmA ((LPCSTR) arg1, arg2, arg3, arg4, arg5, arg6);
}

HANDLE
qxeOpenBackupEventLog (const Extbyte * arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    return OpenBackupEventLogW ((LPCWSTR) arg1, (LPCWSTR) arg2);
  else
    return OpenBackupEventLogA ((LPCSTR) arg1, (LPCSTR) arg2);
}

HANDLE
qxeOpenEventLog (const Extbyte * arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    return OpenEventLogW ((LPCWSTR) arg1, (LPCWSTR) arg2);
  else
    return OpenEventLogA ((LPCSTR) arg1, (LPCSTR) arg2);
}

HANDLE
qxeOpenEvent (DWORD arg1, BOOL arg2, const Extbyte * arg3)
{
  if (XEUNICODE_P)
    return OpenEventW (arg1, arg2, (LPCWSTR) arg3);
  else
    return OpenEventA (arg1, arg2, (LPCSTR) arg3);
}

HANDLE
qxeOpenFileMapping (DWORD arg1, BOOL arg2, const Extbyte * arg3)
{
  if (XEUNICODE_P)
    return OpenFileMappingW (arg1, arg2, (LPCWSTR) arg3);
  else
    return OpenFileMappingA (arg1, arg2, (LPCSTR) arg3);
}

HANDLE
qxeOpenMutex (DWORD arg1, BOOL arg2, const Extbyte * arg3)
{
  if (XEUNICODE_P)
    return OpenMutexW (arg1, arg2, (LPCWSTR) arg3);
  else
    return OpenMutexA (arg1, arg2, (LPCSTR) arg3);
}

HANDLE
qxeOpenSemaphore (DWORD arg1, BOOL arg2, const Extbyte * arg3)
{
  if (XEUNICODE_P)
    return OpenSemaphoreW (arg1, arg2, (LPCWSTR) arg3);
  else
    return OpenSemaphoreA (arg1, arg2, (LPCSTR) arg3);
}

HANDLE
qxeOpenWaitableTimer (DWORD arg1, BOOL arg2, const Extbyte * arg3)
{
  if (XEUNICODE_P)
    return OpenWaitableTimerW (arg1, arg2, (LPCWSTR) arg3);
  else
    return OpenWaitableTimerA (arg1, arg2, (LPCSTR) arg3);
}

void
qxeOutputDebugString (const Extbyte * arg1)
{
  if (XEUNICODE_P)
    OutputDebugStringW ((LPCWSTR) arg1);
  else
    OutputDebugStringA ((LPCSTR) arg1);
}

BOOL
qxePrivilegedServiceAuditAlarm (const Extbyte * arg1, const Extbyte * arg2, HANDLE arg3, PPRIVILEGE_SET arg4, BOOL arg5)
{
  if (XEUNICODE_P)
    return PrivilegedServiceAuditAlarmW ((LPCWSTR) arg1, (LPCWSTR) arg2, arg3, arg4, arg5);
  else
    return PrivilegedServiceAuditAlarmA ((LPCSTR) arg1, (LPCSTR) arg2, arg3, arg4, arg5);
}

/* Error if QueryActCtx used: Function needs review to determine how to handle it */

DWORD
qxeQueryDosDevice (const Extbyte * arg1, Extbyte * arg2, DWORD arg3)
{
  if (XEUNICODE_P)
    return QueryDosDeviceW ((LPCWSTR) arg1, (LPWSTR) arg2, arg3);
  else
    return QueryDosDeviceA ((LPCSTR) arg1, (LPSTR) arg2, arg3);
}

/* Error if ReadDirectoryChanges used: Unicode-only */

BOOL
qxeReadEventLog (HANDLE arg1, DWORD arg2, DWORD arg3, PVOID arg4, DWORD arg5, DWORD * arg6, DWORD * arg7)
{
  if (XEUNICODE_P)
    return ReadEventLogW (arg1, arg2, arg3, arg4, arg5, arg6, arg7);
  else
    return ReadEventLogA (arg1, arg2, arg3, arg4, arg5, arg6, arg7);
}

HANDLE
qxeRegisterEventSource (const Extbyte * arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    return RegisterEventSourceW ((LPCWSTR) arg1, (LPCWSTR) arg2);
  else
    return RegisterEventSourceA ((LPCSTR) arg1, (LPCSTR) arg2);
}

BOOL
qxeRemoveDirectory (const Extbyte * arg1)
{
  if (XEUNICODE_P)
    return RemoveDirectoryW ((LPCWSTR) arg1);
  else
    return RemoveDirectoryA ((LPCSTR) arg1);
}

/* Error if ReplaceFile used: Function needs review to determine how to handle it */

BOOL
qxeReportEvent (HANDLE arg1, WORD arg2, WORD arg3, DWORD arg4, PSID arg5, WORD arg6, DWORD arg7, const Extbyte ** arg8, PVOID arg9)
{
  if (XEUNICODE_P)
    return ReportEventW (arg1, arg2, arg3, arg4, arg5, arg6, arg7, (LPCWSTR*) arg8, arg9);
  else
    return ReportEventA (arg1, arg2, arg3, arg4, arg5, arg6, arg7, (LPCSTR*) arg8, arg9);
}

DWORD
qxeSearchPath (const Extbyte * arg1, const Extbyte * arg2, const Extbyte * arg3, DWORD arg4, Extbyte * arg5, Extbyte ** arg6)
{
  if (XEUNICODE_P)
    return SearchPathW ((LPCWSTR) arg1, (LPCWSTR) arg2, (LPCWSTR) arg3, arg4, (LPWSTR) arg5, (LPWSTR*) arg6);
  else
    return SearchPathA ((LPCSTR) arg1, (LPCSTR) arg2, (LPCSTR) arg3, arg4, (LPSTR) arg5, (LPSTR*) arg6);
}

BOOL
qxeSetComputerName (const Extbyte * arg1)
{
  if (XEUNICODE_P)
    return SetComputerNameW ((LPCWSTR) arg1);
  else
    return SetComputerNameA ((LPCSTR) arg1);
}

/* Error if SetComputerNameEx used: Function needs review to determine how to handle it */

BOOL
qxeSetCurrentDirectory (const Extbyte * arg1)
{
  if (XEUNICODE_P)
    return SetCurrentDirectoryW ((LPCWSTR) arg1);
  else
    return SetCurrentDirectoryA ((LPCSTR) arg1);
}

BOOL
qxeSetDefaultCommConfig (const Extbyte * arg1, LPCOMMCONFIG arg2, DWORD arg3)
{
  if (XEUNICODE_P)
    return SetDefaultCommConfigW ((LPCWSTR) arg1, arg2, arg3);
  else
    return SetDefaultCommConfigA ((LPCSTR) arg1, arg2, arg3);
}

/* Error if SetDllDirectory used: Function needs review to determine how to handle it */

BOOL
qxeSetEnvironmentVariable (const Extbyte * arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    return SetEnvironmentVariableW ((LPCWSTR) arg1, (LPCWSTR) arg2);
  else
    return SetEnvironmentVariableA ((LPCSTR) arg1, (LPCSTR) arg2);
}

BOOL
qxeSetFileAttributes (const Extbyte * arg1, DWORD arg2)
{
  if (XEUNICODE_P)
    return SetFileAttributesW ((LPCWSTR) arg1, arg2);
  else
    return SetFileAttributesA ((LPCSTR) arg1, arg2);
}

BOOL
qxeSetFileSecurity (const Extbyte * arg1, SECURITY_INFORMATION arg2, PSECURITY_DESCRIPTOR arg3)
{
  if (XEUNICODE_P)
    return SetFileSecurityW ((LPCWSTR) arg1, arg2, arg3);
  else
    return SetFileSecurityA ((LPCSTR) arg1, arg2, arg3);
}

/* Error if SetFileShortName used: Function needs review to determine how to handle it */

/* Error if SetFirmwareEnvironmentVariable used: Function needs review to determine how to handle it */

BOOL
qxeSetVolumeLabel (const Extbyte * arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    return SetVolumeLabelW ((LPCWSTR) arg1, (LPCWSTR) arg2);
  else
    return SetVolumeLabelA ((LPCSTR) arg1, (LPCSTR) arg2);
}

/* Error if SetVolumeMountPoint used: Function needs review to determine how to handle it */

BOOL
qxeUpdateResource (HANDLE arg1, const Extbyte * arg2, const Extbyte * arg3, WORD arg4, PVOID arg5, DWORD arg6)
{
  if (XEUNICODE_P)
    return UpdateResourceW (arg1, (LPCWSTR) arg2, (LPCWSTR) arg3, arg4, arg5, arg6);
  else
    return UpdateResourceA (arg1, (LPCSTR) arg2, (LPCSTR) arg3, arg4, arg5, arg6);
}

/* Error if VerifyVersionInfo used: Function needs review to determine how to handle it */

BOOL
qxeWaitNamedPipe (const Extbyte * arg1, DWORD arg2)
{
  if (XEUNICODE_P)
    return WaitNamedPipeW ((LPCWSTR) arg1, arg2);
  else
    return WaitNamedPipeA ((LPCSTR) arg1, arg2);
}

BOOL
qxeWritePrivateProfileSection (const Extbyte * arg1, const Extbyte * arg2, const Extbyte * arg3)
{
  if (XEUNICODE_P)
    return WritePrivateProfileSectionW ((LPCWSTR) arg1, (LPCWSTR) arg2, (LPCWSTR) arg3);
  else
    return WritePrivateProfileSectionA ((LPCSTR) arg1, (LPCSTR) arg2, (LPCSTR) arg3);
}

BOOL
qxeWritePrivateProfileString (const Extbyte * arg1, const Extbyte * arg2, const Extbyte * arg3, const Extbyte * arg4)
{
  if (XEUNICODE_P)
    return WritePrivateProfileStringW ((LPCWSTR) arg1, (LPCWSTR) arg2, (LPCWSTR) arg3, (LPCWSTR) arg4);
  else
    return WritePrivateProfileStringA ((LPCSTR) arg1, (LPCSTR) arg2, (LPCSTR) arg3, (LPCSTR) arg4);
}

BOOL
qxeWritePrivateProfileStruct (const Extbyte * arg1, const Extbyte * arg2, LPVOID arg3, UINT arg4, const Extbyte * arg5)
{
  if (XEUNICODE_P)
    return WritePrivateProfileStructW ((LPCWSTR) arg1, (LPCWSTR) arg2, arg3, arg4, (LPCWSTR) arg5);
  else
    return WritePrivateProfileStructA ((LPCSTR) arg1, (LPCSTR) arg2, arg3, arg4, (LPCSTR) arg5);
}

BOOL
qxeWriteProfileSection (const Extbyte * arg1, const Extbyte * arg2)
{
  if (XEUNICODE_P)
    return WriteProfileSectionW ((LPCWSTR) arg1, (LPCWSTR) arg2);
  else
    return WriteProfileSectionA ((LPCSTR) arg1, (LPCSTR) arg2);
}

BOOL
qxeWriteProfileString (const Extbyte * arg1, const Extbyte * arg2, const Extbyte * arg3)
{
  if (XEUNICODE_P)
    return WriteProfileStringW ((LPCWSTR) arg1, (LPCWSTR) arg2, (LPCWSTR) arg3);
  else
    return WriteProfileStringA ((LPCSTR) arg1, (LPCSTR) arg2, (LPCSTR) arg3);
}


/*----------------------------------------------------------------------*/
/*                       Processing file ACLAPI.h                       */
/*----------------------------------------------------------------------*/

/* Error if BuildExplicitAccessWithName used: Function needs review to determine how to handle it */

/* Error if BuildSecurityDescriptor used: Function needs review to determine how to handle it */

/* Error if BuildTrusteeWithName used: Function needs review to determine how to handle it */

/* Error if BuildTrusteeWithObjectsAndName used: Function needs review to determine how to handle it */

/* Error if BuildTrusteeWithObjectsAndSid used: Function needs review to determine how to handle it */

/* Error if BuildTrusteeWithSid used: Function needs review to determine how to handle it */

/* Error if GetAuditedPermissionsFromAcl used: Function needs review to determine how to handle it */

/* Error if GetEffectiveRightsFromAcl used: Function needs review to determine how to handle it */

/* Error if GetExplicitEntriesFromAcl used: Function needs review to determine how to handle it */

DWORD
qxeGetNamedSecurityInfo (Extbyte * arg1, SE_OBJECT_TYPE arg2, SECURITY_INFORMATION arg3, PSID* arg4, PSID* arg5, PACL* arg6, PACL* arg7, PSECURITY_DESCRIPTOR* arg8)
{
  if (XEUNICODE_P)
    return GetNamedSecurityInfoW ((LPWSTR) arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
  else
    return GetNamedSecurityInfoA ((LPSTR) arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
}

/* Error if GetTrusteeForm used: Function needs review to determine how to handle it */

/* Error if GetTrusteeName used: Function needs review to determine how to handle it */

/* Error if GetTrusteeType used: Function needs review to determine how to handle it */

/* Error if LookupSecurityDescriptorParts used: Function needs review to determine how to handle it */

/* Error if SetEntriesInAcl used: Function needs review to determine how to handle it */

/* Error if SetNamedSecurityInfo used: Function needs review to determine how to handle it */

/* Error if BuildImpersonateExplicitAccessWithName used: Function needs review to determine how to handle it */

/* Error if BuildImpersonateTrustee used: Function needs review to determine how to handle it */

/* Error if GetMultipleTrustee used: Function needs review to determine how to handle it */

/* Error if GetMultipleTrusteeOperation used: Function needs review to determine how to handle it */


/*----------------------------------------------------------------------*/
/*                      Processing file MMSYSTEM.H                      */
/*----------------------------------------------------------------------*/

BOOL
qxesndPlaySound (const Extbyte * arg1, UINT arg2)
{
  if (XEUNICODE_P)
    return sndPlaySoundW ((LPCWSTR) arg1, arg2);
  else
    return sndPlaySoundA ((LPCSTR) arg1, arg2);
}

BOOL
qxePlaySound (const Extbyte * arg1, HMODULE arg2, DWORD arg3)
{
  if (XEUNICODE_P)
    return PlaySoundW ((LPCWSTR) arg1, arg2, arg3);
  else
    return PlaySoundA ((LPCSTR) arg1, arg2, arg3);
}

/* Error if waveOutGetDevCaps used: split-sized LPWAVEOUTCAPS */

MMRESULT
qxewaveOutGetErrorText (MMRESULT arg1, Extbyte * arg2, UINT arg3)
{
  if (XEUNICODE_P)
    return waveOutGetErrorTextW (arg1, (LPWSTR) arg2, arg3);
  else
    return waveOutGetErrorTextA (arg1, (LPSTR) arg2, arg3);
}

/* Error if waveInGetDevCaps used: split-sized LPWAVEINCAPS */

MMRESULT
qxewaveInGetErrorText (MMRESULT arg1, Extbyte * arg2, UINT arg3)
{
  if (XEUNICODE_P)
    return waveInGetErrorTextW (arg1, (LPWSTR) arg2, arg3);
  else
    return waveInGetErrorTextA (arg1, (LPSTR) arg2, arg3);
}

/* Error if midiOutGetDevCaps used: split-sized LPMIDIOUTCAPS */

MMRESULT
qxemidiOutGetErrorText (MMRESULT arg1, Extbyte * arg2, UINT arg3)
{
  if (XEUNICODE_P)
    return midiOutGetErrorTextW (arg1, (LPWSTR) arg2, arg3);
  else
    return midiOutGetErrorTextA (arg1, (LPSTR) arg2, arg3);
}

/* Error if midiInGetDevCaps used: split-sized LPMIDIOUTCAPS */

MMRESULT
qxemidiInGetErrorText (MMRESULT arg1, Extbyte * arg2, UINT arg3)
{
  if (XEUNICODE_P)
    return midiInGetErrorTextW (arg1, (LPWSTR) arg2, arg3);
  else
    return midiInGetErrorTextA (arg1, (LPSTR) arg2, arg3);
}

/* Error if auxGetDevCaps used: split-sized LPAUXCAPS */

/* Error if mixerGetDevCaps used: split-sized LPMIXERCAPS */

/* Error if mixerGetLineInfo used: split-sized LPMIXERLINE */

/* Error if mixerGetLineControls used: split-sized LPMIXERCONTROL */

/* Error if mixerGetControlDetails used: split-sized LPMIXERCONTROL in LPMIXERLINECONTROLS in LPMIXERCONTROLDETAILS */

/* Error if joyGetDevCaps used: split-sized LPJOYCAPS */

FOURCC
qxemmioStringToFOURCC (const Extbyte * arg1, UINT arg2)
{
  if (XEUNICODE_P)
    return mmioStringToFOURCCW ((LPCWSTR) arg1, arg2);
  else
    return mmioStringToFOURCCA ((LPCSTR) arg1, arg2);
}

LPMMIOPROC
qxemmioInstallIOProc (FOURCC arg1, LPMMIOPROC arg2, DWORD arg3)
{
  if (XEUNICODE_P)
    return mmioInstallIOProcW (arg1, arg2, arg3);
  else
    return mmioInstallIOProcA (arg1, arg2, arg3);
}

HMMIO
qxemmioOpen (Extbyte * arg1, LPMMIOINFO arg2, DWORD arg3)
{
  if (XEUNICODE_P)
    return mmioOpenW ((LPWSTR) arg1, arg2, arg3);
  else
    return mmioOpenA ((LPSTR) arg1, arg2, arg3);
}

MMRESULT
qxemmioRename (const Extbyte * arg1, const Extbyte * arg2, LPCMMIOINFO arg3, DWORD arg4)
{
  if (XEUNICODE_P)
    return mmioRenameW ((LPCWSTR) arg1, (LPCWSTR) arg2, arg3, arg4);
  else
    return mmioRenameA ((LPCSTR) arg1, (LPCSTR) arg2, arg3, arg4);
}

MCIERROR
qxemciSendCommand (MCIDEVICEID arg1, UINT arg2, DWORD arg3, DWORD arg4)
{
  if (XEUNICODE_P)
    return mciSendCommandW (arg1, arg2, arg3, arg4);
  else
    return mciSendCommandA (arg1, arg2, arg3, arg4);
}

MCIERROR
qxemciSendString (const Extbyte * arg1, Extbyte * arg2, UINT arg3, HWND arg4)
{
  if (XEUNICODE_P)
    return mciSendStringW ((LPCWSTR) arg1, (LPWSTR) arg2, arg3, arg4);
  else
    return mciSendStringA ((LPCSTR) arg1, (LPSTR) arg2, arg3, arg4);
}

MCIDEVICEID
qxemciGetDeviceID (const Extbyte * arg1)
{
  if (XEUNICODE_P)
    return mciGetDeviceIDW ((LPCWSTR) arg1);
  else
    return mciGetDeviceIDA ((LPCSTR) arg1);
}

#if !defined (MINGW)

/* Error if mciGetDeviceIDFromElementID used: missing from Win98se version of ADVAPI32.dll */

#endif /* !defined (MINGW) */

BOOL
qxemciGetErrorString (MCIERROR arg1, Extbyte * arg2, UINT arg3)
{
  if (XEUNICODE_P)
    return mciGetErrorStringW (arg1, (LPWSTR) arg2, arg3);
  else
    return mciGetErrorStringA (arg1, (LPSTR) arg2, arg3);
}