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
|
// Licensed under the Apache License, Version 2.0
// <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
// All files in the project carrying such notice may not be copied, modified, or distributed
// except according to those terms.
//! Public header file for Windows NT Setup and Device Installer services Dll.
use ctypes::c_int;
use shared::basetsd::{DWORD_PTR, UINT_PTR, ULONG_PTR};
use shared::devpropdef::{DEVPROPKEY, DEVPROPTYPE};
use shared::guiddef::{GUID, LPGUID};
use shared::minwindef::{
BOOL, BYTE, DWORD, FILETIME, HINSTANCE, HKEY, INT, LPARAM, LPCVOID, LPDWORD, MAX_PATH, PBOOL,
PBYTE, PDWORD, PINT, PUINT, UINT, USHORT, WORD,
};
use shared::windef::{HDC, HICON, HWND, RECT};
use um::commctrl::HIMAGELIST;
use um::prsht::{HPROPSHEETPAGE, LPPROPSHEETHEADERA, LPPROPSHEETHEADERW};
use um::spapidef::SP_LOG_TOKEN;
use um::winnt::{
ANYSIZE_ARRAY, APPLICATION_ERROR_MASK, CHAR, DWORDLONG, ERROR_SEVERITY_ERROR, HANDLE, LONG,
LONGLONG, LPCSTR, LPCWSTR, PCSTR, PCWSTR, PSTR, PVOID, PWSTR, WCHAR,
};
use um::winreg::REGSAM;
pub const LINE_LEN: usize = 256;
pub const MAX_INF_STRING_LENGTH: usize = 4096;
pub const MAX_INF_SECTION_NAME_LENGTH: usize = 255;
pub const MAX_TITLE_LEN: usize = 60;
pub const MAX_INSTRUCTION_LEN: usize = 256;
pub const MAX_LABEL_LEN: usize = 30;
pub const MAX_SERVICE_NAME_LEN: usize = 256;
pub const MAX_SUBTITLE_LEN: usize = 256;
pub const SP_MAX_MACHINENAME_LENGTH: usize = MAX_PATH + 3;
pub type HINF = PVOID;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct INFCONTEXT {
Inf: PVOID,
CurrentInf: PVOID,
Section: UINT,
Line: UINT,
}}
pub type PINFCONTEXT = *mut INFCONTEXT;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_INF_INFORMATION {
InfStyle: DWORD,
InfCount: DWORD,
VersionData: [BYTE; ANYSIZE_ARRAY],
}}
pub type PSP_INF_INFORMATION = *mut SP_INF_INFORMATION;
UNION!{#[cfg_attr(target_arch = "x86", repr(packed))] union SP_ALTPLATFORM_INFO_V3_u {
[u16; 1],
Reserved Reserved_mut: WORD,
Flags Flags_mut: WORD,
}}
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_ALTPLATFORM_INFO_V3 {
cbSize: DWORD,
Platform: DWORD,
MajorVersion: DWORD,
MinorVersion: DWORD,
ProcessorArchitecture: WORD,
u: SP_ALTPLATFORM_INFO_V3_u,
FirstValidatedMajorVersion: DWORD,
FirstValidatedMinorVersion: DWORD,
ProductType: BYTE,
SuiteMask: WORD,
BuildNumber: DWORD,
}}
pub type PSP_ALTPLATFORM_INFO_V3 = *mut SP_ALTPLATFORM_INFO_V3;
UNION!{#[cfg_attr(target_arch = "x86", repr(packed))] union SP_ALTPLATFORM_INFO_V2_u {
[u16; 1],
Reserved Reserved_mut: WORD,
Flags Flags_mut: WORD,
}}
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_ALTPLATFORM_INFO_V2 {
cbSize: DWORD,
Platform: DWORD,
MajorVersion: DWORD,
MinorVersion: DWORD,
ProcessorArchitecture: WORD,
u: SP_ALTPLATFORM_INFO_V2_u,
FirstValidatedMajorVersion: DWORD,
FirstValidatedMinorVersion: DWORD,
}}
pub type PSP_ALTPLATFORM_INFO_V2 = *mut SP_ALTPLATFORM_INFO_V2;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_ALTPLATFORM_INFO_V1 {
cbSize: DWORD,
Platform: DWORD,
MajorVersion: DWORD,
MinorVersion: DWORD,
ProcessorArchitecture: WORD,
Reserved: WORD,
}}
pub type PSP_ALTPLATFORM_INFO_V1 = *mut SP_ALTPLATFORM_INFO_V1;
pub type SP_ALTPLATFORM_INFO = SP_ALTPLATFORM_INFO_V2;
pub type PSP_ALTPLATFORM_INFO = PSP_ALTPLATFORM_INFO_V2;
pub const SP_ALTPLATFORM_FLAGS_VERSION_RANGE: WORD = 0x0001;
pub const SP_ALTPLATFORM_FLAGS_SUITE_MASK: WORD = 0x0002;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_ORIGINAL_FILE_INFO_A {
cbSize: DWORD,
OriginalInfName: [CHAR; MAX_PATH],
OriginalCatalogName: [CHAR; MAX_PATH],
}}
pub type PSP_ORIGINAL_FILE_INFO_A = *mut SP_ORIGINAL_FILE_INFO_A;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_ORIGINAL_FILE_INFO_W {
cbSize: DWORD,
OriginalInfName: [WCHAR; MAX_PATH],
OriginalCatalogName: [WCHAR; MAX_PATH],
}}
pub type PSP_ORIGINAL_FILE_INFO_W = *mut SP_ORIGINAL_FILE_INFO_W;
pub const INF_STYLE_NONE: DWORD = 0x00000000;
pub const INF_STYLE_OLDNT: DWORD = 0x00000001;
pub const INF_STYLE_WIN4: DWORD = 0x00000002;
pub const INF_STYLE_CACHE_ENABLE: DWORD = 0x00000010;
pub const INF_STYLE_CACHE_DISABLE: DWORD = 0x00000020;
pub const INF_STYLE_CACHE_IGNORE: DWORD = 0x00000040;
pub const DIRID_ABSOLUTE: DWORD = -1i32 as u32;
pub const DIRID_ABSOLUTE_16BIT: DWORD = 0xffff;
pub const DIRID_NULL: DWORD = 0;
pub const DIRID_SRCPATH: DWORD = 1;
pub const DIRID_WINDOWS: DWORD = 10;
pub const DIRID_SYSTEM: DWORD = 11;
pub const DIRID_DRIVERS: DWORD = 12;
pub const DIRID_IOSUBSYS: DWORD = DIRID_DRIVERS;
pub const DIRID_DRIVER_STORE: DWORD = 13;
pub const DIRID_INF: DWORD = 17;
pub const DIRID_HELP: DWORD = 18;
pub const DIRID_FONTS: DWORD = 20;
pub const DIRID_VIEWERS: DWORD = 21;
pub const DIRID_COLOR: DWORD = 23;
pub const DIRID_APPS: DWORD = 24;
pub const DIRID_SHARED: DWORD = 25;
pub const DIRID_BOOT: DWORD = 30;
pub const DIRID_SYSTEM16: DWORD = 50;
pub const DIRID_SPOOL: DWORD = 51;
pub const DIRID_SPOOLDRIVERS: DWORD = 52;
pub const DIRID_USERPROFILE: DWORD = 53;
pub const DIRID_LOADER: DWORD = 54;
pub const DIRID_PRINTPROCESSOR: DWORD = 55;
pub const DIRID_DEFAULT: DWORD = DIRID_SYSTEM;
pub const DIRID_COMMON_STARTMENU: DWORD = 16406;
pub const DIRID_COMMON_PROGRAMS: DWORD = 16407;
pub const DIRID_COMMON_STARTUP: DWORD = 16408;
pub const DIRID_COMMON_DESKTOPDIRECTORY: DWORD = 16409;
pub const DIRID_COMMON_FAVORITES: DWORD = 16415;
pub const DIRID_COMMON_APPDATA: DWORD = 16419;
pub const DIRID_PROGRAM_FILES: DWORD = 16422;
pub const DIRID_SYSTEM_X86: DWORD = 16425;
pub const DIRID_PROGRAM_FILES_X86: DWORD = 16426;
pub const DIRID_PROGRAM_FILES_COMMON: DWORD = 16427;
pub const DIRID_PROGRAM_FILES_COMMONX86: DWORD = 16428;
pub const DIRID_COMMON_TEMPLATES: DWORD = 16429;
pub const DIRID_COMMON_DOCUMENTS: DWORD = 16430;
pub const DIRID_USER: DWORD = 0x8000;
FN!{stdcall PSP_FILE_CALLBACK_A(
Context: PVOID,
Notification: UINT,
Param1: UINT_PTR,
Param2: UINT_PTR,
) -> UINT}
FN!{stdcall PSP_FILE_CALLBACK_W(
Context: PVOID,
Notification: UINT,
Param1: UINT_PTR,
Param2: UINT_PTR,
) -> UINT}
pub const SPFILENOTIFY_STARTQUEUE: UINT = 0x00000001;
pub const SPFILENOTIFY_ENDQUEUE: UINT = 0x00000002;
pub const SPFILENOTIFY_STARTSUBQUEUE: UINT = 0x00000003;
pub const SPFILENOTIFY_ENDSUBQUEUE: UINT = 0x00000004;
pub const SPFILENOTIFY_STARTDELETE: UINT = 0x00000005;
pub const SPFILENOTIFY_ENDDELETE: UINT = 0x00000006;
pub const SPFILENOTIFY_DELETEERROR: UINT = 0x00000007;
pub const SPFILENOTIFY_STARTRENAME: UINT = 0x00000008;
pub const SPFILENOTIFY_ENDRENAME: UINT = 0x00000009;
pub const SPFILENOTIFY_RENAMEERROR: UINT = 0x0000000a;
pub const SPFILENOTIFY_STARTCOPY: UINT = 0x0000000b;
pub const SPFILENOTIFY_ENDCOPY: UINT = 0x0000000c;
pub const SPFILENOTIFY_COPYERROR: UINT = 0x0000000d;
pub const SPFILENOTIFY_NEEDMEDIA: UINT = 0x0000000e;
pub const SPFILENOTIFY_QUEUESCAN: UINT = 0x0000000f;
pub const SPFILENOTIFY_CABINETINFO: UINT = 0x00000010;
pub const SPFILENOTIFY_FILEINCABINET: UINT = 0x00000011;
pub const SPFILENOTIFY_NEEDNEWCABINET: UINT = 0x00000012;
pub const SPFILENOTIFY_FILEEXTRACTED: UINT = 0x00000013;
pub const SPFILENOTIFY_FILEOPDELAYED: UINT = 0x00000014;
pub const SPFILENOTIFY_STARTBACKUP: UINT = 0x00000015;
pub const SPFILENOTIFY_BACKUPERROR: UINT = 0x00000016;
pub const SPFILENOTIFY_ENDBACKUP: UINT = 0x00000017;
pub const SPFILENOTIFY_QUEUESCAN_EX: UINT = 0x00000018;
pub const SPFILENOTIFY_STARTREGISTRATION: UINT = 0x00000019;
pub const SPFILENOTIFY_ENDREGISTRATION: UINT = 0x00000020;
pub const SPFILENOTIFY_QUEUESCAN_SIGNERINFO: UINT = 0x00000040;
pub const SPFILENOTIFY_LANGMISMATCH: UINT = 0x00010000;
pub const SPFILENOTIFY_TARGETEXISTS: UINT = 0x00020000;
pub const SPFILENOTIFY_TARGETNEWER: UINT = 0x00040000;
pub const FILEOP_COPY: UINT = 0;
pub const FILEOP_RENAME: UINT = 1;
pub const FILEOP_DELETE: UINT = 2;
pub const FILEOP_BACKUP: UINT = 3;
pub const FILEOP_ABORT: UINT = 0;
pub const FILEOP_DOIT: UINT = 1;
pub const FILEOP_SKIP: UINT = 2;
pub const FILEOP_RETRY: UINT = FILEOP_DOIT;
pub const FILEOP_NEWPATH: UINT = 4;
pub const COPYFLG_WARN_IF_SKIP: UINT = 0x00000001;
pub const COPYFLG_NOSKIP: UINT = 0x00000002;
pub const COPYFLG_NOVERSIONCHECK: UINT = 0x00000004;
pub const COPYFLG_FORCE_FILE_IN_USE: UINT = 0x00000008;
pub const COPYFLG_NO_OVERWRITE: UINT = 0x00000010;
pub const COPYFLG_NO_VERSION_DIALOG: UINT = 0x00000020;
pub const COPYFLG_OVERWRITE_OLDER_ONLY: UINT = 0x00000040;
pub const COPYFLG_PROTECTED_WINDOWS_DRIVER_FILE: UINT = 0x00000100;
pub const COPYFLG_REPLACEONLY: UINT = 0x00000400;
pub const COPYFLG_NODECOMP: UINT = 0x00000800;
pub const COPYFLG_REPLACE_BOOT_FILE: UINT = 0x00001000;
pub const COPYFLG_NOPRUNE: UINT = 0x00002000;
pub const COPYFLG_IN_USE_TRY_RENAME: UINT = 0x00004000;
pub const DELFLG_IN_USE: UINT = 0x00000001;
pub const DELFLG_IN_USE1: UINT = 0x00010000;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct FILEPATHS_A {
Target: PCSTR,
Source: PCSTR,
Win32Error: UINT,
Flags: DWORD,
}}
pub type PFILEPATHS_A = *mut FILEPATHS_A;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct FILEPATHS_W {
Target: PCWSTR,
Source: PCWSTR,
Win32Error: UINT,
Flags: DWORD,
}}
pub type PFILEPATHS_W = *mut FILEPATHS_W;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct FILEPATHS_SIGNERINFO_A {
Target: PCSTR,
Source: PCSTR,
Win32Error: UINT,
Flags: DWORD,
DigitalSigner: PCSTR,
Version: PCSTR,
CatalogFile: PCSTR,
}}
pub type PFILEPATHS_SIGNERINFO_A = *mut FILEPATHS_SIGNERINFO_A;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct FILEPATHS_SIGNERINFO_W {
Target: PCWSTR,
Source: PCWSTR,
Win32Error: UINT,
Flags: DWORD,
DigitalSigner: PCWSTR,
Version: PCWSTR,
CatalogFile: PCWSTR,
}}
pub type PFILEPATHS_SIGNERINFO_W = *mut FILEPATHS_SIGNERINFO_W;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SOURCE_MEDIA_A {
Reserved: PCSTR,
Tagfile: PCSTR,
Description: PCSTR,
SourcePath: PCSTR,
SourceFile: PCSTR,
Flags: DWORD,
}}
pub type PSOURCE_MEDIA_A = *mut SOURCE_MEDIA_A;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SOURCE_MEDIA_W {
Reserved: PCWSTR,
Tagfile: PCWSTR,
Description: PCWSTR,
SourcePath: PCWSTR,
SourceFile: PCWSTR,
Flags: DWORD,
}}
pub type PSOURCE_MEDIA_W = *mut SOURCE_MEDIA_W;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct CABINET_INFO_A {
CabinetPath: PCSTR,
CabinetFile: PCSTR,
DiskName: PCSTR,
SetId: USHORT,
CabinetNumber: USHORT,
}}
pub type PCABINET_INFO_A = *mut CABINET_INFO_A;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct CABINET_INFO_W {
CabinetPath: PCWSTR,
CabinetFile: PCWSTR,
DiskName: PCWSTR,
SetId: USHORT,
CabinetNumber: USHORT,
}}
pub type PCABINET_INFO_W = *mut CABINET_INFO_W;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct FILE_IN_CABINET_INFO_A {
NameInCabinet: PCSTR,
FileSize: DWORD,
Win32Error: DWORD,
DosDate: WORD,
DosTime: WORD,
DosAttribs: WORD,
FullTargetName: [CHAR; MAX_PATH],
}}
pub type PFILE_IN_CABINET_INFO_A = *mut FILE_IN_CABINET_INFO_A;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct FILE_IN_CABINET_INFO_W {
NameInCabinet: PCWSTR,
FileSize: DWORD,
Win32Error: DWORD,
DosDate: WORD,
DosTime: WORD,
DosAttribs: WORD,
FullTargetName: [WCHAR; MAX_PATH],
}}
pub type PFILE_IN_CABINET_INFO_W = *mut FILE_IN_CABINET_INFO_W;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_REGISTER_CONTROL_STATUSA {
cbSize: DWORD,
FileName: PCSTR,
Win32Error: DWORD,
FailureCode: DWORD,
}}
pub type PSP_REGISTER_CONTROL_STATUSA = *mut SP_REGISTER_CONTROL_STATUSA;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_REGISTER_CONTROL_STATUSW {
cbSize: DWORD,
FileName: PCWSTR,
Win32Error: DWORD,
FailureCode: DWORD,
}}
pub type PSP_REGISTER_CONTROL_STATUSW = *mut SP_REGISTER_CONTROL_STATUSW;
pub const SPREG_SUCCESS: DWORD = 0x00000000;
pub const SPREG_LOADLIBRARY: DWORD = 0x00000001;
pub const SPREG_GETPROCADDR: DWORD = 0x00000002;
pub const SPREG_REGSVR: DWORD = 0x00000003;
pub const SPREG_DLLINSTALL: DWORD = 0x00000004;
pub const SPREG_TIMEOUT: DWORD = 0x00000005;
pub const SPREG_UNKNOWN: DWORD = 0xFFFFFFFF;
pub type HSPFILEQ = PVOID;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_FILE_COPY_PARAMS_A {
cbSize: DWORD,
QueueHandle: HSPFILEQ,
SourceRootPath: PCSTR,
SourcePath: PCSTR,
SourceFilename: PCSTR,
SourceDescription: PCSTR,
SourceTagfile: PCSTR,
TargetDirectory: PCSTR,
TargetFilename: PCSTR,
CopyStyle: DWORD,
LayoutInf: HINF,
SecurityDescriptor: PCSTR,
}}
pub type PSP_FILE_COPY_PARAMS_A = *mut SP_FILE_COPY_PARAMS_A;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_FILE_COPY_PARAMS_W {
cbSize: DWORD,
QueueHandle: HSPFILEQ,
SourceRootPath: PCWSTR,
SourcePath: PCWSTR,
SourceFilename: PCWSTR,
SourceDescription: PCWSTR,
SourceTagfile: PCWSTR,
TargetDirectory: PCWSTR,
TargetFilename: PCWSTR,
CopyStyle: DWORD,
LayoutInf: HINF,
SecurityDescriptor: PCWSTR,
}}
pub type PSP_FILE_COPY_PARAMS_W = *mut SP_FILE_COPY_PARAMS_W;
pub type HDSKSPC = PVOID;
pub type HDEVINFO = PVOID;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DEVINFO_DATA {
cbSize: DWORD,
ClassGuid: GUID,
DevInst: DWORD,
Reserved: ULONG_PTR,
}}
pub type PSP_DEVINFO_DATA = *mut SP_DEVINFO_DATA;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DEVICE_INTERFACE_DATA {
cbSize: DWORD,
InterfaceClassGuid: GUID,
Flags: DWORD,
Reserved: ULONG_PTR,
}}
pub type PSP_DEVICE_INTERFACE_DATA = *mut SP_DEVICE_INTERFACE_DATA;
pub const SPINT_ACTIVE: DWORD = 0x00000001;
pub const SPINT_DEFAULT: DWORD = 0x00000002;
pub const SPINT_REMOVED: DWORD = 0x00000004;
pub type SP_INTERFACE_DEVICE_DATA = SP_DEVICE_INTERFACE_DATA;
pub type PSP_INTERFACE_DEVICE_DATA = PSP_DEVICE_INTERFACE_DATA;
pub const SPID_ACTIVE: DWORD = SPINT_ACTIVE;
pub const SPID_DEFAULT: DWORD = SPINT_DEFAULT;
pub const SPID_REMOVED: DWORD = SPINT_REMOVED;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DEVICE_INTERFACE_DETAIL_DATA_A {
cbSize: DWORD,
DevicePath: [CHAR; ANYSIZE_ARRAY],
}}
pub type PSP_DEVICE_INTERFACE_DETAIL_DATA_A = *mut SP_DEVICE_INTERFACE_DETAIL_DATA_A;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DEVICE_INTERFACE_DETAIL_DATA_W {
cbSize: DWORD,
DevicePath: [WCHAR; ANYSIZE_ARRAY],
}}
pub type PSP_DEVICE_INTERFACE_DETAIL_DATA_W = *mut SP_DEVICE_INTERFACE_DETAIL_DATA_W;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DEVINFO_LIST_DETAIL_DATA_A {
cbSize: DWORD,
ClassGuid: GUID,
RemoteMachineHandle: HANDLE,
RemoteMachineName: [CHAR; SP_MAX_MACHINENAME_LENGTH],
}}
pub type PSP_DEVINFO_LIST_DETAIL_DATA_A = *mut SP_DEVINFO_LIST_DETAIL_DATA_A;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DEVINFO_LIST_DETAIL_DATA_W {
cbSize: DWORD,
ClassGuid: GUID,
RemoteMachineHandle: HANDLE,
RemoteMachineName: [WCHAR; SP_MAX_MACHINENAME_LENGTH],
}}
pub type PSP_DEVINFO_LIST_DETAIL_DATA_W = *mut SP_DEVINFO_LIST_DETAIL_DATA_W;
pub const DIF_SELECTDEVICE: DI_FUNCTION = 0x00000001;
pub const DIF_INSTALLDEVICE: DI_FUNCTION = 0x00000002;
pub const DIF_ASSIGNRESOURCES: DI_FUNCTION = 0x00000003;
pub const DIF_PROPERTIES: DI_FUNCTION = 0x00000004;
pub const DIF_REMOVE: DI_FUNCTION = 0x00000005;
pub const DIF_FIRSTTIMESETUP: DI_FUNCTION = 0x00000006;
pub const DIF_FOUNDDEVICE: DI_FUNCTION = 0x00000007;
pub const DIF_SELECTCLASSDRIVERS: DI_FUNCTION = 0x00000008;
pub const DIF_VALIDATECLASSDRIVERS: DI_FUNCTION = 0x00000009;
pub const DIF_INSTALLCLASSDRIVERS: DI_FUNCTION = 0x0000000A;
pub const DIF_CALCDISKSPACE: DI_FUNCTION = 0x0000000B;
pub const DIF_DESTROYPRIVATEDATA: DI_FUNCTION = 0x0000000C;
pub const DIF_VALIDATEDRIVER: DI_FUNCTION = 0x0000000D;
pub const DIF_DETECT: DI_FUNCTION = 0x0000000F;
pub const DIF_INSTALLWIZARD: DI_FUNCTION = 0x00000010;
pub const DIF_DESTROYWIZARDDATA: DI_FUNCTION = 0x00000011;
pub const DIF_PROPERTYCHANGE: DI_FUNCTION = 0x00000012;
pub const DIF_ENABLECLASS: DI_FUNCTION = 0x00000013;
pub const DIF_DETECTVERIFY: DI_FUNCTION = 0x00000014;
pub const DIF_INSTALLDEVICEFILES: DI_FUNCTION = 0x00000015;
pub const DIF_UNREMOVE: DI_FUNCTION = 0x00000016;
pub const DIF_SELECTBESTCOMPATDRV: DI_FUNCTION = 0x00000017;
pub const DIF_ALLOW_INSTALL: DI_FUNCTION = 0x00000018;
pub const DIF_REGISTERDEVICE: DI_FUNCTION = 0x00000019;
pub const DIF_NEWDEVICEWIZARD_PRESELECT: DI_FUNCTION = 0x0000001A;
pub const DIF_NEWDEVICEWIZARD_SELECT: DI_FUNCTION = 0x0000001B;
pub const DIF_NEWDEVICEWIZARD_PREANALYZE: DI_FUNCTION = 0x0000001C;
pub const DIF_NEWDEVICEWIZARD_POSTANALYZE: DI_FUNCTION = 0x0000001D;
pub const DIF_NEWDEVICEWIZARD_FINISHINSTALL: DI_FUNCTION = 0x0000001E;
pub const DIF_UNUSED1: DI_FUNCTION = 0x0000001F;
pub const DIF_INSTALLINTERFACES: DI_FUNCTION = 0x00000020;
pub const DIF_DETECTCANCEL: DI_FUNCTION = 0x00000021;
pub const DIF_REGISTER_COINSTALLERS: DI_FUNCTION = 0x00000022;
pub const DIF_ADDPROPERTYPAGE_ADVANCED: DI_FUNCTION = 0x00000023;
pub const DIF_ADDPROPERTYPAGE_BASIC: DI_FUNCTION = 0x00000024;
pub const DIF_RESERVED1: DI_FUNCTION = 0x00000025;
pub const DIF_TROUBLESHOOTER: DI_FUNCTION = 0x00000026;
pub const DIF_POWERMESSAGEWAKE: DI_FUNCTION = 0x00000027;
pub const DIF_ADDREMOTEPROPERTYPAGE_ADVANCED: DI_FUNCTION = 0x00000028;
pub const DIF_UPDATEDRIVER_UI: DI_FUNCTION = 0x00000029;
pub const DIF_FINISHINSTALL_ACTION: DI_FUNCTION = 0x0000002A;
pub const DIF_RESERVED2: DI_FUNCTION = 0x00000030;
pub const DIF_MOVEDEVICE: DI_FUNCTION = 0x0000000E;
pub type DI_FUNCTION = UINT;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DEVINSTALL_PARAMS_A {
cbSize: DWORD,
Flags: DWORD,
FlagsEx: DWORD,
hwndParent: HWND,
InstallMsgHandler: PSP_FILE_CALLBACK_A,
InstallMsgHandlerContext: PVOID,
FileQueue: HSPFILEQ,
ClassInstallReserved: ULONG_PTR,
Reserved: DWORD,
DriverPath: [CHAR; MAX_PATH],
}}
pub type PSP_DEVINSTALL_PARAMS_A = *mut SP_DEVINSTALL_PARAMS_A;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DEVINSTALL_PARAMS_W {
cbSize: DWORD,
Flags: DWORD,
FlagsEx: DWORD,
hwndParent: HWND,
InstallMsgHandler: PSP_FILE_CALLBACK_W,
InstallMsgHandlerContext: PVOID,
FileQueue: HSPFILEQ,
ClassInstallReserved: ULONG_PTR,
Reserved: DWORD,
DriverPath: [WCHAR; MAX_PATH],
}}
pub type PSP_DEVINSTALL_PARAMS_W = *mut SP_DEVINSTALL_PARAMS_W;
pub const DI_SHOWOEM: DWORD = 0x00000001;
pub const DI_SHOWCOMPAT: DWORD = 0x00000002;
pub const DI_SHOWCLASS: DWORD = 0x00000004;
pub const DI_SHOWALL: DWORD = 0x00000007;
pub const DI_NOVCP: DWORD = 0x00000008;
pub const DI_DIDCOMPAT: DWORD = 0x00000010;
pub const DI_DIDCLASS: DWORD = 0x00000020;
pub const DI_AUTOASSIGNRES: DWORD = 0x00000040;
pub const DI_NEEDRESTART: DWORD = 0x00000080;
pub const DI_NEEDREBOOT: DWORD = 0x00000100;
pub const DI_NOBROWSE: DWORD = 0x00000200;
pub const DI_MULTMFGS: DWORD = 0x00000400;
pub const DI_DISABLED: DWORD = 0x00000800;
pub const DI_GENERALPAGE_ADDED: DWORD = 0x00001000;
pub const DI_RESOURCEPAGE_ADDED: DWORD = 0x00002000;
pub const DI_PROPERTIES_CHANGE: DWORD = 0x00004000;
pub const DI_INF_IS_SORTED: DWORD = 0x00008000;
pub const DI_ENUMSINGLEINF: DWORD = 0x00010000;
pub const DI_DONOTCALLCONFIGMG: DWORD = 0x00020000;
pub const DI_INSTALLDISABLED: DWORD = 0x00040000;
pub const DI_COMPAT_FROM_CLASS: DWORD = 0x00080000;
pub const DI_CLASSINSTALLPARAMS: DWORD = 0x00100000;
pub const DI_NODI_DEFAULTACTION: DWORD = 0x00200000;
pub const DI_QUIETINSTALL: DWORD = 0x00800000;
pub const DI_NOFILECOPY: DWORD = 0x01000000;
pub const DI_FORCECOPY: DWORD = 0x02000000;
pub const DI_DRIVERPAGE_ADDED: DWORD = 0x04000000;
pub const DI_USECI_SELECTSTRINGS: DWORD = 0x08000000;
pub const DI_OVERRIDE_INFFLAGS: DWORD = 0x10000000;
pub const DI_PROPS_NOCHANGEUSAGE: DWORD = 0x20000000;
pub const DI_NOSELECTICONS: DWORD = 0x40000000;
pub const DI_NOWRITE_IDS: DWORD = 0x80000000;
pub const DI_FLAGSEX_RESERVED2: DWORD = 0x00000001;
pub const DI_FLAGSEX_RESERVED3: DWORD = 0x00000002;
pub const DI_FLAGSEX_CI_FAILED: DWORD = 0x00000004;
pub const DI_FLAGSEX_FINISHINSTALL_ACTION: DWORD = 0x00000008;
pub const DI_FLAGSEX_DIDINFOLIST: DWORD = 0x00000010;
pub const DI_FLAGSEX_DIDCOMPATINFO: DWORD = 0x00000020;
pub const DI_FLAGSEX_FILTERCLASSES: DWORD = 0x00000040;
pub const DI_FLAGSEX_SETFAILEDINSTALL: DWORD = 0x00000080;
pub const DI_FLAGSEX_DEVICECHANGE: DWORD = 0x00000100;
pub const DI_FLAGSEX_ALWAYSWRITEIDS: DWORD = 0x00000200;
pub const DI_FLAGSEX_PROPCHANGE_PENDING: DWORD = 0x00000400;
pub const DI_FLAGSEX_ALLOWEXCLUDEDDRVS: DWORD = 0x00000800;
pub const DI_FLAGSEX_NOUIONQUERYREMOVE: DWORD = 0x00001000;
pub const DI_FLAGSEX_USECLASSFORCOMPAT: DWORD = 0x00002000;
pub const DI_FLAGSEX_RESERVED4: DWORD = 0x00004000;
pub const DI_FLAGSEX_NO_DRVREG_MODIFY: DWORD = 0x00008000;
pub const DI_FLAGSEX_IN_SYSTEM_SETUP: DWORD = 0x00010000;
pub const DI_FLAGSEX_INET_DRIVER: DWORD = 0x00020000;
pub const DI_FLAGSEX_APPENDDRIVERLIST: DWORD = 0x00040000;
pub const DI_FLAGSEX_PREINSTALLBACKUP: DWORD = 0x00080000;
pub const DI_FLAGSEX_BACKUPONREPLACE: DWORD = 0x00100000;
pub const DI_FLAGSEX_DRIVERLIST_FROM_URL: DWORD = 0x00200000;
pub const DI_FLAGSEX_RESERVED1: DWORD = 0x00400000;
pub const DI_FLAGSEX_EXCLUDE_OLD_INET_DRIVERS: DWORD = 0x00800000;
pub const DI_FLAGSEX_POWERPAGE_ADDED: DWORD = 0x01000000;
pub const DI_FLAGSEX_FILTERSIMILARDRIVERS: DWORD = 0x02000000;
pub const DI_FLAGSEX_INSTALLEDDRIVER: DWORD = 0x04000000;
pub const DI_FLAGSEX_NO_CLASSLIST_NODE_MERGE: DWORD = 0x08000000;
pub const DI_FLAGSEX_ALTPLATFORM_DRVSEARCH: DWORD = 0x10000000;
pub const DI_FLAGSEX_RESTART_DEVICE_ONLY: DWORD = 0x20000000;
pub const DI_FLAGSEX_RECURSIVESEARCH: DWORD = 0x40000000;
pub const DI_FLAGSEX_SEARCH_PUBLISHED_INFS: DWORD = 0x80000000;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_CLASSINSTALL_HEADER {
cbSize: DWORD,
InstallFunction: DI_FUNCTION,
}}
pub type PSP_CLASSINSTALL_HEADER = *mut SP_CLASSINSTALL_HEADER;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_ENABLECLASS_PARAMS {
ClassInstallHeader: SP_CLASSINSTALL_HEADER,
ClassGuid: GUID,
EnableMessage: DWORD,
}}
pub type PSP_ENABLECLASS_PARAMS = *mut SP_ENABLECLASS_PARAMS;
pub const ENABLECLASS_QUERY: DWORD = 0;
pub const ENABLECLASS_SUCCESS: DWORD = 1;
pub const ENABLECLASS_FAILURE: DWORD = 2;
pub const DICS_ENABLE: DWORD = 0x00000001;
pub const DICS_DISABLE: DWORD = 0x00000002;
pub const DICS_PROPCHANGE: DWORD = 0x00000003;
pub const DICS_START: DWORD = 0x00000004;
pub const DICS_STOP: DWORD = 0x00000005;
pub const DICS_FLAG_GLOBAL: DWORD = 0x00000001;
pub const DICS_FLAG_CONFIGSPECIFIC: DWORD = 0x00000002;
pub const DICS_FLAG_CONFIGGENERAL: DWORD = 0x00000004;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_PROPCHANGE_PARAMS {
ClassInstallHeader: SP_CLASSINSTALL_HEADER,
StateChange: DWORD,
Scope: DWORD,
HwProfile: DWORD,
}}
pub type PSP_PROPCHANGE_PARAMS = *mut SP_PROPCHANGE_PARAMS;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_REMOVEDEVICE_PARAMS {
ClassInstallHeader: SP_CLASSINSTALL_HEADER,
Scope: DWORD,
HwProfile: DWORD,
}}
pub type PSP_REMOVEDEVICE_PARAMS = *mut SP_REMOVEDEVICE_PARAMS;
pub const DI_REMOVEDEVICE_GLOBAL: DWORD = 0x00000001;
pub const DI_REMOVEDEVICE_CONFIGSPECIFIC: DWORD = 0x00000002;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_UNREMOVEDEVICE_PARAMS {
ClassInstallHeader: SP_CLASSINSTALL_HEADER,
Scope: DWORD,
HwProfile: DWORD,
}}
pub type PSP_UNREMOVEDEVICE_PARAMS = *mut SP_UNREMOVEDEVICE_PARAMS;
pub const DI_UNREMOVEDEVICE_CONFIGSPECIFIC: DWORD = 0x00000002;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_SELECTDEVICE_PARAMS_A {
ClassInstallHeader: SP_CLASSINSTALL_HEADER,
Title: [CHAR; MAX_TITLE_LEN],
Instructions: [CHAR; MAX_INSTRUCTION_LEN],
ListLabel: [CHAR; MAX_LABEL_LEN],
SubTitle: [CHAR; MAX_SUBTITLE_LEN],
Reserved: [BYTE; 2],
}}
pub type PSP_SELECTDEVICE_PARAMS_A = *mut SP_SELECTDEVICE_PARAMS_A;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_SELECTDEVICE_PARAMS_W {
ClassInstallHeader: SP_CLASSINSTALL_HEADER,
Title: [WCHAR; MAX_TITLE_LEN],
Instructions: [WCHAR; MAX_INSTRUCTION_LEN],
ListLabel: [WCHAR; MAX_LABEL_LEN],
SubTitle: [WCHAR; MAX_SUBTITLE_LEN],
}}
pub type PSP_SELECTDEVICE_PARAMS_W = *mut SP_SELECTDEVICE_PARAMS_W;
FN!{stdcall PDETECT_PROGRESS_NOTIFY(
ProgressNotifyParam: PVOID,
DetectComplete: DWORD,
) -> BOOL}
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DETECTDEVICE_PARAMS {
ClassInstallHeader: SP_CLASSINSTALL_HEADER,
DetectProgressNotify: PDETECT_PROGRESS_NOTIFY,
ProgressNotifyParam: PVOID,
}}
pub type PSP_DETECTDEVICE_PARAMS = *mut SP_DETECTDEVICE_PARAMS;
pub const MAX_INSTALLWIZARD_DYNAPAGES: usize = 20;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_INSTALLWIZARD_DATA {
ClassInstallHeader: SP_CLASSINSTALL_HEADER,
Flags: DWORD,
DynamicPages: [HPROPSHEETPAGE; MAX_INSTALLWIZARD_DYNAPAGES],
NumDynamicPages: DWORD,
DynamicPageFlags: DWORD,
PrivateFlags: DWORD,
PrivateData: LPARAM,
hwndWizardDlg: HWND,
}}
pub type PSP_INSTALLWIZARD_DATA = *mut SP_INSTALLWIZARD_DATA;
pub const NDW_INSTALLFLAG_DIDFACTDEFS: DWORD = 0x00000001;
pub const NDW_INSTALLFLAG_HARDWAREALLREADYIN: DWORD = 0x00000002;
pub const NDW_INSTALLFLAG_NEEDRESTART: DWORD = DI_NEEDRESTART;
pub const NDW_INSTALLFLAG_NEEDREBOOT: DWORD = DI_NEEDREBOOT;
pub const NDW_INSTALLFLAG_NEEDSHUTDOWN: DWORD = 0x00000200;
pub const NDW_INSTALLFLAG_EXPRESSINTRO: DWORD = 0x00000400;
pub const NDW_INSTALLFLAG_SKIPISDEVINSTALLED: DWORD = 0x00000800;
pub const NDW_INSTALLFLAG_NODETECTEDDEVS: DWORD = 0x00001000;
pub const NDW_INSTALLFLAG_INSTALLSPECIFIC: DWORD = 0x00002000;
pub const NDW_INSTALLFLAG_SKIPCLASSLIST: DWORD = 0x00004000;
pub const NDW_INSTALLFLAG_CI_PICKED_OEM: DWORD = 0x00008000;
pub const NDW_INSTALLFLAG_PCMCIAMODE: DWORD = 0x00010000;
pub const NDW_INSTALLFLAG_PCMCIADEVICE: DWORD = 0x00020000;
pub const NDW_INSTALLFLAG_USERCANCEL: DWORD = 0x00040000;
pub const NDW_INSTALLFLAG_KNOWNCLASS: DWORD = 0x00080000;
pub const DYNAWIZ_FLAG_PAGESADDED: DWORD = 0x00000001;
pub const DYNAWIZ_FLAG_ANALYZE_HANDLECONFLICT: DWORD = 0x00000008;
pub const DYNAWIZ_FLAG_INSTALLDET_NEXT: DWORD = 0x00000002;
pub const DYNAWIZ_FLAG_INSTALLDET_PREV: DWORD = 0x00000004;
pub const MIN_IDD_DYNAWIZ_RESOURCE_ID: c_int = 10000;
pub const MAX_IDD_DYNAWIZ_RESOURCE_ID: c_int = 11000;
pub const IDD_DYNAWIZ_FIRSTPAGE: c_int = 10000;
pub const IDD_DYNAWIZ_SELECT_PREVPAGE: c_int = 10001;
pub const IDD_DYNAWIZ_SELECT_NEXTPAGE: c_int = 10002;
pub const IDD_DYNAWIZ_ANALYZE_PREVPAGE: c_int = 10003;
pub const IDD_DYNAWIZ_ANALYZE_NEXTPAGE: c_int = 10004;
pub const IDD_DYNAWIZ_SELECTDEV_PAGE: c_int = 10009;
pub const IDD_DYNAWIZ_ANALYZEDEV_PAGE: c_int = 10010;
pub const IDD_DYNAWIZ_INSTALLDETECTEDDEVS_PAGE: c_int = 10011;
pub const IDD_DYNAWIZ_SELECTCLASS_PAGE: c_int = 10012;
pub const IDD_DYNAWIZ_INSTALLDETECTED_PREVPAGE: c_int = 10006;
pub const IDD_DYNAWIZ_INSTALLDETECTED_NEXTPAGE: c_int = 10007;
pub const IDD_DYNAWIZ_INSTALLDETECTED_NODEVS: c_int = 10008;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_NEWDEVICEWIZARD_DATA {
ClassInstallHeader: SP_CLASSINSTALL_HEADER,
Flags: DWORD,
DynamicPages: [HPROPSHEETPAGE; MAX_INSTALLWIZARD_DYNAPAGES],
NumDynamicPages: DWORD,
hwndWizardDlg: HWND,
}}
pub type PSP_NEWDEVICEWIZARD_DATA = *mut SP_NEWDEVICEWIZARD_DATA;
pub type SP_ADDPROPERTYPAGE_DATA = SP_NEWDEVICEWIZARD_DATA;
pub type PSP_ADDPROPERTYPAGE_DATA = PSP_NEWDEVICEWIZARD_DATA;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_TROUBLESHOOTER_PARAMS_A {
ClassInstallHeader: SP_CLASSINSTALL_HEADER,
ChmFile: [CHAR; MAX_PATH],
HtmlTroubleShooter: [CHAR; MAX_PATH],
}}
pub type PSP_TROUBLESHOOTER_PARAMS_A = *mut SP_TROUBLESHOOTER_PARAMS_A;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_TROUBLESHOOTER_PARAMS_W {
ClassInstallHeader: SP_CLASSINSTALL_HEADER,
ChmFile: [WCHAR; MAX_PATH],
HtmlTroubleShooter: [WCHAR; MAX_PATH],
}}
pub type PSP_TROUBLESHOOTER_PARAMS_W = *mut SP_TROUBLESHOOTER_PARAMS_W;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_POWERMESSAGEWAKE_PARAMS_A {
ClassInstallHeader: SP_CLASSINSTALL_HEADER,
PowerMessageWake: [CHAR; LINE_LEN * 2],
}}
pub type PSP_POWERMESSAGEWAKE_PARAMS_A = *mut SP_POWERMESSAGEWAKE_PARAMS_A;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_POWERMESSAGEWAKE_PARAMS_W {
ClassInstallHeader: SP_CLASSINSTALL_HEADER,
PowerMessageWake: [WCHAR; LINE_LEN * 2],
}}
pub type PSP_POWERMESSAGEWAKE_PARAMS_W = *mut SP_POWERMESSAGEWAKE_PARAMS_W;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DRVINFO_DATA_V2_A {
cbSize: DWORD,
DriverType: DWORD,
Reserved: ULONG_PTR,
Description: [CHAR; LINE_LEN],
MfgName: [CHAR; LINE_LEN],
ProviderName: [CHAR; LINE_LEN],
DriverDate: FILETIME,
DriverVersion: DWORDLONG,
}}
pub type PSP_DRVINFO_DATA_V2_A = *mut SP_DRVINFO_DATA_V2_A;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DRVINFO_DATA_V2_W {
cbSize: DWORD,
DriverType: DWORD,
Reserved: ULONG_PTR,
Description: [WCHAR; LINE_LEN],
MfgName: [WCHAR; LINE_LEN],
ProviderName: [WCHAR; LINE_LEN],
DriverDate: FILETIME,
DriverVersion: DWORDLONG,
}}
pub type PSP_DRVINFO_DATA_V2_W = *mut SP_DRVINFO_DATA_V2_W;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DRVINFO_DATA_V1_A {
cbSize: DWORD,
DriverType: DWORD,
Reserved: ULONG_PTR,
Description: [CHAR; LINE_LEN],
MfgName: [CHAR; LINE_LEN],
ProviderName: [CHAR; LINE_LEN],
}}
pub type PSP_DRVINFO_DATA_V1_A = *mut SP_DRVINFO_DATA_V1_A;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DRVINFO_DATA_V1_W {
cbSize: DWORD,
DriverType: DWORD,
Reserved: ULONG_PTR,
Description: [WCHAR; LINE_LEN],
MfgName: [WCHAR; LINE_LEN],
ProviderName: [WCHAR; LINE_LEN],
}}
pub type PSP_DRVINFO_DATA_V1_W = *mut SP_DRVINFO_DATA_V1_W;
pub type SP_DRVINFO_DATA_A = SP_DRVINFO_DATA_V2_A;
pub type PSP_DRVINFO_DATA_A = PSP_DRVINFO_DATA_V2_A;
pub type SP_DRVINFO_DATA_W = SP_DRVINFO_DATA_V2_W;
pub type PSP_DRVINFO_DATA_W = PSP_DRVINFO_DATA_V2_W;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DRVINFO_DETAIL_DATA_A {
cbSize: DWORD,
InfDate: FILETIME,
CompatIDsOffset: DWORD,
CompatIDsLength: DWORD,
Reserved: ULONG_PTR,
SectionName: [CHAR; LINE_LEN],
InfFileName: [CHAR; MAX_PATH],
DrvDescription: [CHAR; LINE_LEN],
HardwareID: [CHAR; ANYSIZE_ARRAY],
}}
pub type PSP_DRVINFO_DETAIL_DATA_A = *mut SP_DRVINFO_DETAIL_DATA_A;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DRVINFO_DETAIL_DATA_W {
cbSize: DWORD,
InfDate: FILETIME,
CompatIDsOffset: DWORD,
CompatIDsLength: DWORD,
Reserved: ULONG_PTR,
SectionName: [WCHAR; LINE_LEN],
InfFileName: [WCHAR; MAX_PATH],
DrvDescription: [WCHAR; LINE_LEN],
HardwareID: [WCHAR; ANYSIZE_ARRAY],
}}
pub type PSP_DRVINFO_DETAIL_DATA_W = *mut SP_DRVINFO_DETAIL_DATA_W;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_DRVINSTALL_PARAMS {
cbSize: DWORD,
Rank: DWORD,
Flags: DWORD,
PrivateData: DWORD_PTR,
Reserved: DWORD,
}}
pub type PSP_DRVINSTALL_PARAMS = *mut SP_DRVINSTALL_PARAMS;
pub const DNF_DUPDESC: DWORD = 0x00000001;
pub const DNF_OLDDRIVER: DWORD = 0x00000002;
pub const DNF_EXCLUDEFROMLIST: DWORD = 0x00000004;
pub const DNF_NODRIVER: DWORD = 0x00000008;
pub const DNF_LEGACYINF: DWORD = 0x00000010;
pub const DNF_CLASS_DRIVER: DWORD = 0x00000020;
pub const DNF_COMPATIBLE_DRIVER: DWORD = 0x00000040;
pub const DNF_INET_DRIVER: DWORD = 0x00000080;
pub const DNF_UNUSED1: DWORD = 0x00000100;
pub const DNF_UNUSED2: DWORD = 0x00000200;
pub const DNF_OLD_INET_DRIVER: DWORD = 0x00000400;
pub const DNF_BAD_DRIVER: DWORD = 0x00000800;
pub const DNF_DUPPROVIDER: DWORD = 0x00001000;
pub const DNF_INF_IS_SIGNED: DWORD = 0x00002000;
pub const DNF_OEM_F6_INF: DWORD = 0x00004000;
pub const DNF_DUPDRIVERVER: DWORD = 0x00008000;
pub const DNF_BASIC_DRIVER: DWORD = 0x00010000;
pub const DNF_AUTHENTICODE_SIGNED: DWORD = 0x00020000;
pub const DNF_INSTALLEDDRIVER: DWORD = 0x00040000;
pub const DNF_ALWAYSEXCLUDEFROMLIST: DWORD = 0x00080000;
pub const DNF_INBOX_DRIVER: DWORD = 0x00100000;
pub const DNF_REQUESTADDITIONALSOFTWARE: DWORD = 0x00200000;
pub const DNF_UNUSED_22: DWORD = 0x00400000;
pub const DNF_UNUSED_23: DWORD = 0x00800000;
pub const DNF_UNUSED_24: DWORD = 0x01000000;
pub const DNF_UNUSED_25: DWORD = 0x02000000;
pub const DNF_UNUSED_26: DWORD = 0x04000000;
pub const DNF_UNUSED_27: DWORD = 0x08000000;
pub const DNF_UNUSED_28: DWORD = 0x10000000;
pub const DNF_UNUSED_29: DWORD = 0x20000000;
pub const DNF_UNUSED_30: DWORD = 0x40000000;
pub const DNF_UNUSED_31: DWORD = 0x80000000;
pub const DRIVER_HARDWAREID_RANK: DWORD = 0x00000FFF;
pub const DRIVER_HARDWAREID_MASK: DWORD = 0x80000FFF;
pub const DRIVER_UNTRUSTED_RANK: DWORD = 0x80000000;
pub const DRIVER_W9X_SUSPECT_RANK: DWORD = 0xC0000000;
FN!{stdcall PSP_DETSIG_CMPPROC(
DeviceInfoSet: HDEVINFO,
NewDeviceData: PSP_DEVINFO_DATA,
ExistingDeviceData: PSP_DEVINFO_DATA,
CompareContext: PVOID,
) -> DWORD}
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct COINSTALLER_CONTEXT_DATA {
PostProcessing: BOOL,
InstallResult: DWORD,
PrivateData: PVOID,
}}
pub type PCOINSTALLER_CONTEXT_DATA = *mut COINSTALLER_CONTEXT_DATA;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_CLASSIMAGELIST_DATA {
cbSize: DWORD,
ImageList: HIMAGELIST,
Reserved: ULONG_PTR,
}}
pub type PSP_CLASSIMAGELIST_DATA = *mut SP_CLASSIMAGELIST_DATA;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_PROPSHEETPAGE_REQUEST {
cbSize: DWORD,
PageRequested: DWORD,
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
}}
pub type PSP_PROPSHEETPAGE_REQUEST = *mut SP_PROPSHEETPAGE_REQUEST;
pub const SPPSR_SELECT_DEVICE_RESOURCES: DWORD = 1;
pub const SPPSR_ENUM_BASIC_DEVICE_PROPERTIES: DWORD = 2;
pub const SPPSR_ENUM_ADV_DEVICE_PROPERTIES: DWORD = 3;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_BACKUP_QUEUE_PARAMS_V2_A {
cbSize: DWORD,
FullInfPath: [CHAR; MAX_PATH],
FilenameOffset: INT,
ReinstallInstance: [CHAR; MAX_PATH],
}}
pub type PSP_BACKUP_QUEUE_PARAMS_V2_A = *mut SP_BACKUP_QUEUE_PARAMS_V2_A;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_BACKUP_QUEUE_PARAMS_V2_W {
cbSize: DWORD,
FullInfPath: [WCHAR; MAX_PATH],
FilenameOffset: INT,
ReinstallInstance: [WCHAR; MAX_PATH],
}}
pub type PSP_BACKUP_QUEUE_PARAMS_V2_W = *mut SP_BACKUP_QUEUE_PARAMS_V2_W;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_BACKUP_QUEUE_PARAMS_V1_A {
cbSize: DWORD,
FullInfPath: [CHAR; MAX_PATH],
FilenameOffset: INT,
}}
pub type PSP_BACKUP_QUEUE_PARAMS_V1_A = *mut SP_BACKUP_QUEUE_PARAMS_V1_A;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_BACKUP_QUEUE_PARAMS_V1_W {
cbSize: DWORD,
FullInfPath: [WCHAR; MAX_PATH],
FilenameOffset: INT,
}}
pub type PSP_BACKUP_QUEUE_PARAMS_V1_W = *mut SP_BACKUP_QUEUE_PARAMS_V1_W;
pub type SP_BACKUP_QUEUE_PARAMS_A = SP_BACKUP_QUEUE_PARAMS_V2_A;
pub type PSP_BACKUP_QUEUE_PARAMS_A = PSP_BACKUP_QUEUE_PARAMS_V2_A;
pub type SP_BACKUP_QUEUE_PARAMS_W = SP_BACKUP_QUEUE_PARAMS_V2_W;
pub type PSP_BACKUP_QUEUE_PARAMS_W = PSP_BACKUP_QUEUE_PARAMS_V2_W;
pub const ERROR_EXPECTED_SECTION_NAME: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0;
pub const ERROR_BAD_SECTION_NAME_LINE: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 1;
pub const ERROR_SECTION_NAME_TOO_LONG: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 2;
pub const ERROR_GENERAL_SYNTAX: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 3;
pub const ERROR_WRONG_INF_STYLE: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x100;
pub const ERROR_SECTION_NOT_FOUND: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x101;
pub const ERROR_LINE_NOT_FOUND: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x102;
pub const ERROR_NO_BACKUP: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x103;
pub const ERROR_NO_ASSOCIATED_CLASS: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x200;
pub const ERROR_CLASS_MISMATCH: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x201;
pub const ERROR_DUPLICATE_FOUND: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x202;
pub const ERROR_NO_DRIVER_SELECTED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x203;
pub const ERROR_KEY_DOES_NOT_EXIST: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x204;
pub const ERROR_INVALID_DEVINST_NAME: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x205;
pub const ERROR_INVALID_CLASS: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x206;
pub const ERROR_DEVINST_ALREADY_EXISTS: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x207;
pub const ERROR_DEVINFO_NOT_REGISTERED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x208;
pub const ERROR_INVALID_REG_PROPERTY: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x209;
pub const ERROR_NO_INF: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x20A;
pub const ERROR_NO_SUCH_DEVINST: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x20B;
pub const ERROR_CANT_LOAD_CLASS_ICON: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x20C;
pub const ERROR_INVALID_CLASS_INSTALLER: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x20D;
pub const ERROR_DI_DO_DEFAULT: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x20E;
pub const ERROR_DI_NOFILECOPY: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x20F;
pub const ERROR_INVALID_HWPROFILE: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x210;
pub const ERROR_NO_DEVICE_SELECTED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x211;
pub const ERROR_DEVINFO_LIST_LOCKED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x212;
pub const ERROR_DEVINFO_DATA_LOCKED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x213;
pub const ERROR_DI_BAD_PATH: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x214;
pub const ERROR_NO_CLASSINSTALL_PARAMS: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x215;
pub const ERROR_FILEQUEUE_LOCKED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x216;
pub const ERROR_BAD_SERVICE_INSTALLSECT: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x217;
pub const ERROR_NO_CLASS_DRIVER_LIST: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x218;
pub const ERROR_NO_ASSOCIATED_SERVICE: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x219;
pub const ERROR_NO_DEFAULT_DEVICE_INTERFACE: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x21A;
pub const ERROR_DEVICE_INTERFACE_ACTIVE: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x21B;
pub const ERROR_DEVICE_INTERFACE_REMOVED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x21C;
pub const ERROR_BAD_INTERFACE_INSTALLSECT: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x21D;
pub const ERROR_NO_SUCH_INTERFACE_CLASS: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x21E;
pub const ERROR_INVALID_REFERENCE_STRING: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x21F;
pub const ERROR_INVALID_MACHINENAME: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x220;
pub const ERROR_REMOTE_COMM_FAILURE: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x221;
pub const ERROR_MACHINE_UNAVAILABLE: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x222;
pub const ERROR_NO_CONFIGMGR_SERVICES: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x223;
pub const ERROR_INVALID_PROPPAGE_PROVIDER: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x224;
pub const ERROR_NO_SUCH_DEVICE_INTERFACE: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x225;
pub const ERROR_DI_POSTPROCESSING_REQUIRED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x226;
pub const ERROR_INVALID_COINSTALLER: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x227;
pub const ERROR_NO_COMPAT_DRIVERS: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x228;
pub const ERROR_NO_DEVICE_ICON: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x229;
pub const ERROR_INVALID_INF_LOGCONFIG: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x22A;
pub const ERROR_DI_DONT_INSTALL: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x22B;
pub const ERROR_INVALID_FILTER_DRIVER: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x22C;
pub const ERROR_NON_WINDOWS_NT_DRIVER: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x22D;
pub const ERROR_NON_WINDOWS_DRIVER: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x22E;
pub const ERROR_NO_CATALOG_FOR_OEM_INF: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x22F;
pub const ERROR_DEVINSTALL_QUEUE_NONNATIVE: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x230;
pub const ERROR_NOT_DISABLEABLE: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x231;
pub const ERROR_CANT_REMOVE_DEVINST: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x232;
pub const ERROR_INVALID_TARGET: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x233;
pub const ERROR_DRIVER_NONNATIVE: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x234;
pub const ERROR_IN_WOW64: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x235;
pub const ERROR_SET_SYSTEM_RESTORE_POINT: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x236;
pub const ERROR_SCE_DISABLED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x238;
pub const ERROR_UNKNOWN_EXCEPTION: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x239;
pub const ERROR_PNP_REGISTRY_ERROR: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x23A;
pub const ERROR_REMOTE_REQUEST_UNSUPPORTED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x23B;
pub const ERROR_NOT_AN_INSTALLED_OEM_INF: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x23C;
pub const ERROR_INF_IN_USE_BY_DEVICES: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x23D;
pub const ERROR_DI_FUNCTION_OBSOLETE: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x23E;
pub const ERROR_NO_AUTHENTICODE_CATALOG: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x23F;
pub const ERROR_AUTHENTICODE_DISALLOWED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x240;
pub const ERROR_AUTHENTICODE_TRUSTED_PUBLISHER: DWORD = APPLICATION_ERROR_MASK
| ERROR_SEVERITY_ERROR | 0x241;
pub const ERROR_AUTHENTICODE_TRUST_NOT_ESTABLISHED: DWORD = APPLICATION_ERROR_MASK
| ERROR_SEVERITY_ERROR | 0x242;
pub const ERROR_AUTHENTICODE_PUBLISHER_NOT_TRUSTED: DWORD = APPLICATION_ERROR_MASK
| ERROR_SEVERITY_ERROR | 0x243;
pub const ERROR_SIGNATURE_OSATTRIBUTE_MISMATCH: DWORD = APPLICATION_ERROR_MASK
| ERROR_SEVERITY_ERROR | 0x244;
pub const ERROR_ONLY_VALIDATE_VIA_AUTHENTICODE: DWORD = APPLICATION_ERROR_MASK
| ERROR_SEVERITY_ERROR | 0x245;
pub const ERROR_DEVICE_INSTALLER_NOT_READY: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x246;
pub const ERROR_DRIVER_STORE_ADD_FAILED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x247;
pub const ERROR_DEVICE_INSTALL_BLOCKED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x248;
pub const ERROR_DRIVER_INSTALL_BLOCKED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x249;
pub const ERROR_WRONG_INF_TYPE: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR | 0x24A;
pub const ERROR_FILE_HASH_NOT_IN_CATALOG: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x24B;
pub const ERROR_DRIVER_STORE_DELETE_FAILED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x24C;
pub const ERROR_UNRECOVERABLE_STACK_OVERFLOW: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x300;
pub const EXCEPTION_SPAPI_UNRECOVERABLE_STACK_OVERFLOW: DWORD = ERROR_UNRECOVERABLE_STACK_OVERFLOW;
pub const ERROR_NO_DEFAULT_INTERFACE_DEVICE: DWORD = ERROR_NO_DEFAULT_DEVICE_INTERFACE;
pub const ERROR_INTERFACE_DEVICE_ACTIVE: DWORD = ERROR_DEVICE_INTERFACE_ACTIVE;
pub const ERROR_INTERFACE_DEVICE_REMOVED: DWORD = ERROR_DEVICE_INTERFACE_REMOVED;
pub const ERROR_NO_SUCH_INTERFACE_DEVICE: DWORD = ERROR_NO_SUCH_DEVICE_INTERFACE;
pub const ERROR_NOT_INSTALLED: DWORD = APPLICATION_ERROR_MASK | ERROR_SEVERITY_ERROR
| 0x1000;
extern "system" {
pub fn SetupGetInfInformationA(
InfSpec: LPCVOID,
SearchControl: DWORD,
ReturnBuffer: PSP_INF_INFORMATION,
ReturnBufferSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupGetInfInformationW(
InfSpec: LPCVOID,
SearchControl: DWORD,
ReturnBuffer: PSP_INF_INFORMATION,
ReturnBufferSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
}
pub const INFINFO_INF_SPEC_IS_HINF: DWORD = 1;
pub const INFINFO_INF_NAME_IS_ABSOLUTE: DWORD = 2;
pub const INFINFO_DEFAULT_SEARCH: DWORD = 3;
pub const INFINFO_REVERSE_DEFAULT_SEARCH: DWORD = 4;
pub const INFINFO_INF_PATH_LIST_SEARCH: DWORD = 5;
extern "system" {
pub fn SetupQueryInfFileInformationA(
InfInformation: PSP_INF_INFORMATION,
InfIndex: UINT,
ReturnBuffer: PSTR,
ReturnBufferSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupQueryInfFileInformationW(
InfInformation: PSP_INF_INFORMATION,
InfIndex: UINT,
ReturnBuffer: PWSTR,
ReturnBufferSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupQueryInfOriginalFileInformationA(
InfInformation: PSP_INF_INFORMATION,
InfIndex: UINT,
AlternatePlatformInfo: PSP_ALTPLATFORM_INFO,
OriginalFileInfo: PSP_ORIGINAL_FILE_INFO_A,
) -> BOOL;
pub fn SetupQueryInfOriginalFileInformationW(
InfInformation: PSP_INF_INFORMATION,
InfIndex: UINT,
AlternatePlatformInfo: PSP_ALTPLATFORM_INFO,
OriginalFileInfo: PSP_ORIGINAL_FILE_INFO_W,
) -> BOOL;
pub fn SetupQueryInfVersionInformationA(
InfInformation: PSP_INF_INFORMATION,
InfIndex: UINT,
Key: PCSTR,
ReturnBuffer: PSTR,
ReturnBufferSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupQueryInfVersionInformationW(
InfInformation: PSP_INF_INFORMATION,
InfIndex: UINT,
Key: PCWSTR,
ReturnBuffer: PWSTR,
ReturnBufferSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupGetInfDriverStoreLocationA(
FileName: PCSTR,
AlternatePlatformInfo: PSP_ALTPLATFORM_INFO,
LocaleName: PCSTR,
ReturnBuffer: PSTR,
ReturnBufferSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupGetInfDriverStoreLocationW(
FileName: PCWSTR,
AlternatePlatformInfo: PSP_ALTPLATFORM_INFO,
LocaleName: PCWSTR,
ReturnBuffer: PWSTR,
ReturnBufferSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupGetInfPublishedNameA(
DriverStoreLocation: PCSTR,
ReturnBuffer: PSTR,
ReturnBufferSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupGetInfPublishedNameW(
DriverStoreLocation: PCWSTR,
ReturnBuffer: PWSTR,
ReturnBufferSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupGetInfFileListA(
DirectoryPath: PCSTR,
InfStyle: DWORD,
ReturnBuffer: PSTR,
ReturnBufferSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupGetInfFileListW(
DirectoryPath: PCWSTR,
InfStyle: DWORD,
ReturnBuffer: PWSTR,
ReturnBufferSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupOpenInfFileW(
FileName: PCWSTR,
InfClass: PCWSTR,
InfStyle: DWORD,
ErrorLine: PUINT,
) -> HINF;
pub fn SetupOpenInfFileA(
FileName: PCSTR,
InfClass: PCSTR,
InfStyle: DWORD,
ErrorLine: PUINT,
) -> HINF;
pub fn SetupOpenMasterInf() -> HINF;
pub fn SetupOpenAppendInfFileW(
FileName: PCWSTR,
InfHandle: HINF,
ErrorLine: PUINT,
) -> BOOL;
pub fn SetupOpenAppendInfFileA(
FileName: PCSTR,
InfHandle: HINF,
ErrorLine: PUINT,
) -> BOOL;
pub fn SetupCloseInfFile(
InfHandle: HINF,
) -> ();
pub fn SetupFindFirstLineA(
InfHandle: HINF,
Section: PCSTR,
Key: PCSTR,
Context: PINFCONTEXT,
) -> BOOL;
pub fn SetupFindFirstLineW(
InfHandle: HINF,
Section: PCWSTR,
Key: PCWSTR,
Context: PINFCONTEXT,
) -> BOOL;
pub fn SetupFindNextLine(
ContextIn: PINFCONTEXT,
ContextOut: PINFCONTEXT,
) -> BOOL;
pub fn SetupFindNextMatchLineA(
ContextIn: PINFCONTEXT,
Key: PCSTR,
ContextOut: PINFCONTEXT,
) -> BOOL;
pub fn SetupFindNextMatchLineW(
ContextIn: PINFCONTEXT,
Key: PCWSTR,
ContextOut: PINFCONTEXT,
) -> BOOL;
pub fn SetupGetLineByIndexA(
InfHandle: HINF,
Section: PCSTR,
Index: DWORD,
Context: PINFCONTEXT,
) -> BOOL;
pub fn SetupGetLineByIndexW(
InfHandle: HINF,
Section: PCWSTR,
Index: DWORD,
Context: PINFCONTEXT,
) -> BOOL;
pub fn SetupGetLineCountA(
InfHandle: HINF,
Section: PCSTR,
) -> LONG;
pub fn SetupGetLineCountW(
InfHandle: HINF,
Section: PCWSTR,
) -> LONG;
pub fn SetupGetLineTextA(
Context: PINFCONTEXT,
InfHandle: HINF,
Section: PCSTR,
Key: PCSTR,
ReturnBuffer: PSTR,
ReturnBufferSize: DWORD,
ReturnBufferSize: PDWORD,
) -> BOOL;
pub fn SetupGetLineTextW(
Context: PINFCONTEXT,
InfHandle: HINF,
Section: PCWSTR,
Key: PCWSTR,
ReturnBuffer: PWSTR,
ReturnBufferSize: DWORD,
ReturnBufferSize: PDWORD,
) -> BOOL;
pub fn SetupGetFieldCount(
Context: PINFCONTEXT,
) -> DWORD;
pub fn SetupGetStringFieldA(
Context: PINFCONTEXT,
FieldIndex: DWORD,
ReturnBuffer: PSTR,
ReturnBufferSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupGetStringFieldW(
Context: PINFCONTEXT,
FieldIndex: DWORD,
ReturnBuffer: PWSTR,
ReturnBufferSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupGetIntField(
Context: PINFCONTEXT,
FieldIndex: DWORD,
IntegerValue: PINT,
) -> BOOL;
pub fn SetupGetMultiSzFieldA(
Context: PINFCONTEXT,
FieldIndex: DWORD,
ReturnBuffer: PSTR,
ReturnBufferSize: DWORD,
RequiredSize: LPDWORD,
) -> BOOL;
pub fn SetupGetMultiSzFieldW(
Context: PINFCONTEXT,
FieldIndex: DWORD,
ReturnBuffer: PWSTR,
ReturnBufferSize: DWORD,
RequiredSize: LPDWORD,
) -> BOOL;
pub fn SetupGetBinaryField(
Context: PINFCONTEXT,
FieldIndex: DWORD,
ReturnBuffer: PBYTE,
ReturnBufferSize: DWORD,
RequiredSize: LPDWORD,
) -> BOOL;
pub fn SetupGetFileCompressionInfoA(
SourceFileName: PCSTR,
ActualSourceFileName: *mut PSTR,
SourceFileSize: PDWORD,
TargetFileSize: PDWORD,
CompressionType: PUINT,
) -> DWORD;
pub fn SetupGetFileCompressionInfoW(
SourceFileName: PCWSTR,
ActualSourceFileName: *mut PWSTR,
SourceFileSize: PDWORD,
TargetFileSize: PDWORD,
CompressionType: PUINT,
) -> DWORD;
pub fn SetupGetFileCompressionInfoExA(
SourceFileName: PCSTR,
ActualSourceFileNameBuffer: PSTR,
ActualSourceFileNameBufferLen: DWORD,
RequiredBufferLen: PDWORD,
SourceFileSize: PDWORD,
TargetFileSize: PDWORD,
CompressionType: PUINT,
) -> BOOL;
pub fn SetupGetFileCompressionInfoExW(
SourceFileName: PCWSTR,
ActualSourceFileNameBuffer: PWSTR,
ActualSourceFileNameBufferLen: DWORD,
RequiredBufferLen: PDWORD,
SourceFileSize: PDWORD,
TargetFileSize: PDWORD,
CompressionType: PUINT,
) -> BOOL;
}
pub const FILE_COMPRESSION_NONE: UINT = 0;
pub const FILE_COMPRESSION_WINLZA: UINT = 1;
pub const FILE_COMPRESSION_MSZIP: UINT = 2;
pub const FILE_COMPRESSION_NTCAB: UINT = 3;
extern "system" {
pub fn SetupDecompressOrCopyFileA(
SourceFileName: PCSTR,
TargetFileName: PCSTR,
CompressionType: PUINT,
) -> DWORD;
pub fn SetupDecompressOrCopyFileW(
SourceFileName: PCWSTR,
TargetFileName: PCWSTR,
CompressionType: PUINT,
) -> DWORD;
pub fn SetupGetSourceFileLocationA(
InfHandle: HINF,
InfContext: PINFCONTEXT,
FileName: PCSTR,
SourceId: PUINT,
ReturnBuffer: PSTR,
ReturnBufferSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupGetSourceFileLocationW(
InfHandle: HINF,
InfContext: PINFCONTEXT,
FileName: PCWSTR,
SourceId: PUINT,
ReturnBuffer: PWSTR,
ReturnBufferSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupGetSourceFileSizeA(
InfHandle: HINF,
InfContext: PINFCONTEXT,
FileName: PCSTR,
Section: PCSTR,
FileSize: PDWORD,
RoundingFactor: UINT,
) -> BOOL;
pub fn SetupGetSourceFileSizeW(
InfHandle: HINF,
InfContext: PINFCONTEXT,
FileName: PCWSTR,
Section: PCWSTR,
FileSize: PDWORD,
RoundingFactor: UINT,
) -> BOOL;
pub fn SetupGetTargetPathA(
InfHandle: HINF,
InfContext: PINFCONTEXT,
Section: PCSTR,
ReturnBuffer: PSTR,
ReturnBufferSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupGetTargetPathW(
InfHandle: HINF,
InfContext: PINFCONTEXT,
Section: PCWSTR,
ReturnBuffer: PWSTR,
ReturnBufferSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
}
pub const SRCLIST_TEMPORARY: DWORD = 0x00000001;
pub const SRCLIST_NOBROWSE: DWORD = 0x00000002;
pub const SRCLIST_SYSTEM: DWORD = 0x00000010;
pub const SRCLIST_USER: DWORD = 0x00000020;
pub const SRCLIST_SYSIFADMIN: DWORD = 0x00000040;
pub const SRCLIST_SUBDIRS: DWORD = 0x00000100;
pub const SRCLIST_APPEND: DWORD = 0x00000200;
pub const SRCLIST_NOSTRIPPLATFORM: DWORD = 0x00000400;
extern "system" {
pub fn SetupSetSourceListA(
Flags: DWORD,
SourceList: *mut PCSTR,
SourceCount: UINT,
) -> BOOL;
pub fn SetupSetSourceListW(
Flags: DWORD,
SourceList: *mut PCWSTR,
SourceCount: UINT,
) -> BOOL;
pub fn SetupCancelTemporarySourceList() -> BOOL;
pub fn SetupAddToSourceListA(
Flags: DWORD,
Source: PCSTR,
) -> BOOL;
pub fn SetupAddToSourceListW(
Flags: DWORD,
Source: PCWSTR,
) -> BOOL;
pub fn SetupRemoveFromSourceListA(
Flags: DWORD,
Source: PCSTR,
) -> BOOL;
pub fn SetupRemoveFromSourceListW(
Flags: DWORD,
Source: PCWSTR,
) -> BOOL;
pub fn SetupQuerySourceListA(
Flags: DWORD,
List: *mut *mut PCSTR,
Count: PUINT,
) -> BOOL;
pub fn SetupQuerySourceListW(
Flags: DWORD,
List: *mut *mut PCWSTR,
Count: PUINT,
) -> BOOL;
pub fn SetupFreeSourceListA(
List: *mut *mut PCSTR,
Count: UINT,
) -> BOOL;
pub fn SetupFreeSourceListW(
List: *mut *mut PCWSTR,
Count: UINT,
) -> BOOL;
pub fn SetupPromptForDiskA(
hwndParent: HWND,
DialogTitle: PCSTR,
DiskName: PCSTR,
PathToSource: PCSTR,
FileSought: PCSTR,
TagFile: PCSTR,
DiskPromptStyle: DWORD,
PathBuffer: PSTR,
PathBufferSize: DWORD,
PathRequiredSize: PDWORD,
) -> UINT;
pub fn SetupPromptForDiskW(
hwndParent: HWND,
DialogTitle: PCWSTR,
DiskName: PCWSTR,
PathToSource: PCWSTR,
FileSought: PCWSTR,
TagFile: PCWSTR,
DiskPromptStyle: DWORD,
PathBuffer: PWSTR,
PathBufferSize: DWORD,
PathRequiredSize: PDWORD,
) -> UINT;
pub fn SetupCopyErrorA(
hwndParent: HWND,
DialogTitle: PCSTR,
DiskName: PCSTR,
PathToSource: PCSTR,
SourceFile: PCSTR,
TargetPathFile: PCSTR,
Win32ErrorCode: UINT,
Style: DWORD,
PathBuffer: PSTR,
PathBufferSize: DWORD,
PathRequiredSize: PDWORD,
) -> UINT;
pub fn SetupCopyErrorW(
hwndParent: HWND,
DialogTitle: PCWSTR,
DiskName: PCWSTR,
PathToSource: PCWSTR,
SourceFile: PCWSTR,
TargetPathFile: PCWSTR,
Win32ErrorCode: UINT,
Style: DWORD,
PathBuffer: PWSTR,
PathBufferSize: DWORD,
PathRequiredSize: PDWORD,
) -> UINT;
pub fn SetupRenameErrorA(
hwndParent: HWND,
DialogTitle: PCSTR,
SourceFile: PCSTR,
TargetFile: PCSTR,
Win32ErrorCode: UINT,
Style: DWORD,
) -> UINT;
pub fn SetupRenameErrorW(
hwndParent: HWND,
DialogTitle: PCWSTR,
SourceFile: PCWSTR,
TargetFile: PCWSTR,
Win32ErrorCode: UINT,
Style: DWORD,
) -> UINT;
pub fn SetupDeleteErrorA(
hwndParent: HWND,
DialogTitle: PCSTR,
File: PCSTR,
Win32ErrorCode: UINT,
Style: DWORD,
) -> UINT;
pub fn SetupDeleteErrorW(
hwndParent: HWND,
DialogTitle: PCWSTR,
File: PCWSTR,
Win32ErrorCode: UINT,
Style: DWORD,
) -> UINT;
pub fn SetupBackupErrorA(
hwndParent: HWND,
DialogTitle: PCSTR,
SourceFile: PCSTR,
TargetFile: PCSTR,
Win32ErrorCode: UINT,
Style: DWORD,
) -> UINT;
pub fn SetupBackupErrorW(
hwndParent: HWND,
DialogTitle: PCWSTR,
SourceFile: PCWSTR,
TargetFile: PCWSTR,
Win32ErrorCode: UINT,
Style: DWORD,
) -> UINT;
}
pub const IDF_NOBROWSE: DWORD = 0x00000001;
pub const IDF_NOSKIP: DWORD = 0x00000002;
pub const IDF_NODETAILS: DWORD = 0x00000004;
pub const IDF_NOCOMPRESSED: DWORD = 0x00000008;
pub const IDF_CHECKFIRST: DWORD = 0x00000100;
pub const IDF_NOBEEP: DWORD = 0x00000200;
pub const IDF_NOFOREGROUND: DWORD = 0x00000400;
pub const IDF_WARNIFSKIP: DWORD = 0x00000800;
pub const IDF_NOREMOVABLEMEDIAPROMPT: DWORD = 0x00001000;
pub const IDF_USEDISKNAMEASPROMPT: DWORD = 0x00002000;
pub const IDF_OEMDISK: DWORD = 0x80000000;
pub const DPROMPT_SUCCESS: UINT = 0;
pub const DPROMPT_CANCEL: UINT = 1;
pub const DPROMPT_SKIPFILE: UINT = 2;
pub const DPROMPT_BUFFERTOOSMALL: UINT = 3;
pub const DPROMPT_OUTOFMEMORY: UINT = 4;
extern "system" {
pub fn SetupSetDirectoryIdA(
InfHandle: HINF,
Id: DWORD,
Directory: PCSTR,
) -> BOOL;
pub fn SetupSetDirectoryIdW(
InfHandle: HINF,
Id: DWORD,
Directory: PCWSTR,
) -> BOOL;
pub fn SetupSetDirectoryIdExA(
InfHandle: HINF,
Id: DWORD,
Directory: PCSTR,
Flags: DWORD,
Reserved1: DWORD,
Reserved2: PVOID,
) -> BOOL;
pub fn SetupSetDirectoryIdExW(
InfHandle: HINF,
Id: DWORD,
Directory: PCWSTR,
Flags: DWORD,
Reserved1: DWORD,
Reserved2: PVOID,
) -> BOOL;
}
pub const SETDIRID_NOT_FULL_PATH: DWORD = 0x00000001;
extern "system" {
pub fn SetupGetSourceInfoA(
InfHandle: HINF,
SourceId: UINT,
InfoDesired: UINT,
ReturnBuffer: PSTR,
ReturnBufferSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupGetSourceInfoW(
InfHandle: HINF,
SourceId: UINT,
InfoDesired: UINT,
ReturnBuffer: PWSTR,
ReturnBufferSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
}
pub const SRCINFO_PATH: UINT = 1;
pub const SRCINFO_TAGFILE: UINT = 2;
pub const SRCINFO_DESCRIPTION: UINT = 3;
pub const SRCINFO_FLAGS: UINT = 4;
pub const SRCINFO_TAGFILE2: UINT = 4;
pub const SRC_FLAGS_CABFILE: UINT = 0x0010;
extern "system" {
pub fn SetupInstallFileA(
InfHandle: HINF,
InfContext: PINFCONTEXT,
SourceFile: PCSTR,
SourcePathRoot: PCSTR,
DestinationName: PCSTR,
CopyStyle: DWORD,
CopyMsgHandler: PSP_FILE_CALLBACK_A,
Context: PVOID,
) -> BOOL;
pub fn SetupInstallFileW(
InfHandle: HINF,
InfContext: PINFCONTEXT,
SourceFile: PCWSTR,
SourcePathRoot: PCWSTR,
DestinationName: PCWSTR,
CopyStyle: DWORD,
CopyMsgHandler: PSP_FILE_CALLBACK_W,
Context: PVOID,
) -> BOOL;
pub fn SetupInstallFileExA(
InfHandle: HINF,
InfContext: PINFCONTEXT,
SourceFile: PCSTR,
SourcePathRoot: PCSTR,
DestinationName: PCSTR,
CopyStyle: DWORD,
CopyMsgHandler: PSP_FILE_CALLBACK_A,
Context: PVOID,
FileWasInUse: PBOOL,
) -> BOOL;
pub fn SetupInstallFileExW(
InfHandle: HINF,
InfContext: PINFCONTEXT,
SourceFile: PCWSTR,
SourcePathRoot: PCWSTR,
DestinationName: PCWSTR,
CopyStyle: DWORD,
CopyMsgHandler: PSP_FILE_CALLBACK_W,
Context: PVOID,
FileWasInUse: PBOOL,
) -> BOOL;
}
pub const SP_COPY_DELETESOURCE: DWORD = 0x0000001;
pub const SP_COPY_REPLACEONLY: DWORD = 0x0000002;
pub const SP_COPY_NEWER: DWORD = 0x0000004;
pub const SP_COPY_NEWER_OR_SAME: DWORD = SP_COPY_NEWER;
pub const SP_COPY_NOOVERWRITE: DWORD = 0x0000008;
pub const SP_COPY_NODECOMP: DWORD = 0x0000010;
pub const SP_COPY_LANGUAGEAWARE: DWORD = 0x0000020;
pub const SP_COPY_SOURCE_ABSOLUTE: DWORD = 0x0000040;
pub const SP_COPY_SOURCEPATH_ABSOLUTE: DWORD = 0x0000080;
pub const SP_COPY_IN_USE_NEEDS_REBOOT: DWORD = 0x0000100;
pub const SP_COPY_FORCE_IN_USE: DWORD = 0x0000200;
pub const SP_COPY_NOSKIP: DWORD = 0x0000400;
pub const SP_FLAG_CABINETCONTINUATION: DWORD = 0x0000800;
pub const SP_COPY_FORCE_NOOVERWRITE: DWORD = 0x0001000;
pub const SP_COPY_FORCE_NEWER: DWORD = 0x0002000;
pub const SP_COPY_WARNIFSKIP: DWORD = 0x0004000;
pub const SP_COPY_NOBROWSE: DWORD = 0x0008000;
pub const SP_COPY_NEWER_ONLY: DWORD = 0x0010000;
pub const SP_COPY_RESERVED: DWORD = 0x0020000;
pub const SP_COPY_OEMINF_CATALOG_ONLY: DWORD = 0x0040000;
pub const SP_COPY_REPLACE_BOOT_FILE: DWORD = 0x0080000;
pub const SP_COPY_NOPRUNE: DWORD = 0x0100000;
pub const SP_COPY_OEM_F6_INF: DWORD = 0x0200000;
pub const SP_COPY_ALREADYDECOMP: DWORD = 0x0400000;
pub const SP_COPY_WINDOWS_SIGNED: DWORD = 0x1000000;
pub const SP_COPY_PNPLOCKED: DWORD = 0x2000000;
pub const SP_COPY_IN_USE_TRY_RENAME: DWORD = 0x4000000;
pub const SP_COPY_INBOX_INF: DWORD = 0x8000000;
pub const SP_COPY_HARDLINK: DWORD = 0x10000000;
pub const SP_BACKUP_BACKUPPASS: DWORD = 0x00000001;
pub const SP_BACKUP_DEMANDPASS: DWORD = 0x00000002;
pub const SP_BACKUP_SPECIAL: DWORD = 0x00000004;
pub const SP_BACKUP_BOOTFILE: DWORD = 0x00000008;
extern "system" {
pub fn SetupOpenFileQueue() -> HSPFILEQ;
pub fn SetupCloseFileQueue(
QueueHandle: HSPFILEQ,
) -> BOOL;
pub fn SetupSetFileQueueAlternatePlatformA(
QueueHandle: HSPFILEQ,
AlternatePlatformInfo: PSP_ALTPLATFORM_INFO,
AlternateDefaultCatalogFile: PCSTR,
) -> BOOL;
pub fn SetupSetFileQueueAlternatePlatformW(
QueueHandle: HSPFILEQ,
AlternatePlatformInfo: PSP_ALTPLATFORM_INFO,
AlternateDefaultCatalogFile: PCWSTR,
) -> BOOL;
pub fn SetupSetPlatformPathOverrideA(
Override: PCSTR,
) -> BOOL;
pub fn SetupSetPlatformPathOverrideW(
Override: PCWSTR,
) -> BOOL;
pub fn SetupQueueCopyA(
QueueHandle: HSPFILEQ,
SourceRootPath: PCSTR,
SourcePath: PCSTR,
SourceFilename: PCSTR,
SourceDescription: PCSTR,
SourceTagfile: PCSTR,
TargetDirectory: PCSTR,
TargetFilename: PCSTR,
CopyStyle: DWORD,
) -> BOOL;
pub fn SetupQueueCopyW(
QueueHandle: HSPFILEQ,
SourceRootPath: PCWSTR,
SourcePath: PCWSTR,
SourceFilename: PCWSTR,
SourceDescription: PCWSTR,
SourceTagfile: PCWSTR,
TargetDirectory: PCWSTR,
TargetFilename: PCWSTR,
CopyStyle: DWORD,
) -> BOOL;
pub fn SetupQueueCopyIndirectA(
CopyParams: PSP_FILE_COPY_PARAMS_A,
) -> BOOL;
pub fn SetupQueueCopyIndirectW(
CopyParams: PSP_FILE_COPY_PARAMS_W,
) -> BOOL;
pub fn SetupQueueDefaultCopyA(
QueueHandle: HSPFILEQ,
InfHandle: HINF,
SourceRootPath: PCSTR,
SourceFilename: PCSTR,
TargetFilename: PCSTR,
CopyStyle: DWORD,
) -> BOOL;
pub fn SetupQueueDefaultCopyW(
QueueHandle: HSPFILEQ,
InfHandle: HINF,
SourceRootPath: PCWSTR,
SourceFilename: PCWSTR,
TargetFilename: PCWSTR,
CopyStyle: DWORD,
) -> BOOL;
pub fn SetupQueueCopySectionA(
QueueHandle: HSPFILEQ,
SourceRootPath: PCSTR,
InfHandle: HINF,
ListInfHandle: HINF,
Section: PCSTR,
CopyStyle: DWORD,
) -> BOOL;
pub fn SetupQueueCopySectionW(
QueueHandle: HSPFILEQ,
SourceRootPath: PCWSTR,
InfHandle: HINF,
ListInfHandle: HINF,
Section: PCWSTR,
CopyStyle: DWORD,
) -> BOOL;
pub fn SetupQueueDeleteA(
QueueHandle: HSPFILEQ,
PathPart1: PCSTR,
PathPart2: PCSTR,
) -> BOOL;
pub fn SetupQueueDeleteW(
QueueHandle: HSPFILEQ,
PathPart1: PCWSTR,
PathPart2: PCWSTR,
) -> BOOL;
pub fn SetupQueueDeleteSectionA(
QueueHandle: HSPFILEQ,
InfHandle: HINF,
ListInfHandle: HINF,
Section: PCSTR,
) -> BOOL;
pub fn SetupQueueDeleteSectionW(
QueueHandle: HSPFILEQ,
InfHandle: HINF,
ListInfHandle: HINF,
Section: PCWSTR,
) -> BOOL;
pub fn SetupQueueRenameA(
QueueHandle: HSPFILEQ,
SourcePath: PCSTR,
SourceFilename: PCSTR,
TargetPath: PCSTR,
TargetFilename: PCSTR,
) -> BOOL;
pub fn SetupQueueRenameW(
QueueHandle: HSPFILEQ,
SourcePath: PCWSTR,
SourceFilename: PCWSTR,
TargetPath: PCWSTR,
TargetFilename: PCWSTR,
) -> BOOL;
pub fn SetupQueueRenameSectionA(
QueueHandle: HSPFILEQ,
InfHandle: HINF,
ListInfHandle: HINF,
Section: PCSTR,
) -> BOOL;
pub fn SetupQueueRenameSectionW(
QueueHandle: HSPFILEQ,
InfHandle: HINF,
ListInfHandle: HINF,
Section: PCWSTR,
) -> BOOL;
pub fn SetupCommitFileQueueA(
Owner: HWND,
QueueHandle: HSPFILEQ,
MsgHandler: PSP_FILE_CALLBACK_A,
Context: PVOID,
) -> BOOL;
pub fn SetupCommitFileQueueW(
Owner: HWND,
QueueHandle: HSPFILEQ,
MsgHandler: PSP_FILE_CALLBACK_W,
Context: PVOID,
) -> BOOL;
pub fn SetupScanFileQueueA(
FileQueue: HSPFILEQ,
Flags: DWORD,
Window: HWND,
CallbackRoutine: PSP_FILE_CALLBACK_A,
CallbackContext: PVOID,
Result: PDWORD,
) -> BOOL;
pub fn SetupScanFileQueueW(
FileQueue: HSPFILEQ,
Flags: DWORD,
Window: HWND,
CallbackRoutine: PSP_FILE_CALLBACK_W,
CallbackContext: PVOID,
Result: PDWORD,
) -> BOOL;
}
pub const SPQ_SCAN_FILE_PRESENCE: DWORD = 0x00000001;
pub const SPQ_SCAN_FILE_VALIDITY: DWORD = 0x00000002;
pub const SPQ_SCAN_USE_CALLBACK: DWORD = 0x00000004;
pub const SPQ_SCAN_USE_CALLBACKEX: DWORD = 0x00000008;
pub const SPQ_SCAN_INFORM_USER: DWORD = 0x00000010;
pub const SPQ_SCAN_PRUNE_COPY_QUEUE: DWORD = 0x00000020;
pub const SPQ_SCAN_USE_CALLBACK_SIGNERINFO: DWORD = 0x00000040;
pub const SPQ_SCAN_PRUNE_DELREN: DWORD = 0x00000080;
pub const SPQ_SCAN_FILE_PRESENCE_WITHOUT_SOURCE: DWORD = 0x00000100;
pub const SPQ_SCAN_FILE_COMPARISON: DWORD = 0x00000200;
pub const SPQ_SCAN_ACTIVATE_DRP: DWORD = 0x00000400;
pub const SPQ_DELAYED_COPY: DWORD = 0x00000001;
extern "system" {
pub fn SetupGetFileQueueCount(
FileQueue: HSPFILEQ,
SubQueueFileOp: UINT,
NumOperations: PUINT,
) -> BOOL;
pub fn SetupGetFileQueueFlags(
FileQueue: HSPFILEQ,
Flags: PDWORD,
) -> BOOL;
pub fn SetupSetFileQueueFlags(
FileQueue: HSPFILEQ,
FlagMask: DWORD,
Flags: DWORD,
) -> BOOL;
}
pub const SPQ_FLAG_BACKUP_AWARE: DWORD = 0x00000001;
pub const SPQ_FLAG_ABORT_IF_UNSIGNED: DWORD = 0x00000002;
pub const SPQ_FLAG_FILES_MODIFIED: DWORD = 0x00000004;
pub const SPQ_FLAG_DO_SHUFFLEMOVE: DWORD = 0x00000008;
pub const SPQ_FLAG_VALID: DWORD = 0x0000000F;
pub const SPOST_NONE: DWORD = 0;
pub const SPOST_PATH: DWORD = 1;
pub const SPOST_URL: DWORD = 2;
pub const SPOST_MAX: DWORD = 3;
extern "system" {
pub fn SetupCopyOEMInfA(
SourceInfFileName: PCSTR,
OEMSourceMediaLocation: PCSTR,
OEMSourceMediaType: DWORD,
CopyStyle: DWORD,
DestinationInfFileName: PSTR,
DestinationInfFileNameSize: DWORD,
RequiredSize: PDWORD,
DestinationInfFileNameComponent: *mut PSTR,
) -> BOOL;
pub fn SetupCopyOEMInfW(
SourceInfFileName: PCWSTR,
OEMSourceMediaLocation: PCWSTR,
OEMSourceMediaType: DWORD,
CopyStyle: DWORD,
DestinationInfFileName: PWSTR,
DestinationInfFileNameSize: DWORD,
RequiredSize: PDWORD,
DestinationInfFileNameComponent: *mut PWSTR,
) -> BOOL;
}
pub const SUOI_FORCEDELETE: DWORD = 0x00000001;
pub const SUOI_INTERNAL1: DWORD = 0x00000002;
extern "system" {
pub fn SetupUninstallOEMInfA(
InfFileName: PCSTR,
Flags: DWORD,
Reserved: PVOID,
) -> BOOL;
pub fn SetupUninstallOEMInfW(
InfFileName: PCWSTR,
Flags: DWORD,
Reserved: PVOID,
) -> BOOL;
pub fn SetupUninstallNewlyCopiedInfs(
FileQueue: HSPFILEQ,
Flags: DWORD,
Reserved: PVOID,
) -> BOOL;
pub fn SetupCreateDiskSpaceListA(
Reserved1: PVOID,
Reserved2: DWORD,
Flags: UINT,
) -> HDSKSPC;
pub fn SetupCreateDiskSpaceListW(
Reserved1: PVOID,
Reserved2: DWORD,
Flags: UINT,
) -> HDSKSPC;
}
pub const SPDSL_IGNORE_DISK: UINT = 0x00000001;
pub const SPDSL_DISALLOW_NEGATIVE_ADJUST: UINT = 0x00000002;
extern "system" {
pub fn SetupDuplicateDiskSpaceListA(
DiskSpace: HDSKSPC,
Reserved1: PVOID,
Reserved2: DWORD,
Flags: UINT,
) -> HDSKSPC;
pub fn SetupDuplicateDiskSpaceListW(
DiskSpace: HDSKSPC,
Reserved1: PVOID,
Reserved2: DWORD,
Flags: UINT,
) -> HDSKSPC;
pub fn SetupDestroyDiskSpaceList(
DiskSpace: HDSKSPC,
) -> BOOL;
pub fn SetupQueryDrivesInDiskSpaceListA(
DiskSpace: HDSKSPC,
ReturnBuffer: PSTR,
ReturnBufferSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupQueryDrivesInDiskSpaceListW(
DiskSpace: HDSKSPC,
ReturnBuffer: PWSTR,
ReturnBufferSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupQuerySpaceRequiredOnDriveA(
DiskSpace: HDSKSPC,
DriveSpec: PCSTR,
SpaceRequired: *mut LONGLONG,
Reserved1: PVOID,
Reserved2: UINT,
) -> BOOL;
pub fn SetupQuerySpaceRequiredOnDriveW(
DiskSpace: HDSKSPC,
DriveSpec: PCWSTR,
SpaceRequired: *mut LONGLONG,
Reserved1: PVOID,
Reserved2: UINT,
) -> BOOL;
pub fn SetupAdjustDiskSpaceListA(
DiskSpace: HDSKSPC,
DriveRoot: LPCSTR,
Amount: LONGLONG,
Reserved1: PVOID,
Reserved2: UINT,
) -> BOOL;
pub fn SetupAdjustDiskSpaceListW(
DiskSpace: HDSKSPC,
DriveRoot: LPCWSTR,
Amount: LONGLONG,
Reserved1: PVOID,
Reserved2: UINT,
) -> BOOL;
pub fn SetupAddToDiskSpaceListA(
DiskSpace: HDSKSPC,
TargetFilespec: PCSTR,
FileSize: LONGLONG,
Operation: UINT,
Reserved1: PVOID,
Reserved2: UINT,
) -> BOOL;
pub fn SetupAddToDiskSpaceListW(
DiskSpace: HDSKSPC,
TargetFilespec: PCWSTR,
FileSize: LONGLONG,
Operation: UINT,
Reserved1: PVOID,
Reserved2: UINT,
) -> BOOL;
pub fn SetupAddSectionToDiskSpaceListA(
DiskSpace: HDSKSPC,
InfHandle: HINF,
ListInfHandle: HINF,
SectionName: PCSTR,
Operation: UINT,
Reserved1: PVOID,
Reserved2: UINT,
) -> BOOL;
pub fn SetupAddSectionToDiskSpaceListW(
DiskSpace: HDSKSPC,
InfHandle: HINF,
ListInfHandle: HINF,
SectionName: PCWSTR,
Operation: UINT,
Reserved1: PVOID,
Reserved2: UINT,
) -> BOOL;
pub fn SetupAddInstallSectionToDiskSpaceListA(
DiskSpace: HDSKSPC,
InfHandle: HINF,
LayoutInfHandle: HINF,
SectionName: PCSTR,
Reserved1: PVOID,
Reserved2: UINT,
) -> BOOL;
pub fn SetupAddInstallSectionToDiskSpaceListW(
DiskSpace: HDSKSPC,
InfHandle: HINF,
LayoutInfHandle: HINF,
SectionName: PCWSTR,
Reserved1: PVOID,
Reserved2: UINT,
) -> BOOL;
pub fn SetupRemoveFromDiskSpaceListA(
DiskSpace: HDSKSPC,
TargetFilespec: PCSTR,
Operation: UINT,
Reserved1: PVOID,
Reserved2: UINT,
) -> BOOL;
pub fn SetupRemoveFromDiskSpaceListW(
DiskSpace: HDSKSPC,
TargetFilespec: PCWSTR,
Operation: UINT,
Reserved1: PVOID,
Reserved2: UINT,
) -> BOOL;
pub fn SetupRemoveSectionFromDiskSpaceListA(
DiskSpace: HDSKSPC,
InfHandle: HINF,
ListInfHandle: HINF,
SectionName: PCSTR,
Operation: UINT,
Reserved1: PVOID,
Reserved2: UINT,
) -> BOOL;
pub fn SetupRemoveSectionFromDiskSpaceListW(
DiskSpace: HDSKSPC,
InfHandle: HINF,
ListInfHandle: HINF,
SectionName: PCWSTR,
Operation: UINT,
Reserved1: PVOID,
Reserved2: UINT,
) -> BOOL;
pub fn SetupRemoveInstallSectionFromDiskSpaceListA(
DiskSpace: HDSKSPC,
InfHandle: HINF,
LayoutInfHandle: HINF,
SectionName: PCSTR,
Reserved1: PVOID,
Reserved2: UINT,
) -> BOOL;
pub fn SetupRemoveInstallSectionFromDiskSpaceListW(
DiskSpace: HDSKSPC,
InfHandle: HINF,
LayoutInfHandle: HINF,
SectionName: PCWSTR,
Reserved1: PVOID,
Reserved2: UINT,
) -> BOOL;
pub fn SetupIterateCabinetA(
CabinetFile: PCSTR,
Reserved: DWORD,
MsgHandler: PSP_FILE_CALLBACK_A,
Context: PVOID,
) -> BOOL;
pub fn SetupIterateCabinetW(
CabinetFile: PCWSTR,
Reserved: DWORD,
MsgHandler: PSP_FILE_CALLBACK_W,
Context: PVOID,
) -> BOOL;
pub fn SetupPromptReboot(
FileQueue: HSPFILEQ,
Owner: HWND,
ScanOnly: BOOL,
) -> INT;
}
pub const SPFILEQ_FILE_IN_USE: INT = 0x00000001;
pub const SPFILEQ_REBOOT_RECOMMENDED: INT = 0x00000002;
pub const SPFILEQ_REBOOT_IN_PROGRESS: INT = 0x00000004;
extern "system" {
pub fn SetupInitDefaultQueueCallback(
OwnerWindow: HWND,
) -> PVOID;
pub fn SetupInitDefaultQueueCallbackEx(
OwnerWindow: HWND,
AlternateProgressWindow: HWND,
ProgressMessage: UINT,
Reserved1: DWORD,
Reserved2: PVOID,
) -> PVOID;
pub fn SetupTermDefaultQueueCallback(
Context: PVOID,
) -> ();
pub fn SetupDefaultQueueCallbackA(
Context: PVOID,
Notification: UINT,
Param1: UINT_PTR,
Param2: UINT_PTR,
) -> UINT;
pub fn SetupDefaultQueueCallbackW(
Context: PVOID,
Notification: UINT,
Param1: UINT_PTR,
Param2: UINT_PTR,
) -> UINT;
}
pub const FLG_ADDREG_DELREG_BIT: DWORD = 0x00008000;
pub const FLG_ADDREG_BINVALUETYPE: DWORD = 0x00000001;
pub const FLG_ADDREG_NOCLOBBER: DWORD = 0x00000002;
pub const FLG_ADDREG_DELVAL: DWORD = 0x00000004;
pub const FLG_ADDREG_APPEND: DWORD = 0x00000008;
pub const FLG_ADDREG_KEYONLY: DWORD = 0x00000010;
pub const FLG_ADDREG_OVERWRITEONLY: DWORD = 0x00000020;
pub const FLG_ADDREG_64BITKEY: DWORD = 0x00001000;
pub const FLG_ADDREG_KEYONLY_COMMON: DWORD = 0x00002000;
pub const FLG_ADDREG_32BITKEY: DWORD = 0x00004000;
pub const FLG_ADDREG_TYPE_MASK: DWORD = 0xFFFF0000 | FLG_ADDREG_BINVALUETYPE;
pub const FLG_ADDREG_TYPE_SZ: DWORD = 0x00000000;
pub const FLG_ADDREG_TYPE_MULTI_SZ: DWORD = 0x00010000;
pub const FLG_ADDREG_TYPE_EXPAND_SZ: DWORD = 0x00020000;
pub const FLG_ADDREG_TYPE_BINARY: DWORD = 0x00000000 | FLG_ADDREG_BINVALUETYPE;
pub const FLG_ADDREG_TYPE_DWORD: DWORD = 0x00010000 | FLG_ADDREG_BINVALUETYPE;
pub const FLG_ADDREG_TYPE_NONE: DWORD = 0x00020000 | FLG_ADDREG_BINVALUETYPE;
pub const FLG_DELREG_VALUE: DWORD = 0x00000000;
pub const FLG_DELREG_TYPE_MASK: DWORD = FLG_ADDREG_TYPE_MASK;
pub const FLG_DELREG_TYPE_SZ: DWORD = FLG_ADDREG_TYPE_SZ;
pub const FLG_DELREG_TYPE_MULTI_SZ: DWORD = FLG_ADDREG_TYPE_MULTI_SZ;
pub const FLG_DELREG_TYPE_EXPAND_SZ: DWORD = FLG_ADDREG_TYPE_EXPAND_SZ;
pub const FLG_DELREG_TYPE_BINARY: DWORD = FLG_ADDREG_TYPE_BINARY;
pub const FLG_DELREG_TYPE_DWORD: DWORD = FLG_ADDREG_TYPE_DWORD;
pub const FLG_DELREG_TYPE_NONE: DWORD = FLG_ADDREG_TYPE_NONE;
pub const FLG_DELREG_64BITKEY: DWORD = FLG_ADDREG_64BITKEY;
pub const FLG_DELREG_KEYONLY_COMMON: DWORD = FLG_ADDREG_KEYONLY_COMMON;
pub const FLG_DELREG_32BITKEY: DWORD = FLG_ADDREG_32BITKEY;
pub const FLG_DELREG_OPERATION_MASK: DWORD = 0x000000FE;
pub const FLG_DELREG_MULTI_SZ_DELSTRING: DWORD = FLG_DELREG_TYPE_MULTI_SZ | FLG_ADDREG_DELREG_BIT
| 0x00000002;
pub const FLG_BITREG_CLEARBITS: DWORD = 0x00000000;
pub const FLG_BITREG_SETBITS: DWORD = 0x00000001;
pub const FLG_BITREG_64BITKEY: DWORD = 0x00001000;
pub const FLG_BITREG_32BITKEY: DWORD = 0x00004000;
pub const FLG_INI2REG_64BITKEY: DWORD = 0x00001000;
pub const FLG_INI2REG_32BITKEY: DWORD = 0x00004000;
pub const FLG_REGSVR_DLLREGISTER: DWORD = 0x00000001;
pub const FLG_REGSVR_DLLINSTALL: DWORD = 0x00000002;
pub const FLG_PROFITEM_CURRENTUSER: DWORD = 0x00000001;
pub const FLG_PROFITEM_DELETE: DWORD = 0x00000002;
pub const FLG_PROFITEM_GROUP: DWORD = 0x00000004;
pub const FLG_PROFITEM_CSIDL: DWORD = 0x00000008;
pub const FLG_ADDPROPERTY_NOCLOBBER: DWORD = 0x00000001;
pub const FLG_ADDPROPERTY_OVERWRITEONLY: DWORD = 0x00000002;
pub const FLG_ADDPROPERTY_APPEND: DWORD = 0x00000004;
pub const FLG_ADDPROPERTY_OR: DWORD = 0x00000008;
pub const FLG_ADDPROPERTY_AND: DWORD = 0x00000010;
pub const FLG_DELPROPERTY_MULTI_SZ_DELSTRING: DWORD = 0x00000001;
extern "system" {
pub fn SetupInstallFromInfSectionA(
Owner: HWND,
InfHandle: HINF,
SectionName: PCSTR,
Flags: UINT,
RelativeKeyRoot: HKEY,
SourceRootPath: PCSTR,
CopyFlags: UINT,
MsgHandler: PSP_FILE_CALLBACK_A,
Context: PVOID,
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
) -> BOOL;
pub fn SetupInstallFromInfSectionW(
Owner: HWND,
InfHandle: HINF,
SectionName: PCWSTR,
Flags: UINT,
RelativeKeyRoot: HKEY,
SourceRootPath: PCWSTR,
CopyFlags: UINT,
MsgHandler: PSP_FILE_CALLBACK_W,
Context: PVOID,
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
) -> BOOL;
}
pub const SPINST_LOGCONFIG: UINT = 0x00000001;
pub const SPINST_INIFILES: UINT = 0x00000002;
pub const SPINST_REGISTRY: UINT = 0x00000004;
pub const SPINST_INI2REG: UINT = 0x00000008;
pub const SPINST_FILES: UINT = 0x00000010;
pub const SPINST_BITREG: UINT = 0x00000020;
pub const SPINST_REGSVR: UINT = 0x00000040;
pub const SPINST_UNREGSVR: UINT = 0x00000080;
pub const SPINST_PROFILEITEMS: UINT = 0x00000100;
pub const SPINST_COPYINF: UINT = 0x00000200;
pub const SPINST_PROPERTIES: UINT = 0x00000400;
pub const SPINST_ALL: UINT = 0x000007ff;
pub const SPINST_SINGLESECTION: UINT = 0x00010000;
pub const SPINST_LOGCONFIG_IS_FORCED: UINT = 0x00020000;
pub const SPINST_LOGCONFIGS_ARE_OVERRIDES: UINT = 0x00040000;
pub const SPINST_REGISTERCALLBACKAWARE: UINT = 0x00080000;
pub const SPINST_DEVICEINSTALL: UINT = 0x00100000;
extern "system" {
pub fn SetupInstallFilesFromInfSectionA(
InfHandle: HINF,
LayoutInfHandle: HINF,
FileQueue: HSPFILEQ,
SectionName: PCSTR,
SourceRootPath: PCSTR,
CopyFlags: UINT,
) -> BOOL;
pub fn SetupInstallFilesFromInfSectionW(
InfHandle: HINF,
LayoutInfHandle: HINF,
FileQueue: HSPFILEQ,
SectionName: PCWSTR,
SourceRootPath: PCWSTR,
CopyFlags: UINT,
) -> BOOL;
}
pub const SPSVCINST_TAGTOFRONT: DWORD = 0x00000001;
pub const SPSVCINST_ASSOCSERVICE: DWORD = 0x00000002;
pub const SPSVCINST_DELETEEVENTLOGENTRY: DWORD = 0x00000004;
pub const SPSVCINST_NOCLOBBER_DISPLAYNAME: DWORD = 0x00000008;
pub const SPSVCINST_NOCLOBBER_STARTTYPE: DWORD = 0x00000010;
pub const SPSVCINST_NOCLOBBER_ERRORCONTROL: DWORD = 0x00000020;
pub const SPSVCINST_NOCLOBBER_LOADORDERGROUP: DWORD = 0x00000040;
pub const SPSVCINST_NOCLOBBER_DEPENDENCIES: DWORD = 0x00000080;
pub const SPSVCINST_NOCLOBBER_DESCRIPTION: DWORD = 0x00000100;
pub const SPSVCINST_STOPSERVICE: DWORD = 0x00000200;
pub const SPSVCINST_CLOBBER_SECURITY: DWORD = 0x00000400;
pub const SPSVCINST_STARTSERVICE: DWORD = 0x00000800;
pub const SPSVCINST_NOCLOBBER_REQUIREDPRIVILEGES: DWORD = 0x00001000;
extern "system" {
pub fn SetupInstallServicesFromInfSectionA(
InfHandle: HINF,
SectionName: PCSTR,
Flags: DWORD,
) -> BOOL;
pub fn SetupInstallServicesFromInfSectionW(
InfHandle: HINF,
SectionName: PCWSTR,
Flags: DWORD,
) -> BOOL;
pub fn SetupInstallServicesFromInfSectionExA(
InfHandle: HINF,
SectionName: PCSTR,
Flags: DWORD,
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
Reserved1: PVOID,
Reserved2: PVOID,
) -> BOOL;
pub fn SetupInstallServicesFromInfSectionExW(
InfHandle: HINF,
SectionName: PCWSTR,
Flags: DWORD,
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
Reserved1: PVOID,
Reserved2: PVOID,
) -> BOOL;
pub fn InstallHinfSectionA(
Window: HWND,
ModuleHandle: HINSTANCE,
CommandLine: PCSTR,
ShowCommand: INT,
) -> ();
pub fn InstallHinfSectionW(
Window: HWND,
ModuleHandle: HINSTANCE,
CommandLine: PCWSTR,
ShowCommand: INT,
) -> ();
}
pub type HSPFILELOG = PVOID;
extern "system" {
pub fn SetupInitializeFileLogA(
LogFileName: PCSTR,
Flags: DWORD,
) -> HSPFILELOG;
pub fn SetupInitializeFileLogW(
LogFileName: PCWSTR,
Flags: DWORD,
) -> HSPFILELOG;
}
pub const SPFILELOG_SYSTEMLOG: DWORD = 0x00000001;
pub const SPFILELOG_FORCENEW: DWORD = 0x00000002;
pub const SPFILELOG_QUERYONLY: DWORD = 0x00000004;
extern "system" {
pub fn SetupTerminateFileLog(
FileLogHandle: HSPFILELOG,
) -> BOOL;
pub fn SetupLogFileA(
FileLogHandle: HSPFILELOG,
LogSectionName: PCSTR,
SourceFilename: PCSTR,
TargetFilename: PCSTR,
Checksum: DWORD,
DiskTagfile: PCSTR,
DiskDescription: PCSTR,
OtherInfo: PCSTR,
Flags: DWORD,
) -> BOOL;
pub fn SetupLogFileW(
FileLogHandle: HSPFILELOG,
LogSectionName: PCWSTR,
SourceFilename: PCWSTR,
TargetFilename: PCWSTR,
Checksum: DWORD,
DiskTagfile: PCWSTR,
DiskDescription: PCWSTR,
OtherInfo: PCWSTR,
Flags: DWORD,
) -> BOOL;
}
pub const SPFILELOG_OEMFILE: DWORD = 0x00000001;
extern "system" {
pub fn SetupRemoveFileLogEntryA(
FileLogHandle: HSPFILELOG,
LogSectionName: PCSTR,
TargetFilename: PCSTR,
) -> BOOL;
pub fn SetupRemoveFileLogEntryW(
FileLogHandle: HSPFILELOG,
LogSectionName: PCWSTR,
TargetFilename: PCWSTR,
) -> BOOL;
}
ENUM!{enum SetupFileLogInfo {
SetupFileLogSourceFilename,
SetupFileLogChecksum,
SetupFileLogDiskTagfile,
SetupFileLogDiskDescription,
SetupFileLogOtherInfo,
SetupFileLogMax,
}}
extern "system" {
pub fn SetupQueryFileLogA(
FileLogHandle: HSPFILELOG,
LogSectionName: PCSTR,
TargetFilename: PCSTR,
DesiredInfo: SetupFileLogInfo,
DataOut: PSTR,
ReturnBufferSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupQueryFileLogW(
FileLogHandle: HSPFILELOG,
LogSectionName: PCWSTR,
TargetFilename: PCWSTR,
DesiredInfo: SetupFileLogInfo,
DataOut: PWSTR,
ReturnBufferSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
}
pub type LogSeverity = DWORD;
pub const LogSevInformation: LogSeverity = 0x00000000;
pub const LogSevWarning: LogSeverity = 0x00000001;
pub const LogSevError: LogSeverity = 0x00000002;
pub const LogSevFatalError: LogSeverity = 0x00000003;
pub const LogSevMaximum: LogSeverity = 0x00000004;
extern "system" {
pub fn SetupOpenLog(
Erase: BOOL,
) -> BOOL;
pub fn SetupLogErrorA(
MessageString: LPCSTR,
Severity: LogSeverity,
) -> BOOL;
pub fn SetupLogErrorW(
MessageString: LPCWSTR,
Severity: LogSeverity,
) -> BOOL;
pub fn SetupCloseLog() -> ();
pub fn SetupGetThreadLogToken() -> SP_LOG_TOKEN;
pub fn SetupSetThreadLogToken(
LogToken: SP_LOG_TOKEN,
) -> ();
}
//pub fn SetupWriteTextLog() -> ();
//pub fn SetupWriteTextLogError() -> ();
extern "system" {
pub fn SetupWriteTextLogInfLine(
LogToken: SP_LOG_TOKEN,
Flags: DWORD,
InfHandle: HINF,
Context: PINFCONTEXT,
) -> ();
pub fn SetupGetBackupInformationA(
QueueHandle: HSPFILEQ,
BackupParams: PSP_BACKUP_QUEUE_PARAMS_A,
) -> BOOL;
pub fn SetupGetBackupInformationW(
QueueHandle: HSPFILEQ,
BackupParams: PSP_BACKUP_QUEUE_PARAMS_W,
) -> BOOL;
pub fn SetupPrepareQueueForRestoreA(
QueueHandle: HSPFILEQ,
BackupPath: PCSTR,
RestoreFlags: DWORD,
) -> BOOL;
pub fn SetupPrepareQueueForRestoreW(
QueueHandle: HSPFILEQ,
BackupPath: PCWSTR,
RestoreFlags: DWORD,
) -> BOOL;
pub fn SetupSetNonInteractiveMode(
NonInteractiveFlag: BOOL,
) -> BOOL;
pub fn SetupGetNonInteractiveMode() -> BOOL;
pub fn SetupDiCreateDeviceInfoList(
ClassGuid: *const GUID,
hwndParent: HWND,
) -> HDEVINFO;
pub fn SetupDiCreateDeviceInfoListExA(
ClassGuid: *const GUID,
hwndParent: HWND,
MachineName: PCSTR,
Reserved: PVOID,
) -> HDEVINFO;
pub fn SetupDiCreateDeviceInfoListExW(
ClassGuid: *const GUID,
hwndParent: HWND,
MachineName: PCWSTR,
Reserved: PVOID,
) -> HDEVINFO;
pub fn SetupDiGetDeviceInfoListClass(
DeviceInfoSet: HDEVINFO,
ClassGuid: LPGUID,
) -> BOOL;
pub fn SetupDiGetDeviceInfoListDetailA(
DeviceInfoSet: HDEVINFO,
DeviceInfoSetDetailData: PSP_DEVINFO_LIST_DETAIL_DATA_A,
) -> BOOL;
pub fn SetupDiGetDeviceInfoListDetailW(
DeviceInfoSet: HDEVINFO,
DeviceInfoSetDetailData: PSP_DEVINFO_LIST_DETAIL_DATA_W,
) -> BOOL;
}
pub const DICD_GENERATE_ID: DWORD = 0x00000001;
pub const DICD_INHERIT_CLASSDRVS: DWORD = 0x00000002;
extern "system" {
pub fn SetupDiCreateDeviceInfoA(
DeviceInfoSet: HDEVINFO,
DeviceName: PCSTR,
ClassGuid: *const GUID,
DeviceDescription: PCSTR,
hwndParent: HWND,
CreationFlags: DWORD,
DeviceInfoData: PSP_DEVINFO_DATA,
) -> BOOL;
pub fn SetupDiCreateDeviceInfoW(
DeviceInfoSet: HDEVINFO,
DeviceName: PCWSTR,
ClassGuid: *const GUID,
DeviceDescription: PCWSTR,
hwndParent: HWND,
CreationFlags: DWORD,
DeviceInfoData: PSP_DEVINFO_DATA,
) -> BOOL;
}
pub const DIOD_INHERIT_CLASSDRVS: DWORD = 0x00000002;
pub const DIOD_CANCEL_REMOVE: DWORD = 0x00000004;
extern "system" {
pub fn SetupDiOpenDeviceInfoA(
DeviceInfoSet: HDEVINFO,
DeviceInstanceId: PCSTR,
hwndParent: HWND,
OpenFlags: DWORD,
DeviceInfoData: PSP_DEVINFO_DATA,
) -> BOOL;
pub fn SetupDiOpenDeviceInfoW(
DeviceInfoSet: HDEVINFO,
DeviceInstanceId: PCWSTR,
hwndParent: HWND,
OpenFlags: DWORD,
DeviceInfoData: PSP_DEVINFO_DATA,
) -> BOOL;
pub fn SetupDiGetDeviceInstanceIdA(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
DeviceInstanceId: PSTR,
DeviceInstanceIdSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupDiGetDeviceInstanceIdW(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
DeviceInstanceId: PWSTR,
DeviceInstanceIdSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupDiDeleteDeviceInfo(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
) -> BOOL;
pub fn SetupDiEnumDeviceInfo(
DeviceInfoSet: HDEVINFO,
MemberIndex: DWORD,
DeviceInfoData: PSP_DEVINFO_DATA,
) -> BOOL;
pub fn SetupDiDestroyDeviceInfoList(
DeviceInfoSet: HDEVINFO,
) -> BOOL;
pub fn SetupDiEnumDeviceInterfaces(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
InterfaceClassGuid: *const GUID,
MemberIndex: DWORD,
DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA,
) -> BOOL;
pub fn SetupDiCreateDeviceInterfaceA(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
InterfaceClassGuid: *const GUID,
ReferenceString: PCSTR,
CreationFlags: DWORD,
DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA,
) -> BOOL;
pub fn SetupDiCreateDeviceInterfaceW(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
InterfaceClassGuid: *const GUID,
ReferenceString: PCWSTR,
CreationFlags: DWORD,
DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA,
) -> BOOL;
}
pub const DIODI_NO_ADD: DWORD = 0x00000001;
extern "system" {
pub fn SetupDiOpenDeviceInterfaceA(
DeviceInfoSet: HDEVINFO,
DevicePath: PCSTR,
OpenFlags: DWORD,
DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA,
) -> BOOL;
pub fn SetupDiOpenDeviceInterfaceW(
DeviceInfoSet: HDEVINFO,
DevicePath: PCWSTR,
OpenFlags: DWORD,
DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA,
) -> BOOL;
pub fn SetupDiGetDeviceInterfaceAlias(
DeviceInfoSet: HDEVINFO,
DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA,
AliasInterfaceClassGuid: *const GUID,
AliasDeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA,
) -> BOOL;
pub fn SetupDiDeleteDeviceInterfaceData(
DeviceInfoSet: HDEVINFO,
DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA,
) -> BOOL;
pub fn SetupDiRemoveDeviceInterface(
DeviceInfoSet: HDEVINFO,
DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA,
) -> BOOL;
pub fn SetupDiGetDeviceInterfaceDetailA(
DeviceInfoSet: HDEVINFO,
DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA,
DeviceInterfaceDetailData: PSP_DEVICE_INTERFACE_DETAIL_DATA_A,
DeviceInterfaceDetailDataSize: DWORD,
RequiredSize: PDWORD,
DeviceInfoData: PSP_DEVINFO_DATA,
) -> BOOL;
pub fn SetupDiGetDeviceInterfaceDetailW(
DeviceInfoSet: HDEVINFO,
DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA,
DeviceInterfaceDetailData: PSP_DEVICE_INTERFACE_DETAIL_DATA_W,
DeviceInterfaceDetailDataSize: DWORD,
RequiredSize: PDWORD,
DeviceInfoData: PSP_DEVINFO_DATA,
) -> BOOL;
pub fn SetupDiInstallDeviceInterfaces(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
) -> BOOL;
pub fn SetupDiSetDeviceInterfaceDefault(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
Flags: DWORD,
Reserved: PVOID,
) -> BOOL;
}
pub const SPRDI_FIND_DUPS: DWORD = 0x00000001;
extern "system" {
pub fn SetupDiRegisterDeviceInfo(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
Flags: DWORD,
CompareProc: PSP_DETSIG_CMPPROC,
CompareContext: PVOID,
DupDeviceInfoData: PSP_DEVINFO_DATA,
) -> BOOL;
}
pub const SPDIT_NODRIVER: DWORD = 0x00000000;
pub const SPDIT_CLASSDRIVER: DWORD = 0x00000001;
pub const SPDIT_COMPATDRIVER: DWORD = 0x00000002;
extern "system" {
pub fn SetupDiBuildDriverInfoList(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
DriverType: DWORD,
) -> BOOL;
pub fn SetupDiCancelDriverInfoSearch(
DeviceInfoSet: HDEVINFO,
) -> BOOL;
pub fn SetupDiEnumDriverInfoA(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
DriverType: DWORD,
MemberIndex: DWORD,
DriverInfoData: PSP_DRVINFO_DATA_A,
) -> BOOL;
pub fn SetupDiEnumDriverInfoW(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
DriverType: DWORD,
MemberIndex: DWORD,
DriverInfoData: PSP_DRVINFO_DATA_W,
) -> BOOL;
pub fn SetupDiGetSelectedDriverA(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
DriverInfoData: PSP_DRVINFO_DATA_A,
) -> BOOL;
pub fn SetupDiGetSelectedDriverW(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
DriverInfoData: PSP_DRVINFO_DATA_W,
) -> BOOL;
pub fn SetupDiSetSelectedDriverA(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
DriverInfoData: PSP_DRVINFO_DATA_A,
) -> BOOL;
pub fn SetupDiSetSelectedDriverW(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
DriverInfoData: PSP_DRVINFO_DATA_W,
) -> BOOL;
pub fn SetupDiGetDriverInfoDetailA(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
DriverInfoData: PSP_DRVINFO_DATA_A,
DriverInfoDetailData: PSP_DRVINFO_DETAIL_DATA_A,
DriverInfoDetailDataSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupDiGetDriverInfoDetailW(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
DriverInfoData: PSP_DRVINFO_DATA_W,
DriverInfoDetailData: PSP_DRVINFO_DETAIL_DATA_W,
DriverInfoDetailDataSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupDiDestroyDriverInfoList(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
DriverType: DWORD,
) -> BOOL;
}
pub const DIGCF_DEFAULT: DWORD = 0x00000001;
pub const DIGCF_PRESENT: DWORD = 0x00000002;
pub const DIGCF_ALLCLASSES: DWORD = 0x00000004;
pub const DIGCF_PROFILE: DWORD = 0x00000008;
pub const DIGCF_DEVICEINTERFACE: DWORD = 0x00000010;
extern "system" {
pub fn SetupDiGetClassDevsA(
ClassGuid: *const GUID,
Enumerator: PCSTR,
hwndParent: HWND,
Flags: DWORD,
) -> HDEVINFO;
pub fn SetupDiGetClassDevsW(
ClassGuid: *const GUID,
Enumerator: PCWSTR,
hwndParent: HWND,
Flags: DWORD,
) -> HDEVINFO;
pub fn SetupDiGetClassDevsExA(
ClassGuid: *const GUID,
Enumerator: PCSTR,
hwndParent: HWND,
Flags: DWORD,
DeviceInfoSet: HDEVINFO,
MachineName: PCSTR,
Reserved: PVOID,
) -> HDEVINFO;
pub fn SetupDiGetClassDevsExW(
ClassGuid: *const GUID,
Enumerator: PCWSTR,
hwndParent: HWND,
Flags: DWORD,
DeviceInfoSet: HDEVINFO,
MachineName: PCWSTR,
Reserved: PVOID,
) -> HDEVINFO;
pub fn SetupDiGetINFClassA(
InfName: PCSTR,
ClassGuid: LPGUID,
ClassName: PSTR,
ClassNameSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupDiGetINFClassW(
InfName: PCWSTR,
ClassGuid: LPGUID,
ClassName: PWSTR,
ClassNameSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
}
pub const DIBCI_NOINSTALLCLASS: DWORD = 0x00000001;
pub const DIBCI_NODISPLAYCLASS: DWORD = 0x00000002;
extern "system" {
pub fn SetupDiBuildClassInfoList(
Flags: DWORD,
ClassGuidList: LPGUID,
ClassGuidListSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupDiBuildClassInfoListExA(
Flags: DWORD,
ClassGuidList: LPGUID,
ClassGuidListSize: DWORD,
RequiredSize: PDWORD,
MachineName: PCSTR,
Reserved: PVOID,
) -> BOOL;
pub fn SetupDiBuildClassInfoListExW(
Flags: DWORD,
ClassGuidList: LPGUID,
ClassGuidListSize: DWORD,
RequiredSize: PDWORD,
MachineName: PCWSTR,
Reserved: PVOID,
) -> BOOL;
pub fn SetupDiGetClassDescriptionA(
ClassGuid: *const GUID,
ClassDescription: PSTR,
ClassDescriptionSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupDiGetClassDescriptionW(
ClassGuid: *const GUID,
ClassDescription: PWSTR,
ClassDescriptionSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupDiGetClassDescriptionExA(
ClassGuid: *const GUID,
ClassDescription: PSTR,
ClassDescriptionSize: DWORD,
RequiredSize: PDWORD,
MachineName: PCSTR,
Reserved: PVOID,
) -> BOOL;
pub fn SetupDiGetClassDescriptionExW(
ClassGuid: *const GUID,
ClassDescription: PWSTR,
ClassDescriptionSize: DWORD,
RequiredSize: PDWORD,
MachineName: PCWSTR,
Reserved: PVOID,
) -> BOOL;
pub fn SetupDiCallClassInstaller(
InstallFunction: DI_FUNCTION,
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
) -> BOOL;
pub fn SetupDiSelectDevice(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
) -> BOOL;
pub fn SetupDiSelectBestCompatDrv(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
) -> BOOL;
pub fn SetupDiInstallDevice(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
) -> BOOL;
pub fn SetupDiInstallDriverFiles(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
) -> BOOL;
pub fn SetupDiRegisterCoDeviceInstallers(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
) -> BOOL;
pub fn SetupDiRemoveDevice(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
) -> BOOL;
pub fn SetupDiUnremoveDevice(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
) -> BOOL;
pub fn SetupDiRestartDevices(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
) -> BOOL;
pub fn SetupDiChangeState(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
) -> BOOL;
pub fn SetupDiInstallClassA(
hwndParent: HWND,
InfFileName: PCSTR,
Flags: DWORD,
FileQueue: HSPFILEQ,
) -> BOOL;
pub fn SetupDiInstallClassW(
hwndParent: HWND,
InfFileName: PCWSTR,
Flags: DWORD,
FileQueue: HSPFILEQ,
) -> BOOL;
pub fn SetupDiInstallClassExA(
hwndParent: HWND,
InfFileName: PCSTR,
Flags: DWORD,
FileQueue: HSPFILEQ,
InterfaceClassGuid: *const GUID,
Reserved1: PVOID,
Reserved2: PVOID,
) -> BOOL;
pub fn SetupDiInstallClassExW(
hwndParent: HWND,
InfFileName: PCWSTR,
Flags: DWORD,
FileQueue: HSPFILEQ,
InterfaceClassGuid: *const GUID,
Reserved1: PVOID,
Reserved2: PVOID,
) -> BOOL;
pub fn SetupDiOpenClassRegKey(
ClassGuid: *const GUID,
samDesired: REGSAM,
) -> HKEY;
}
pub const DIOCR_INSTALLER: DWORD = 0x00000001;
pub const DIOCR_INTERFACE: DWORD = 0x00000002;
extern "system" {
pub fn SetupDiOpenClassRegKeyExA(
ClassGuid: *const GUID,
samDesired: REGSAM,
Flags: DWORD,
MachineName: PCSTR,
Reserved: PVOID,
) -> HKEY;
pub fn SetupDiOpenClassRegKeyExW(
ClassGuid: *const GUID,
samDesired: REGSAM,
Flags: DWORD,
MachineName: PCWSTR,
Reserved: PVOID,
) -> HKEY;
pub fn SetupDiCreateDeviceInterfaceRegKeyA(
DeviceInfoSet: HDEVINFO,
DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA,
Reserved: DWORD,
samDesired: REGSAM,
InfHandle: HINF,
InfSectionName: PCSTR,
) -> HKEY;
pub fn SetupDiCreateDeviceInterfaceRegKeyW(
DeviceInfoSet: HDEVINFO,
DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA,
Reserved: DWORD,
samDesired: REGSAM,
InfHandle: HINF,
InfSectionName: PCWSTR,
) -> HKEY;
pub fn SetupDiOpenDeviceInterfaceRegKey(
DeviceInfoSet: HDEVINFO,
DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA,
Reserved: DWORD,
samDesired: REGSAM,
) -> HKEY;
pub fn SetupDiDeleteDeviceInterfaceRegKey(
DeviceInfoSet: HDEVINFO,
DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA,
Reserved: DWORD,
) -> BOOL;
}
pub const DIREG_DEV: DWORD = 0x00000001;
pub const DIREG_DRV: DWORD = 0x00000002;
pub const DIREG_BOTH: DWORD = 0x00000004;
extern "system" {
pub fn SetupDiCreateDevRegKeyA(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
Scope: DWORD,
HwProfile: DWORD,
KeyType: DWORD,
InfHandle: HINF,
InfSectionName: PCSTR,
) -> HKEY;
pub fn SetupDiCreateDevRegKeyW(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
Scope: DWORD,
HwProfile: DWORD,
KeyType: DWORD,
InfHandle: HINF,
InfSectionName: PCWSTR,
) -> HKEY;
pub fn SetupDiOpenDevRegKey(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
Scope: DWORD,
HwProfile: DWORD,
KeyType: DWORD,
samDesired: REGSAM,
) -> HKEY;
pub fn SetupDiDeleteDevRegKey(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
Scope: DWORD,
HwProfile: DWORD,
KeyType: DWORD,
) -> BOOL;
pub fn SetupDiGetHwProfileList(
HwProfileList: PDWORD,
HwProfileListSize: DWORD,
RequiredSize: PDWORD,
CurrentlyActiveIndex: PDWORD,
) -> BOOL;
pub fn SetupDiGetHwProfileListExA(
HwProfileList: PDWORD,
HwProfileListSize: DWORD,
RequiredSize: PDWORD,
CurrentlyActiveIndex: PDWORD,
MachineName: PCSTR,
Reserved: PVOID,
) -> BOOL;
pub fn SetupDiGetHwProfileListExW(
HwProfileList: PDWORD,
HwProfileListSize: DWORD,
RequiredSize: PDWORD,
CurrentlyActiveIndex: PDWORD,
MachineName: PCWSTR,
Reserved: PVOID,
) -> BOOL;
pub fn SetupDiGetDevicePropertyKeys(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
PropertyKeyArray: *mut DEVPROPKEY,
PropertyKeyCount: DWORD,
RequiredPropertyKeyCount: PDWORD,
Flags: DWORD,
) -> BOOL;
pub fn SetupDiGetDevicePropertyW(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
PropertyKey: *const DEVPROPKEY,
PropertyType: *mut DEVPROPTYPE,
PropertyBuffer: PBYTE,
PropertyBufferSize: DWORD,
RequiredSize: PDWORD,
Flags: DWORD,
) -> BOOL;
pub fn SetupDiSetDevicePropertyW(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
PropertyKey: *const DEVPROPKEY,
PropertyType: DEVPROPTYPE,
PropertyBuffer: *const BYTE,
PropertyBufferSize: DWORD,
Flags: DWORD,
) -> BOOL;
pub fn SetupDiGetDeviceInterfacePropertyKeys(
DeviceInfoSet: HDEVINFO,
DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA,
PropertyKeyArray: *mut DEVPROPKEY,
PropertyKeyCount: DWORD,
RequiredPropertyKeyCount: PDWORD,
Flags: DWORD,
) -> BOOL;
pub fn SetupDiGetDeviceInterfacePropertyW(
DeviceInfoSet: HDEVINFO,
DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA,
PropertyKey: *const DEVPROPKEY,
PropertyType: *mut DEVPROPTYPE,
PropertyBuffer: PBYTE,
PropertyBufferSize: DWORD,
RequiredSize: PDWORD,
Flags: DWORD,
) -> BOOL;
pub fn SetupDiSetDeviceInterfacePropertyW(
DeviceInfoSet: HDEVINFO,
DeviceInterfaceData: PSP_DEVICE_INTERFACE_DATA,
PropertyKey: *const DEVPROPKEY,
PropertyType: DEVPROPTYPE,
PropertyBuffer: *const BYTE,
PropertyBufferSize: DWORD,
Flags: DWORD,
) -> BOOL;
}
pub const DICLASSPROP_INSTALLER: DWORD = 0x00000001;
pub const DICLASSPROP_INTERFACE: DWORD = 0x00000002;
extern "system" {
pub fn SetupDiGetClassPropertyKeys(
ClassGuid: *const GUID,
PropertyKeyArray: *mut DEVPROPKEY,
PropertyKeyCount: DWORD,
RequiredPropertyKeyCount: PDWORD,
Flags: DWORD,
) -> BOOL;
pub fn SetupDiGetClassPropertyKeysExW(
ClassGuid: *const GUID,
PropertyKeyArray: *mut DEVPROPKEY,
PropertyKeyCount: DWORD,
RequiredPropertyKeyCount: PDWORD,
Flags: DWORD,
MachineName: PCWSTR,
Reserved: PVOID,
) -> BOOL;
pub fn SetupDiGetClassPropertyW(
ClassGuid: *const GUID,
PropertyKey: *const DEVPROPKEY,
PropertyType: *mut DEVPROPTYPE,
PropertyBuffer: PBYTE,
PropertyBufferSize: DWORD,
RequiredSize: PDWORD,
Flags: DWORD,
) -> BOOL;
pub fn SetupDiGetClassPropertyExW(
ClassGuid: *const GUID,
PropertyKey: *const DEVPROPKEY,
PropertyType: *mut DEVPROPTYPE,
PropertyBuffer: PBYTE,
PropertyBufferSize: DWORD,
RequiredSize: PDWORD,
Flags: DWORD,
MachineName: PCWSTR,
Reserved: PVOID,
) -> BOOL;
pub fn SetupDiSetClassPropertyW(
ClassGuid: *const GUID,
PropertyKey: *const DEVPROPKEY,
PropertyType: DEVPROPTYPE,
PropertyBuffer: *const BYTE,
PropertyBufferSize: DWORD,
Flags: DWORD,
) -> BOOL;
pub fn SetupDiSetClassPropertyExW(
ClassGuid: *const GUID,
PropertyKey: *const DEVPROPKEY,
PropertyType: DEVPROPTYPE,
PropertyBuffer: *const BYTE,
PropertyBufferSize: DWORD,
Flags: DWORD,
MachineName: PCWSTR,
Reserved: PVOID,
) -> BOOL;
}
pub const SPDRP_DEVICEDESC: DWORD = 0x00000000;
pub const SPDRP_HARDWAREID: DWORD = 0x00000001;
pub const SPDRP_COMPATIBLEIDS: DWORD = 0x00000002;
pub const SPDRP_UNUSED0: DWORD = 0x00000003;
pub const SPDRP_SERVICE: DWORD = 0x00000004;
pub const SPDRP_UNUSED1: DWORD = 0x00000005;
pub const SPDRP_UNUSED2: DWORD = 0x00000006;
pub const SPDRP_CLASS: DWORD = 0x00000007;
pub const SPDRP_CLASSGUID: DWORD = 0x00000008;
pub const SPDRP_DRIVER: DWORD = 0x00000009;
pub const SPDRP_CONFIGFLAGS: DWORD = 0x0000000A;
pub const SPDRP_MFG: DWORD = 0x0000000B;
pub const SPDRP_FRIENDLYNAME: DWORD = 0x0000000C;
pub const SPDRP_LOCATION_INFORMATION: DWORD = 0x0000000D;
pub const SPDRP_PHYSICAL_DEVICE_OBJECT_NAME: DWORD = 0x0000000E;
pub const SPDRP_CAPABILITIES: DWORD = 0x0000000F;
pub const SPDRP_UI_NUMBER: DWORD = 0x00000010;
pub const SPDRP_UPPERFILTERS: DWORD = 0x00000011;
pub const SPDRP_LOWERFILTERS: DWORD = 0x00000012;
pub const SPDRP_BUSTYPEGUID: DWORD = 0x00000013;
pub const SPDRP_LEGACYBUSTYPE: DWORD = 0x00000014;
pub const SPDRP_BUSNUMBER: DWORD = 0x00000015;
pub const SPDRP_ENUMERATOR_NAME: DWORD = 0x00000016;
pub const SPDRP_SECURITY: DWORD = 0x00000017;
pub const SPDRP_SECURITY_SDS: DWORD = 0x00000018;
pub const SPDRP_DEVTYPE: DWORD = 0x00000019;
pub const SPDRP_EXCLUSIVE: DWORD = 0x0000001A;
pub const SPDRP_CHARACTERISTICS: DWORD = 0x0000001B;
pub const SPDRP_ADDRESS: DWORD = 0x0000001C;
pub const SPDRP_UI_NUMBER_DESC_FORMAT: DWORD = 0x0000001D;
pub const SPDRP_DEVICE_POWER_DATA: DWORD = 0x0000001E;
pub const SPDRP_REMOVAL_POLICY: DWORD = 0x0000001F;
pub const SPDRP_REMOVAL_POLICY_HW_DEFAULT: DWORD = 0x00000020;
pub const SPDRP_REMOVAL_POLICY_OVERRIDE: DWORD = 0x00000021;
pub const SPDRP_INSTALL_STATE: DWORD = 0x00000022;
pub const SPDRP_LOCATION_PATHS: DWORD = 0x00000023;
pub const SPDRP_BASE_CONTAINERID: DWORD = 0x00000024;
pub const SPDRP_MAXIMUM_PROPERTY: DWORD = 0x00000025;
pub const SPCRP_UPPERFILTERS: DWORD = 0x00000011;
pub const SPCRP_LOWERFILTERS: DWORD = 0x00000012;
pub const SPCRP_SECURITY: DWORD = 0x00000017;
pub const SPCRP_SECURITY_SDS: DWORD = 0x00000018;
pub const SPCRP_DEVTYPE: DWORD = 0x00000019;
pub const SPCRP_EXCLUSIVE: DWORD = 0x0000001A;
pub const SPCRP_CHARACTERISTICS: DWORD = 0x0000001B;
pub const SPCRP_MAXIMUM_PROPERTY: DWORD = 0x0000001C;
extern "system" {
pub fn SetupDiGetDeviceRegistryPropertyA(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
Property: DWORD,
PropertyRegDataType: PDWORD,
PropertyBuffer: PBYTE,
PropertyBufferSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupDiGetDeviceRegistryPropertyW(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
Property: DWORD,
PropertyRegDataType: PDWORD,
PropertyBuffer: PBYTE,
PropertyBufferSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupDiGetClassRegistryPropertyA(
ClassGuid: *const GUID,
Property: DWORD,
PropertyRegDataType: PDWORD,
PropertyBuffer: PBYTE,
PropertyBufferSize: DWORD,
RequiredSize: PDWORD,
MachineName: PCSTR,
Reserved: PVOID,
) -> BOOL;
pub fn SetupDiGetClassRegistryPropertyW(
ClassGuid: *const GUID,
Property: DWORD,
PropertyRegDataType: PDWORD,
PropertyBuffer: PBYTE,
PropertyBufferSize: DWORD,
RequiredSize: PDWORD,
MachineName: PCWSTR,
Reserved: PVOID,
) -> BOOL;
pub fn SetupDiSetDeviceRegistryPropertyA(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
Property: DWORD,
PropertyBuffer: *const BYTE,
PropertyBufferSize: DWORD,
) -> BOOL;
pub fn SetupDiSetDeviceRegistryPropertyW(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
Property: DWORD,
PropertyBuffer: *const BYTE,
PropertyBufferSize: DWORD,
) -> BOOL;
pub fn SetupDiSetClassRegistryPropertyA(
ClassGuid: *const GUID,
Property: DWORD,
PropertyBuffer: *const BYTE,
PropertyBufferSize: DWORD,
MachineName: PCSTR,
Reserved: PVOID,
) -> BOOL;
pub fn SetupDiSetClassRegistryPropertyW(
ClassGuid: *const GUID,
Property: DWORD,
PropertyBuffer: *const BYTE,
PropertyBufferSize: DWORD,
MachineName: PCWSTR,
Reserved: PVOID,
) -> BOOL;
pub fn SetupDiGetDeviceInstallParamsA(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
DeviceInstallParams: PSP_DEVINSTALL_PARAMS_A,
) -> BOOL;
pub fn SetupDiGetDeviceInstallParamsW(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
DeviceInstallParams: PSP_DEVINSTALL_PARAMS_W,
) -> BOOL;
pub fn SetupDiGetClassInstallParamsA(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
ClassInstallParams: PSP_CLASSINSTALL_HEADER,
ClassInstallParamsSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupDiGetClassInstallParamsW(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
ClassInstallParams: PSP_CLASSINSTALL_HEADER,
ClassInstallParamsSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupDiSetDeviceInstallParamsA(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
DeviceInstallParams: PSP_DEVINSTALL_PARAMS_A,
) -> BOOL;
pub fn SetupDiSetDeviceInstallParamsW(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
DeviceInstallParams: PSP_DEVINSTALL_PARAMS_W,
) -> BOOL;
pub fn SetupDiSetClassInstallParamsA(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
ClassInstallParams: PSP_CLASSINSTALL_HEADER,
ClassInstallParamsSize: DWORD,
) -> BOOL;
pub fn SetupDiSetClassInstallParamsW(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
ClassInstallParams: PSP_CLASSINSTALL_HEADER,
ClassInstallParamsSize: DWORD,
) -> BOOL;
pub fn SetupDiGetDriverInstallParamsA(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
DriverInfoData: PSP_DRVINFO_DATA_A,
DriverInstallParams: PSP_DRVINSTALL_PARAMS,
) -> BOOL;
pub fn SetupDiGetDriverInstallParamsW(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
DriverInfoData: PSP_DRVINFO_DATA_W,
DriverInstallParams: PSP_DRVINSTALL_PARAMS,
) -> BOOL;
pub fn SetupDiSetDriverInstallParamsA(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
DriverInfoData: PSP_DRVINFO_DATA_A,
DriverInstallParams: PSP_DRVINSTALL_PARAMS,
) -> BOOL;
pub fn SetupDiSetDriverInstallParamsW(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
DriverInfoData: PSP_DRVINFO_DATA_W,
DriverInstallParams: PSP_DRVINSTALL_PARAMS,
) -> BOOL;
pub fn SetupDiLoadClassIcon(
ClassGuid: *const GUID,
LargeIcon: *mut HICON,
MiniIconIndex: PINT,
) -> BOOL;
pub fn SetupDiLoadDeviceIcon(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
cxIcon: UINT,
cyIcon: UINT,
Flags: DWORD,
hIcon: *mut HICON,
) -> BOOL;
}
pub const DMI_MASK: DWORD = 0x00000001;
pub const DMI_BKCOLOR: DWORD = 0x00000002;
pub const DMI_USERECT: DWORD = 0x00000004;
extern "system" {
pub fn SetupDiDrawMiniIcon(
hdc: HDC,
rc: RECT,
MiniIconIndex: INT,
Flags: DWORD,
) -> INT;
pub fn SetupDiGetClassBitmapIndex(
ClassGuid: *const GUID,
MiniIconIndex: PINT,
) -> BOOL;
pub fn SetupDiGetClassImageList(
ClassImageListData: PSP_CLASSIMAGELIST_DATA,
) -> BOOL;
pub fn SetupDiGetClassImageListExA(
ClassImageListData: PSP_CLASSIMAGELIST_DATA,
MachineName: PCSTR,
Reserved: PVOID,
) -> BOOL;
pub fn SetupDiGetClassImageListExW(
ClassImageListData: PSP_CLASSIMAGELIST_DATA,
MachineName: PCWSTR,
Reserved: PVOID,
) -> BOOL;
pub fn SetupDiGetClassImageIndex(
ClassImageListData: PSP_CLASSIMAGELIST_DATA,
ClassGuid: *const GUID,
ImageIndex: PINT,
) -> BOOL;
pub fn SetupDiDestroyClassImageList(
ClassImageListData: PSP_CLASSIMAGELIST_DATA,
) -> BOOL;
}
pub const DIGCDP_FLAG_BASIC: DWORD = 0x00000001;
pub const DIGCDP_FLAG_ADVANCED: DWORD = 0x00000002;
pub const DIGCDP_FLAG_REMOTE_BASIC: DWORD = 0x00000003;
pub const DIGCDP_FLAG_REMOTE_ADVANCED: DWORD = 0x00000004;
extern "system" {
pub fn SetupDiGetClassDevPropertySheetsA(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
PropertySheetHeader: LPPROPSHEETHEADERA,
PropertySheetHeaderPageListSize: DWORD,
RequiredSize: PDWORD,
PropertySheetType: DWORD,
) -> BOOL;
pub fn SetupDiGetClassDevPropertySheetsW(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
PropertySheetHeader: LPPROPSHEETHEADERW,
PropertySheetHeaderPageListSize: DWORD,
RequiredSize: PDWORD,
PropertySheetType: DWORD,
) -> BOOL;
}
pub const IDI_RESOURCEFIRST: c_int = 159;
pub const IDI_RESOURCE: c_int = 159;
pub const IDI_RESOURCELAST: c_int = 161;
pub const IDI_RESOURCEOVERLAYFIRST: c_int = 161;
pub const IDI_RESOURCEOVERLAYLAST: c_int = 161;
pub const IDI_CONFLICT: c_int = 161;
pub const IDI_CLASSICON_OVERLAYFIRST: c_int = 500;
pub const IDI_CLASSICON_OVERLAYLAST: c_int = 502;
pub const IDI_PROBLEM_OVL: c_int = 500;
pub const IDI_DISABLED_OVL: c_int = 501;
pub const IDI_FORCED_OVL: c_int = 502;
extern "system" {
pub fn SetupDiAskForOEMDisk(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
) -> BOOL;
pub fn SetupDiSelectOEMDrv(
hwndParent: HWND,
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
) -> BOOL;
pub fn SetupDiClassNameFromGuidA(
ClassGuid: *const GUID,
ClassName: PSTR,
ClassNameSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupDiClassNameFromGuidW(
ClassGuid: *const GUID,
ClassName: PWSTR,
ClassNameSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupDiClassNameFromGuidExA(
ClassGuid: *const GUID,
ClassName: PSTR,
ClassNameSize: DWORD,
RequiredSize: PDWORD,
MachineName: PCSTR,
Reserved: PVOID,
) -> BOOL;
pub fn SetupDiClassNameFromGuidExW(
ClassGuid: *const GUID,
ClassName: PWSTR,
ClassNameSize: DWORD,
RequiredSize: PDWORD,
MachineName: PCWSTR,
Reserved: PVOID,
) -> BOOL;
pub fn SetupDiClassGuidsFromNameA(
ClassName: PCSTR,
ClassGuidList: LPGUID,
ClassGuidListSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupDiClassGuidsFromNameW(
ClassName: PCWSTR,
ClassGuidList: LPGUID,
ClassGuidListSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupDiClassGuidsFromNameExA(
ClassName: PCSTR,
ClassGuidList: LPGUID,
ClassGuidListSize: DWORD,
RequiredSize: PDWORD,
MachineName: PCSTR,
Reserved: PVOID,
) -> BOOL;
pub fn SetupDiClassGuidsFromNameExW(
ClassName: PCWSTR,
ClassGuidList: LPGUID,
ClassGuidListSize: DWORD,
RequiredSize: PDWORD,
MachineName: PCWSTR,
Reserved: PVOID,
) -> BOOL;
pub fn SetupDiGetHwProfileFriendlyNameA(
HwProfile: DWORD,
FriendlyName: PSTR,
FriendlyNameSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupDiGetHwProfileFriendlyNameW(
HwProfile: DWORD,
FriendlyName: PWSTR,
FriendlyNameSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupDiGetHwProfileFriendlyNameExA(
HwProfile: DWORD,
FriendlyName: PSTR,
FriendlyNameSize: DWORD,
RequiredSize: PDWORD,
MachineName: PCSTR,
Reserved: PVOID,
) -> BOOL;
pub fn SetupDiGetHwProfileFriendlyNameExW(
HwProfile: DWORD,
FriendlyName: PWSTR,
FriendlyNameSize: DWORD,
RequiredSize: PDWORD,
MachineName: PCWSTR,
Reserved: PVOID,
) -> BOOL;
}
pub const SPWPT_SELECTDEVICE: DWORD = 0x00000001;
pub const SPWP_USE_DEVINFO_DATA: DWORD = 0x00000001;
extern "system" {
pub fn SetupDiGetWizardPage(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
InstallWizardData: PSP_INSTALLWIZARD_DATA,
PageType: DWORD,
Flags: DWORD,
) -> HPROPSHEETPAGE;
pub fn SetupDiGetSelectedDevice(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
) -> BOOL;
pub fn SetupDiSetSelectedDevice(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
) -> BOOL;
pub fn SetupDiGetActualModelsSectionA(
Context: PINFCONTEXT,
AlternatePlatformInfo: PSP_ALTPLATFORM_INFO,
InfSectionWithExt: PSTR,
InfSectionWithExtSize: DWORD,
RequiredSize: PDWORD,
Reserved: PVOID,
) -> BOOL;
pub fn SetupDiGetActualModelsSectionW(
Context: PINFCONTEXT,
AlternatePlatformInfo: PSP_ALTPLATFORM_INFO,
InfSectionWithExt: PWSTR,
InfSectionWithExtSize: DWORD,
RequiredSize: PDWORD,
Reserved: PVOID,
) -> BOOL;
pub fn SetupDiGetActualSectionToInstallA(
InfHandle: HINF,
InfSectionName: PCSTR,
InfSectionWithExt: PSTR,
InfSectionWithExtSize: DWORD,
RequiredSize: PDWORD,
Extension: *mut PSTR,
) -> BOOL;
pub fn SetupDiGetActualSectionToInstallW(
InfHandle: HINF,
InfSectionName: PCWSTR,
InfSectionWithExt: PWSTR,
InfSectionWithExtSize: DWORD,
RequiredSize: PDWORD,
Extension: *mut PWSTR,
) -> BOOL;
pub fn SetupDiGetActualSectionToInstallExA(
InfHandle: HINF,
InfSectionName: PCSTR,
AlternatePlatformInfo: PSP_ALTPLATFORM_INFO,
InfSectionWithExt: PSTR,
InfSectionWithExtSize: DWORD,
RequiredSize: PDWORD,
Extension: *mut PSTR,
Reserved: PVOID,
) -> BOOL;
pub fn SetupDiGetActualSectionToInstallExW(
InfHandle: HINF,
InfSectionName: PCWSTR,
AlternatePlatformInfo: PSP_ALTPLATFORM_INFO,
InfSectionWithExt: PWSTR,
InfSectionWithExtSize: DWORD,
RequiredSize: PDWORD,
Extension: *mut PWSTR,
Reserved: PVOID,
) -> BOOL;
pub fn SetupEnumInfSectionsA(
InfHandle: HINF,
Index: UINT,
Buffer: PSTR,
Size: UINT,
SizeNeeded: *mut UINT,
) -> BOOL;
pub fn SetupEnumInfSectionsW(
InfHandle: HINF,
Index: UINT,
Buffer: PWSTR,
Size: UINT,
SizeNeeded: *mut UINT,
) -> BOOL;
}
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_INF_SIGNER_INFO_V1_A {
cbSize: DWORD,
CatalogFile: [CHAR; MAX_PATH],
DigitalSigner: [CHAR; MAX_PATH],
DigitalSignerVersion: [CHAR; MAX_PATH],
}}
pub type PSP_INF_SIGNER_INFO_V1_A = *mut SP_INF_SIGNER_INFO_V1_A;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_INF_SIGNER_INFO_V1_W {
cbSize: DWORD,
CatalogFile: [WCHAR; MAX_PATH],
DigitalSigner: [WCHAR; MAX_PATH],
DigitalSignerVersion: [WCHAR; MAX_PATH],
}}
pub type PSP_INF_SIGNER_INFO_V1_W = *mut SP_INF_SIGNER_INFO_V1_W;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_INF_SIGNER_INFO_V2_A {
cbSize: DWORD,
CatalogFile: [CHAR; MAX_PATH],
DigitalSigner: [CHAR; MAX_PATH],
DigitalSignerVersion: [CHAR; MAX_PATH],
SignerScore: DWORD,
}}
pub type PSP_INF_SIGNER_INFO_V2_A = *mut SP_INF_SIGNER_INFO_V2_A;
STRUCT!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SP_INF_SIGNER_INFO_V2_W {
cbSize: DWORD,
CatalogFile: [WCHAR; MAX_PATH],
DigitalSigner: [WCHAR; MAX_PATH],
DigitalSignerVersion: [WCHAR; MAX_PATH],
SignerScore: DWORD,
}}
pub type PSP_INF_SIGNER_INFO_V2_W = *mut SP_INF_SIGNER_INFO_V2_W;
pub const SIGNERSCORE_UNKNOWN: DWORD = 0xFF000000;
pub const SIGNERSCORE_W9X_SUSPECT: DWORD = 0xC0000000;
pub const SIGNERSCORE_UNSIGNED: DWORD = 0x80000000;
pub const SIGNERSCORE_AUTHENTICODE: DWORD = 0x0F000000;
pub const SIGNERSCORE_WHQL: DWORD = 0x0D000005;
pub const SIGNERSCORE_UNCLASSIFIED: DWORD = 0x0D000004;
pub const SIGNERSCORE_INBOX: DWORD = 0x0D000003;
pub const SIGNERSCORE_LOGO_STANDARD: DWORD = 0x0D000002;
pub const SIGNERSCORE_LOGO_PREMIUM: DWORD = 0x0D000001;
pub const SIGNERSCORE_MASK: DWORD = 0xFF000000;
pub const SIGNERSCORE_SIGNED_MASK: DWORD = 0xF0000000;
pub type SP_INF_SIGNER_INFO_A = SP_INF_SIGNER_INFO_V2_A;
pub type PSP_INF_SIGNER_INFO_A = PSP_INF_SIGNER_INFO_V2_A;
pub type SP_INF_SIGNER_INFO_W = SP_INF_SIGNER_INFO_V2_W;
pub type PSP_INF_SIGNER_INFO_W = PSP_INF_SIGNER_INFO_V2_W;
extern "system" {
pub fn SetupVerifyInfFileA(
InfName: PCSTR,
AltPlatformInfo: PSP_ALTPLATFORM_INFO,
InfSignerInfo: PSP_INF_SIGNER_INFO_A,
) -> BOOL;
pub fn SetupVerifyInfFileW(
InfName: PCWSTR,
AltPlatformInfo: PSP_ALTPLATFORM_INFO,
InfSignerInfo: PSP_INF_SIGNER_INFO_W,
) -> BOOL;
}
pub const DICUSTOMDEVPROP_MERGE_MULTISZ: DWORD = 0x00000001;
extern "system" {
pub fn SetupDiGetCustomDevicePropertyA(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
CustomPropertyName: PCSTR,
Flags: DWORD,
PropertyRegDataType: PDWORD,
PropertyBuffer: PBYTE,
PropertyBufferSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
pub fn SetupDiGetCustomDevicePropertyW(
DeviceInfoSet: HDEVINFO,
DeviceInfoData: PSP_DEVINFO_DATA,
CustomPropertyName: PCWSTR,
Flags: DWORD,
PropertyRegDataType: PDWORD,
PropertyBuffer: PBYTE,
PropertyBufferSize: DWORD,
RequiredSize: PDWORD,
) -> BOOL;
}
pub const SCWMI_CLOBBER_SECURITY: DWORD = 0x00000001;
extern "system" {
pub fn SetupConfigureWmiFromInfSectionA(
InfHandle: HINF,
SectionName: PCSTR,
Flags: DWORD,
) -> BOOL;
pub fn SetupConfigureWmiFromInfSectionW(
InfHandle: HINF,
SectionName: PCWSTR,
Flags: DWORD,
) -> BOOL;
}
|