summaryrefslogtreecommitdiff
path: root/plugins/Libs/KOL_unicode.inc
blob: 754878cb38d0d5cbe89fd4bf6f41ba44f962a301 (plain)
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
{*******************************************************************************
  KOL_unicode.inc
 Some redeclarations from Windows.pas for case, when UNICODE_CTRLS symbol is on.
*******************************************************************************}
{$IFDEF interface_part} ////////////////////////////////////////////////////////
  MakeIntAtom = MakeIntAtomW;
  {$IFDEF _D4orHigher}
  PRecoveryAgentInformation = PRecoveryAgentInformationW;
  TRecoveryAgentInformation = TRecoveryAgentInformationW;
  RECOVERY_AGENT_INFORMATION = RECOVERY_AGENT_INFORMATIONW;
  {$ENDIF}
  PWin32FindData = PWin32FindDataW;
  TWin32FindData = TWin32FindDataW;
  PHWProfileInfo = PHWProfileInfoW;
  THWProfileInfo = THWProfileInfoW;
  POSVersionInfo = POSVersionInfoW;
  TOSVersionInfo = TOSVersionInfoW;
  PLogColorSpace = PLogColorSpaceW;
  TLogColorSpace = TLogColorSpaceW;
  {$IFDEF _D4orHigher}
  PTextMetric = PTextMetricW;
  tagTEXTMETRIC = tagTEXTMETRICW;
  TTextMetric = TTextMetricW;
  TEXTMETRIC = TEXTMETRICW;
  PNewTextMetric = PNewTextMetricW;
  TNewTextMetric = TNewTextMetricW;
  NEWTEXTMETRIC = NEWTEXTMETRICW;
  PNewTextMetricEx = PNewTextMetricExW;
  {$ENDIF}
  PLogFont = PLogFontW;
  TLogFont = TLogFontW;
  {$IFDEF _D4orHigher}
  PEnumLogFont = PEnumLogFontW;
  TEnumLogFont = TEnumLogFontW;
  ENUMLOGFONT = ENUMLOGFONTW;
  PEnumLogFontEx = PEnumLogFontExW;
  TEnumLogFontEx = TEnumLogFontExW;
  ENUMLOGFONTEX = ENUMLOGFONTEXW;
  PExtLogFont = PExtLogFontW;
  tagEXTLOGFONT = tagEXTLOGFONTW;
  TExtLogFont = TExtLogFontW;
  EXTLOGFONT = EXTLOGFONTW;
  {$ENDIF}
  PDeviceMode = PDeviceModeW;
  TDeviceMode = TDeviceModeW;
  {$IFDEF _D4orHigher}
  DEVMODE = DEVMODEW;
  PDisplayDevice = PDisplayDeviceW;
  TDisplayDevice = TDisplayDeviceW;
  {$ENDIF}
  POutlineTextmetric = POutlineTextmetricW;
  TOutlineTextmetric = TOutlineTextmetricW;
  {$IFDEF _D4orHigher}
  OUTLINETEXTMETRIC = OUTLINETEXTMETRICW;
  {$ENDIF}
  PPolyText = PPolyTextW;
  {$IFDEF _D4orHigher}
  tagPOLYTEXT = tagPOLYTEXTW;
  POLYTEXT = POLYTEXTW;
  {$ENDIF}
  TPolyText = TPolyTextW;
  PGCPResults = PGCPResultsW;
  TGCPResults = TGCPResultsW;
  {$IFDEF _D4orHigher}
  GCP_RESULTS = GCP_RESULTSW;
  {$ENDIF}
  TFNOldFontEnumProc = TFNOldFontEnumProcW;
  TFNFontEnumProc = TFNFontEnumProcW;
  {$IFDEF _D4orHigher}
  PAxisInfo = PAxisInfoW;
  PAxesList = PAxesListW;
  PEnumLogFontExDV = PEnumLogFontExDVW;
  PEnumTextMetric = PEnumTextMetricW;
  {$ENDIF}
  PDocInfo = PDocInfoW;
  TDocInfo = TDocInfoW;
  {$IFDEF _D4orHigher}
  DOCINFO = DOCINFOW;
  {$ENDIF}
  MakeIntResource = MakeIntResourceW;
  PCreateStruct = PCreateStructW;
  TCreateStruct = TCreateStructW;
  {$IFDEF _D4orHigher}
  CREATESTRUCT = CREATESTRUCTW;
  {$ENDIF}
  PWndClassEx = PWndClassExW;
  TWndClassEx = TWndClassExW;
  {$IFDEF _D4orHigher}
  WNDCLASSEX = WNDCLASSEXW;
  {$ENDIF}
  PWndClass = PWndClassW;
  TWndClass = TWndClassW;
  {$IFDEF _D4orHigher}
  WNDCLASS = WNDCLASSW;
  {$ENDIF}
  //PMenuItemInfo = PMenuItemInfoW;
  //TMenuItemInfo = TMenuItemInfoW;
  //MENUITEMINFO = MENUITEMINFOW;
  PMsgBoxParams = PMsgBoxParamsW;
  TMsgBoxParams = TMsgBoxParamsW;
  {$IFDEF _D4orHigher}
  MSGBOXPARAMS = MSGBOXPARAMSW;
  {$ENDIF}
  PMDICreateStruct = PMDICreateStructW;
  TMDICreateStruct = TMDICreateStructW;
  PMultiKeyHelp = PMultiKeyHelpW;
  TMultiKeyHelp = TMultiKeyHelpW;
  {$IFDEF _D4orHigher}
  MULTIKEYHELP = MULTIKEYHELPW;
  {$ENDIF}
  PHelpWinInfo = PHelpWinInfoW;
  THelpWinInfo = THelpWinInfoW;
  {$IFDEF _D4orHigher}
  HELPWININFO = HELPWININFOW;
  {$ENDIF}
  PNonClientMetrics = PNonClientMetricsW;
  TNonClientMetrics = TNonClientMetricsW;
  {$IFDEF _D4orHigher}
  NONCLIENTMETRICS = NONCLIENTMETRICSW;
  {$ENDIF}
  PIconMetrics = PIconMetricsW;
  TIconMetrics = TIconMetricsW;
  {$IFDEF _D4orHigher}
  ICONMETRICS = ICONMETRICSW;
  {$ENDIF}
  PSerialKeys = PSerialKeysW;
  TSerialKeys = TSerialKeysW;
  {$IFDEF _D4orHigher}
  SERIALKEYS = SERIALKEYSW;
  {$ENDIF}
  PHighContrast = PHighContrastW;
  THighContrast = THighContrastW;
  {$IFDEF _D4orHigher}
  HIGHCONTRAST = HIGHCONTRASTW;
  {$ENDIF}
  PSoundsEntry = PSoundsEntryW;
  TSoundsEntry = TSoundsEntryW;
  {$IFDEF _D4orHigher}
  SOUNDSENTRY = SOUNDSENTRYW;
  {$ENDIF}
  PNumberFmt = PNumberFmtW;
  TNumberFmt = TNumberFmtW;
  {$IFDEF _D4orHigher}
  NUMBERFMT = NUMBERFMTW;
  {$ENDIF}
  PCurrencyFmt = PCurrencyFmtW;
  {$IFDEF _D4orHigher}
  _currencyfmt = _currencyfmtW;
  {$ENDIF}
  TCurrencyFmt = TCurrencyFmtW;
  {$IFDEF _D4orHigher}
  CURRENCYFMT = CURRENCYFMTW;
  {$ENDIF}
  PPValue = PPValueW;
  {$IFDEF _D4orHigher}
  pvalue = pvalueW;
  {$ENDIF}
  TPValue = TPValueW;
  PValueEnt = PValueEntW;
  TValueEnt = TValueEntW;
  {$IFDEF _D4orHigher}
  VALENT = VALENTW;
  {$ENDIF}
  PNetResource = PNetResourceW;
  TNetResource = TNetResourceW;
  {$IFDEF _D4orHigher}
  NETRESOURCE = NETRESOURCEW;
  {$ENDIF}
  PDiscDlgStruct = PDiscDlgStructW;
  {$IFDEF _D4orHigher}
  _DISCDLGSTRUCT = _DISCDLGSTRUCTW;
  {$ENDIF}
  TDiscDlgStruct = TDiscDlgStructW;
  {$IFDEF _D4orHigher}
  DISCDLGSTRUCT = DISCDLGSTRUCTW;
  {$ENDIF}
  PUniversalNameInfo = PUniversalNameInfoW;
  TUniversalNameInfo = TUniversalNameInfoW;
  {$IFDEF _D4orHigher}
  UNIVERSAL_NAME_INFO = UNIVERSAL_NAME_INFOW;
  {$ENDIF}
  PRemoteNameInfo = PRemoteNameInfoW;
  TRemoteNameInfo = TRemoteNameInfoW;
  {$IFDEF _D4orHigher}
  REMOTE_NAME_INFO = REMOTE_NAME_INFOW;
  {$ENDIF}

function AbortSystemShutdown(lpMachineName: PKOLChar): BOOL; stdcall;
function AccessCheckAndAuditAlarm(SubsystemName: PKOLChar;
  HandleId: Pointer; ObjectTypeName, ObjectName: PKOLChar;
  SecurityDescriptor: PSecurityDescriptor; DesiredAccess: DWORD;
  const GenericMapping: TGenericMapping;  ObjectCreation: BOOL;
  var GrantedAccess: DWORD; var AccessStatus, pfGenerateOnClose: BOOL): BOOL; stdcall;
{$IFDEF _D4orHigher}
function AccessCheckByTypeAndAuditAlarm(SubsystemName: PKOLChar;
  HandleId: Pointer; ObjectTypeName, ObjectName: PKOLChar;
  SecurityDescriptor: PSecurityDescriptor; PrincipalSelfSid: PSID; DesiredAccess: DWORD;
  AuditType: AUDIT_EVENT_TYPE; Flags: DWORD; ObjectTypeList: PObjectTypeList;
  ObjectTypeListLength: DWORD; const GenericMapping: TGenericMapping;  ObjectCreation: BOOL;
  var GrantedAccess: DWORD; var AccessStatus, pfGenerateOnClose: BOOL): BOOL; stdcall;
function AccessCheckByTypeResultListAndAuditAlarm(SubsystemName: PKOLChar;
  HandleId: Pointer; ObjectTypeName, ObjectName: PKOLChar;
  SecurityDescriptor: PSecurityDescriptor; PrincipalSelfSid: PSID; DesiredAccess: DWORD;
  AuditType: AUDIT_EVENT_TYPE; Flags: DWORD; ObjectTypeList: PObjectTypeList;
  ObjectTypeListLength: DWORD; const GenericMapping: TGenericMapping;  ObjectCreation: BOOL;
  var GrantedAccess: DWORD; var AccessStatusList: DWORD; var pfGenerateOnClose: BOOL): BOOL; stdcall;
{$ENDIF}
function BackupEventLog(hEventLog: THandle; lpBackupFileName: PKOLChar): BOOL; stdcall;
function ClearEventLog(hEventLog: THandle; lpBackupFileName: PKOLChar): BOOL; stdcall;
function CreateProcessAsUser(hToken: THandle; lpApplicationName: PKOLChar;
  lpCommandLine: PKOLChar; lpProcessAttributes: PSecurityAttributes;
  lpThreadAttributes: PSecurityAttributes; bInheritHandles: BOOL;
  dwCreationFlags: DWORD; lpEnvironment: Pointer; lpCurrentDirectory: PKOLChar;
  const lpStartupInfo: TStartupInfo; var lpProcessInformation: TProcessInformation): BOOL; stdcall;
function GetCurrentHwProfile(var lpHwProfileInfo: THWProfileInfo): BOOL; stdcall;
function GetFileSecurity(lpFileName: PKOLChar; RequestedInformation: SECURITY_INFORMATION;
  pSecurityDescriptor: PSecurityDescriptor; nLength: DWORD; var lpnLengthNeeded: DWORD): BOOL; stdcall;
function GetUserName(lpBuffer: PKOLChar; var nSize: DWORD): BOOL; stdcall;
function InitiateSystemShutdown(lpMachineName, lpMessage: PKOLChar;
  dwTimeout: DWORD; bForceAppsClosed, bRebootAfterShutdown: BOOL): BOOL; stdcall;
function LogonUser(lpszUsername, lpszDomain, lpszPassword: PKOLChar;
  dwLogonType, dwLogonProvider: DWORD; var phToken: THandle): BOOL; stdcall;
function LookupAccountName(lpSystemName, lpAccountName: PKOLChar;
  Sid: PSID; var cbSid: DWORD; ReferencedDomainName: PKOLChar;
  var cbReferencedDomainName: DWORD; var peUse: SID_NAME_USE): BOOL; stdcall;
function LookupAccountSid(lpSystemName: PKOLChar; Sid: PSID;
  Name: PKOLChar; var cbName: DWORD; ReferencedDomainName: PKOLChar;
  var cbReferencedDomainName: DWORD; var peUse: SID_NAME_USE): BOOL; stdcall;
function LookupPrivilegeDisplayName(lpSystemName, lpName: PKOLChar;
  lpDisplayName: PKOLChar; var cbDisplayName, lpLanguageId: DWORD): BOOL; stdcall;
function LookupPrivilegeName(lpSystemName: PKOLChar;
  var lpLuid: TLargeInteger; lpName: PKOLChar; var cbName: DWORD): BOOL; stdcall;
function LookupPrivilegeValue(lpSystemName, lpName: PKOLChar;
  var lpLuid: TLargeInteger): BOOL; stdcall;
function ObjectCloseAuditAlarm(SubsystemName: PKOLChar;
  HandleId: Pointer; GenerateOnClose: BOOL): BOOL; stdcall;
function ObjectDeleteAuditAlarm(SubsystemName: PKOLChar;
  HandleId: Pointer; GenerateOnClose: BOOL): BOOL; stdcall;
function ObjectOpenAuditAlarm(SubsystemName: PKOLChar; HandleId: Pointer;
  ObjectTypeName: PKOLChar; ObjectName: PKOLChar; pSecurityDescriptor: PSecurityDescriptor;
  ClientToken: THandle; DesiredAccess, GrantedAccess: DWORD;
  var Privileges: TPrivilegeSet; ObjectCreation, AccessGranted: BOOL;
  var GenerateOnClose: BOOL): BOOL; stdcall;
function ObjectPrivilegeAuditAlarm(SubsystemName: PKOLChar;
  HandleId: Pointer; ClientToken: THandle; DesiredAccess: DWORD;
  var Privileges: TPrivilegeSet; AccessGranted: BOOL): BOOL; stdcall;
function OpenBackupEventLog(lpUNCServerName, lpFileName: PKOLChar): THandle; stdcall;
function OpenEventLog(lpUNCServerName, lpSourceName: PKOLChar): THandle; stdcall;
function PrivilegedServiceAuditAlarm(SubsystemName, ServiceName: PKOLChar;
  ClientToken: THandle; var Privileges: TPrivilegeSet; AccessGranted: BOOL): BOOL; stdcall;
function ReadEventLog(hEventLog: THandle; dwReadFlags, dwRecordOffset: DWORD;
  lpBuffer: Pointer; nNumberOfBytesToRead: DWORD;
  var pnBytesRead, pnMinNumberOfBytesNeeded: DWORD): BOOL; stdcall;
function RegConnectRegistry(lpMachineName: PKOLChar; hKey: HKEY;
  var phkResult: HKEY): Longint; stdcall;
function RegCreateKey(hKey: HKEY; lpSubKey: PKOLChar;
  var phkResult: HKEY): Longint; stdcall;
function RegCreateKeyEx(hKey: HKEY; lpSubKey: PKOLChar;
  Reserved: DWORD; lpClass: PKOLChar; dwOptions: DWORD; samDesired: REGSAM;
  lpSecurityAttributes: PSecurityAttributes; var phkResult: HKEY;
  lpdwDisposition: PDWORD): Longint; stdcall;
function RegDeleteKey(hKey: HKEY; lpSubKey: PKOLChar): Longint; stdcall;
function RegDeleteValue(hKey: HKEY; lpValueName: PKOLChar): Longint; stdcall;
function RegEnumKeyEx(hKey: HKEY; dwIndex: DWORD; lpName: PKOLChar;
  var lpcbName: DWORD; lpReserved: Pointer; lpClass: PKOLChar;
  lpcbClass: PDWORD; lpftLastWriteTime: PFileTime): Longint; stdcall;
function RegEnumKey(hKey: HKEY; dwIndex: DWORD; lpName: PKOLChar; cbName: DWORD): Longint; stdcall;
function RegEnumValue(hKey: HKEY; dwIndex: DWORD; lpValueName: PKOLChar;
  var lpcbValueName: DWORD; lpReserved: Pointer; lpType: PDWORD;
  lpData: PByte; lpcbData: PDWORD): Longint; stdcall;
function RegLoadKey(hKey: HKEY; lpSubKey, lpFile: PKOLChar): Longint; stdcall;
function RegOpenKey(hKey: HKEY; lpSubKey: PKOLChar; var phkResult: HKEY): Longint; stdcall;
function RegOpenKeyEx(hKey: HKEY; lpSubKey: PKOLChar;
  ulOptions: DWORD; samDesired: REGSAM; var phkResult: HKEY): Longint; stdcall;
function RegQueryInfoKey(hKey: HKEY; lpClass: PKOLChar;
  lpcbClass: PDWORD; lpReserved: Pointer;
  lpcSubKeys, lpcbMaxSubKeyLen, lpcbMaxClassLen, lpcValues,
  lpcbMaxValueNameLen, lpcbMaxValueLen, lpcbSecurityDescriptor: PDWORD;
  lpftLastWriteTime: PFileTime): Longint; stdcall;
function RegQueryMultipleValues(hKey: HKEY; var ValList;
  NumVals: DWORD; lpValueBuf: PKOLChar; var ldwTotsize: DWORD): Longint; stdcall;
function RegQueryValue(hKey: HKEY; lpSubKey: PKOLChar;
  lpValue: PKOLChar; var lpcbValue: Longint): Longint; stdcall;
function RegQueryValueEx(hKey: HKEY; lpValueName: PKOLChar;
  lpReserved: Pointer; lpType: PDWORD; lpData: PByte; lpcbData: PDWORD): Longint; stdcall;
function RegReplaceKey(hKey: HKEY; lpSubKey: PKOLChar;
   lpNewFile: PKOLChar; lpOldFile: PKOLChar): Longint; stdcall;
function RegRestoreKey(hKey: HKEY; lpFile: PKOLChar; dwFlags: DWORD): Longint; stdcall;
function RegSaveKey(hKey: HKEY; lpFile: PKOLChar;
  lpSecurityAttributes: PSecurityAttributes): Longint; stdcall;
function RegSetValue(hKey: HKEY; lpSubKey: PKOLChar;
  dwType: DWORD; lpData: PKOLChar; cbData: DWORD): Longint; stdcall;
function RegSetValueEx(hKey: HKEY; lpValueName: PKOLChar;
  Reserved: DWORD; dwType: DWORD; lpData: Pointer; cbData: DWORD): Longint; stdcall;
function RegUnLoadKey(hKey: HKEY; lpSubKey: PKOLChar): Longint; stdcall;
function RegisterEventSource(lpUNCServerName, lpSourceName: PKOLChar): THandle; stdcall;
function ReportEvent(hEventLog: THandle; wType, wCategory: Word;
  dwEventID: DWORD; lpUserSid: Pointer; wNumStrings: Word;
  dwDataSize: DWORD; lpStrings, lpRawData: Pointer): BOOL; stdcall;
function SetFileSecurity(lpFileName: PKOLChar; SecurityInformation: SECURITY_INFORMATION;
  pSecurityDescriptor: PSecurityDescriptor): BOOL; stdcall;
function AddAtom(lpString: PKOLChar): ATOM; stdcall;
function BeginUpdateResource(pFileName: PKOLChar; bDeleteExistingResources: BOOL): THandle; stdcall;
function BuildCommDCB(lpDef: PKOLChar; var lpDCB: TDCB): BOOL; stdcall;
function BuildCommDCBAndTimeouts(lpDef: PKOLChar; var lpDCB: TDCB;
  var lpCommTimeouts: TCommTimeouts): BOOL; stdcall;
function CallNamedPipe(lpNamedPipeName: PKOLChar; lpInBuffer: Pointer;
  nInBufferSize: DWORD; lpOutBuffer: Pointer; nOutBufferSize: DWORD;
  var lpBytesRead: DWORD; nTimeOut: DWORD): BOOL; stdcall;
function CommConfigDialog(lpszName: PKOLChar; hWnd: HWND; var lpCC: TCommConfig): BOOL; stdcall;
function CompareString(Locale: LCID; dwCmpFlags: DWORD; lpString1: PKOLChar;
  cchCount1: Integer; lpString2: PKOLChar; cchCount2: Integer): Integer; stdcall;
function CopyFile(lpExistingFileName, lpNewFileName: PKOLChar; bFailIfExists: BOOL): BOOL; stdcall;
function CopyFileEx(lpExistingFileName, lpNewFileName: PKOLChar;
  lpProgressRoutine: TFNProgressRoutine; lpData: Pointer; pbCancel: PBool;
  dwCopyFlags: DWORD): BOOL; stdcall;
function CreateDirectory(lpPathName: PKOLChar;
  lpSecurityAttributes: PSecurityAttributes): BOOL; stdcall;
function CreateDirectoryEx(lpTemplateDirectory, lpNewDirectory: PKOLChar;
  lpSecurityAttributes: PSecurityAttributes): BOOL; stdcall;
function CreateEvent(lpEventAttributes: PSecurityAttributes;
  bManualReset, bInitialState: BOOL; lpName: PKOLChar): THandle; stdcall;
function CreateFile(lpFileName: PKOLChar; dwDesiredAccess, dwShareMode: DWORD;
  lpSecurityAttributes: PSecurityAttributes; dwCreationDisposition, dwFlagsAndAttributes: DWORD;
  hTemplateFile: THandle): THandle; stdcall;
function CreateFileMapping(hFile: THandle; lpFileMappingAttributes: PSecurityAttributes;
  flProtect, dwMaximumSizeHigh, dwMaximumSizeLow: DWORD; lpName: PKOLChar): THandle; stdcall;
function CreateHardLink(lpFileName, lpExistingFileName: PKOLChar;
  lpSecurityAttributes: PSecurityAttributes): BOOL; stdcall;
function CreateMailslot(lpName: PKOLChar; nMaxMessageSize: DWORD;
  lReadTimeout: DWORD; lpSecurityAttributes: PSecurityAttributes): THandle; stdcall;
function CreateNamedPipe(lpName: PKOLChar;
  dwOpenMode, dwPipeMode, nMaxInstances, nOutBufferSize, nInBufferSize, nDefaultTimeOut: DWORD;
  lpSecurityAttributes: PSecurityAttributes): THandle; stdcall;
function CreateProcess(lpApplicationName: PKOLChar; lpCommandLine: PKOLChar;
  lpProcessAttributes, lpThreadAttributes: PSecurityAttributes;
  bInheritHandles: BOOL; dwCreationFlags: DWORD; lpEnvironment: Pointer;
  lpCurrentDirectory: PKOLChar; const lpStartupInfo: TStartupInfo;
  var lpProcessInformation: TProcessInformation): BOOL; stdcall;
function CreateSemaphore(lpSemaphoreAttributes: PSecurityAttributes;
  lInitialCount, lMaximumCount: Longint; lpName: PKOLChar): THandle; stdcall;
function CreateWaitableTimer(lpTimerAttributes: PSecurityAttributes; bManualReset: BOOL; lpTimerName: PKOLChar): THandle; stdcall;
function DefineDosDevice(dwFlags: DWORD; lpDeviceName, lpTargetPath: PKOLChar): BOOL; stdcall;
function DeleteFile(lpFileName: PKOLChar): BOOL; stdcall;
function EndUpdateResource(hUpdate: THandle; fDiscard: BOOL): BOOL; stdcall;
function EnumCalendarInfo(lpCalInfoEnumProc: TFNCalInfoEnumProc; Locale: LCID;
  Calendar: CALID; CalType: CALTYPE): BOOL; stdcall;
function EnumDateFormats(lpDateFmtEnumProc: TFNDateFmtEnumProc;
  Locale: LCID; dwFlags: DWORD): BOOL; stdcall;
function EnumResourceLanguages(hModule: HMODULE; lpType, lpName: PKOLChar;
  lpEnumFunc: ENUMRESLANGPROC; lParam: Longint): BOOL; stdcall;
function EnumResourceNames(hModule: HMODULE; lpType: PKOLChar;
  lpEnumFunc: ENUMRESNAMEPROC; lParam: Longint): BOOL; stdcall;
function EnumResourceTypes(hModule: HMODULE; lpEnumFunc: ENUMRESTYPEPROC;
  lParam: Longint): BOOL; stdcall;
function EnumSystemCodePages(lpCodePageEnumProc: TFNCodepageEnumProc; dwFlags: DWORD): BOOL; stdcall;
function EnumSystemLocales(lpLocaleEnumProc: TFNLocaleEnumProc; dwFlags: DWORD): BOOL; stdcall;
function EnumTimeFormats(lpTimeFmtEnumProc: TFNTimeFmtEnumProc;
  Locale: LCID; dwFlags: DWORD): BOOL; stdcall;
function ExpandEnvironmentStrings(lpSrc: PKOLChar; lpDst: PKOLChar; nSize: DWORD): DWORD; stdcall;
procedure FatalAppExit(uAction: UINT; lpMessageText: PKOLChar); stdcall;
function FillConsoleOutputCharacter(hConsoleOutput: THandle; cCharacter: KOLChar;
  nLength: DWORD; dwWriteCoord: TCoord; var lpNumberOfCharsWritten: DWORD): BOOL; stdcall;
function FindAtom(lpString: PKOLChar): ATOM; stdcall;
function FindFirstChangeNotification(lpPathName: PKOLChar;
  bWatchSubtree: BOOL; dwNotifyFilter: DWORD): THandle; stdcall;
function FindFirstFile(lpFileName: PKOLChar; var lpFindFileData: TWIN32FindData): THandle; stdcall;
function FindFirstFileEx(lpFileName: PKOLChar; fInfoLevelId: TFindexInfoLevels;
  lpFindFileData: Pointer; fSearchOp: TFindexSearchOps; lpSearchFilter: Pointer;
  dwAdditionalFlags: DWORD): BOOL; stdcall;
function FindNextFile(hFindFile: THandle; var lpFindFileData: TWIN32FindData): BOOL; stdcall;
function FindResource(hModule: HMODULE; lpName, lpType: PKOLChar): HRSRC; stdcall;
function FindResourceEx(hModule: HMODULE; lpType, lpName: PKOLChar; wLanguage: Word): HRSRC; stdcall;
function FoldString(dwMapFlags: DWORD; lpSrcStr: PKOLChar; cchSrc: Integer;
  lpDestStr: PKOLChar; cchDest: Integer): Integer; stdcall;
function FormatMessage(dwFlags: DWORD; lpSource: Pointer; dwMessageId: DWORD; dwLanguageId: DWORD;
  lpBuffer: PKOLChar; nSize: DWORD; Arguments: Pointer): DWORD; stdcall;
function FreeEnvironmentStrings(EnvBlock: PKOLChar): BOOL; stdcall;
function GetAtomName(nAtom: ATOM; lpBuffer: PKOLChar; nSize: Integer): UINT; stdcall;
function GetBinaryType(lpApplicationName: PKOLChar; var lpBinaryType: DWORD): BOOL; stdcall;
function GetCommandLine: PKOLChar; stdcall;
function GetCompressedFileSize(lpFileName: PKOLChar; lpFileSizeHigh: PDWORD): DWORD; stdcall;
function GetComputerName(lpBuffer: PKOLChar; var nSize: DWORD): BOOL; stdcall;
function GetConsoleTitle(lpConsoleTitle: PKOLChar; nSize: DWORD): DWORD; stdcall;
function GetCurrencyFormat(Locale: LCID; dwFlags: DWORD; lpValue: PKOLChar;
  lpFormat: PCurrencyFmt; lpCurrencyStr: PKOLChar; cchCurrency: Integer): Integer; stdcall;
function GetCurrentDirectory(nBufferLength: DWORD; lpBuffer: PKOLChar): DWORD; stdcall;
function GetDateFormat(Locale: LCID; dwFlags: DWORD; lpDate: PSystemTime;
  lpFormat: PKOLChar; lpDateStr: PKOLChar; cchDate: Integer): Integer; stdcall;
function GetDefaultCommConfig(lpszName: PKOLChar;
  var lpCC: TCommConfig; var lpdwSize: DWORD): BOOL; stdcall;
function GetDiskFreeSpace(lpRootPathName: PKOLChar;
  var lpSectorsPerCluster, lpBytesPerSector, lpNumberOfFreeClusters, lpTotalNumberOfClusters: DWORD): BOOL; stdcall;
function GetDiskFreeSpaceEx(lpDirectoryName: PKOLChar;
  var lpFreeBytesAvailableToCaller, lpTotalNumberOfBytes; lpTotalNumberOfFreeBytes: PLargeInteger): BOOL; stdcall;
function GetDriveType(lpRootPathName: PKOLChar): UINT; stdcall;
function GetEnvironmentStrings: PKOLChar; stdcall;
function GetEnvironmentVariable(lpName: PKOLChar; lpBuffer: PKOLChar; nSize: DWORD): DWORD; stdcall;
         {$IFDEF _D4orHigher} overload; {$ENDIF}
function GetFileAttributes(lpFileName: PKOLChar): DWORD; stdcall;
function GetFileAttributesEx(lpFileName: PKOLChar;
  fInfoLevelId: TGetFileExInfoLevels; lpFileInformation: Pointer): BOOL; stdcall;
function GetFullPathName(lpFileName: PKOLChar; nBufferLength: DWORD;
  lpBuffer: PKOLChar; var lpFilePart: PKOLChar): DWORD; stdcall;
function GetLocaleInfo(Locale: LCID; LCType: LCTYPE; lpLCData: PKOLChar; cchData: Integer): Integer; stdcall;
function GetLogicalDriveStrings(nBufferLength: DWORD; lpBuffer: PKOLChar): DWORD; stdcall;
function GetModuleFileName(hModule: HINST; lpFilename: PKOLChar; nSize: DWORD): DWORD; stdcall;
function GetModuleHandle(lpModuleName: PKOLChar): HMODULE; stdcall;
function GetNamedPipeHandleState(hNamedPipe: THandle;
  lpState, lpCurInstances, lpMaxCollectionCount, lpCollectDataTimeout: PDWORD;
  lpUserName: PKOLChar; nMaxUserNameSize: DWORD): BOOL; stdcall;
function GetNumberFormat(Locale: LCID; dwFlags: DWORD; lpValue: PKOLChar;
  lpFormat: PNumberFmt; lpNumberStr: PKOLChar; cchNumber: Integer): Integer; stdcall;
function GetPrivateProfileInt(lpAppName, lpKeyName: PKOLChar; nDefault: Integer; lpFileName: PKOLChar): UINT; stdcall;
function GetPrivateProfileSection(lpAppName: PKOLChar; lpReturnedString: PKOLChar; nSize: DWORD; lpFileName: PKOLChar): DWORD; stdcall;
function GetPrivateProfileSectionNames(lpszReturnBuffer: PKOLChar; nSize: DWORD; lpFileName: PKOLChar): DWORD; stdcall;
function GetPrivateProfileString(lpAppName, lpKeyName, lpDefault: PKOLChar;
  lpReturnedString: PKOLChar; nSize: DWORD; lpFileName: PKOLChar): DWORD; stdcall;
function GetProfileInt(lpAppName, lpKeyName: PKOLChar; nDefault: Integer): UINT; stdcall;
function GetProfileSection(lpAppName: PKOLChar; lpReturnedString: PKOLChar; nSize: DWORD): DWORD; stdcall;
function GetProfileString(lpAppName, lpKeyName, lpDefault: PKOLChar;
  lpReturnedString: PKOLChar; nSize: DWORD): DWORD; stdcall;
function GetShortPathName(lpszLongPath: PKOLChar; lpszShortPath: PKOLChar;
  cchBuffer: DWORD): DWORD; stdcall;
procedure GetStartupInfo(var lpStartupInfo: TStartupInfo); stdcall;
function GetStringTypeEx(Locale: LCID; dwInfoType: DWORD;
  lpSrcStr: PKOLChar; cchSrc: Integer; var lpCharType): BOOL; stdcall;
function GetSystemDirectory(lpBuffer: PKOLChar; uSize: UINT): UINT; stdcall;
function GetTempFileName(lpPathName, lpPrefixString: PKOLChar;
  uUnique: UINT; lpTempFileName: PKOLChar): UINT; stdcall;
function GetTempPath(nBufferLength: DWORD; lpBuffer: PKOLChar): DWORD; stdcall;
function GetTimeFormat(Locale: LCID; dwFlags: DWORD; lpTime: PSystemTime;
  lpFormat: PKOLChar; lpTimeStr: PKOLChar; cchTime: Integer): Integer; stdcall;
function GetVersionEx(var lpVersionInformation: TOSVersionInfo): BOOL; stdcall;
function GetVolumeInformation(lpRootPathName: PKOLChar;
  lpVolumeNameBuffer: PKOLChar; nVolumeNameSize: DWORD; lpVolumeSerialNumber: PDWORD;
  var lpMaximumComponentLength, lpFileSystemFlags: DWORD;
  lpFileSystemNameBuffer: PKOLChar; nFileSystemNameSize: DWORD): BOOL; stdcall;
function GetWindowsDirectory(lpBuffer: PKOLChar; uSize: UINT): UINT; stdcall;
function GlobalAddAtom(lpString: PKOLChar): ATOM; stdcall;
function GlobalFindAtom(lpString: PKOLChar): ATOM; stdcall;
function GlobalGetAtomName(nAtom: ATOM; lpBuffer: PKOLChar; nSize: Integer): UINT; stdcall;
function IsBadStringPtr(lpsz: PKOLChar; ucchMax: UINT): BOOL; stdcall;
function LCMapString(Locale: LCID; dwMapFlags: DWORD; lpSrcStr: PKOLChar;
  cchSrc: Integer; lpDestStr: PKOLChar; cchDest: Integer): Integer; stdcall;
function LoadLibrary(lpLibFileName: PKOLChar): HMODULE; stdcall;
function LoadLibraryEx(lpLibFileName: PKOLChar; hFile: THandle; dwFlags: DWORD): HMODULE; stdcall;
function MoveFile(lpExistingFileName, lpNewFileName: PKOLChar): BOOL; stdcall;
function MoveFileEx(lpExistingFileName, lpNewFileName: PKOLChar; dwFlags: DWORD): BOOL; stdcall;
function MoveFileWithProgress(lpExistingFileName, lpNewFileName: PKOLChar; lpProgressRoutine: TFNProgressRoutine;
  lpData: Pointer; dwFlags: DWORD): BOOL; stdcall;
function OpenEvent(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: PKOLChar): THandle; stdcall;
function OpenFileMapping(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: PKOLChar): THandle; stdcall;
function OpenMutex(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: PKOLChar): THandle; stdcall;
function OpenSemaphore(dwDesiredAccess: DWORD; bInheritHandle: BOOL; lpName: PKOLChar): THandle; stdcall;
function OpenWaitableTimer(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
  lpTimerName: PKOLChar): THandle; stdcall;
procedure OutputDebugString(lpOutputString: PKOLChar); stdcall;
function PeekConsoleInput(hConsoleInput: THandle; var lpBuffer: TInputRecord;
  nLength: DWORD; var lpNumberOfEventsRead: DWORD): BOOL; stdcall;
function QueryDosDevice(lpDeviceName: PKOLChar; lpTargetPath: PKOLChar; ucchMax: DWORD): DWORD; stdcall;
{$IFDEF _D4orHigher}
function QueryRecoveryAgents(p1: PKOLChar; var p2: Pointer; var p3: TRecoveryAgentInformation): DWORD; stdcall;
{$ENDIF}
function ReadConsole(hConsoleInput: THandle; lpBuffer: Pointer;
  nNumberOfCharsToRead: DWORD; var lpNumberOfCharsRead: DWORD; lpReserved: Pointer): BOOL; stdcall;
function ReadConsoleInput(hConsoleInput: THandle; var lpBuffer: TInputRecord;
  nLength: DWORD; var lpNumberOfEventsRead: DWORD): BOOL; stdcall;
function ReadConsoleOutput(hConsoleOutput: THandle; lpBuffer: Pointer;
  dwBufferSize, dwBufferCoord: TCoord; var lpReadRegion: TSmallRect): BOOL; stdcall;
function ReadConsoleOutputCharacter(hConsoleOutput: THandle; lpCharacter: PKOLChar;
  nLength: DWORD; dwReadCoord: TCoord; var lpNumberOfCharsRead: DWORD): BOOL; stdcall;
function RemoveDirectory(lpPathName: PKOLChar): BOOL; stdcall;
function ScrollConsoleScreenBuffer(hConsoleOutput: THandle;
  const lpScrollRectangle: TSmallRect; lpClipRectangle: PSmallRect;
  dwDestinationOrigin: TCoord; var lpFill: TCharInfo): BOOL; stdcall;
function SearchPath(lpPath, lpFileName, lpExtension: PKOLChar;
  nBufferLength: DWORD; lpBuffer: PKOLChar; var lpFilePart: PKOLChar): DWORD; stdcall;
function SetComputerName(lpComputerName: PKOLChar): BOOL; stdcall;
function SetConsoleTitle(lpConsoleTitle: PKOLChar): BOOL; stdcall;
function SetCurrentDirectory(lpPathName: PKOLChar): BOOL; stdcall;
function SetDefaultCommConfig(lpszName: PKOLChar; lpCC: PCommConfig; dwSize: DWORD): BOOL; stdcall;
function SetEnvironmentVariable(lpName, lpValue: PKOLChar): BOOL; stdcall;
function SetFileAttributes(lpFileName: PKOLChar; dwFileAttributes: DWORD): BOOL; stdcall;
function SetLocaleInfo(Locale: LCID; LCType: LCTYPE; lpLCData: PKOLChar): BOOL; stdcall;
function SetVolumeLabel(lpRootPathName: PKOLChar; lpVolumeName: PKOLChar): BOOL; stdcall;
function UpdateResource(hUpdate: THandle; lpType, lpName: PKOLChar;
  wLanguage: Word; lpData: Pointer; cbData: DWORD): BOOL; stdcall;
function VerLanguageName(wLang: DWORD; szLang: PKOLChar; nSize: DWORD): DWORD; stdcall;
function WaitNamedPipe(lpNamedPipeName: PKOLChar; nTimeOut: DWORD): BOOL; stdcall;
function WriteConsole(hConsoleOutput: THandle; const lpBuffer: Pointer;
  nNumberOfCharsToWrite: DWORD; var lpNumberOfCharsWritten: DWORD; lpReserved: Pointer): BOOL; stdcall;
function WriteConsoleInput(hConsoleInput: THandle; const lpBuffer: TInputRecord;
  nLength: DWORD; var lpNumberOfEventsWritten: DWORD): BOOL; stdcall;
function WriteConsoleOutput(hConsoleOutput: THandle; lpBuffer: Pointer;
  dwBufferSize, dwBufferCoord: TCoord; var lpWriteRegion: TSmallRect): BOOL; stdcall;
function WriteConsoleOutputCharacter(hConsoleOutput: THandle;lpCharacter: PKOLChar;
  nLength: DWORD; dwWriteCoord: TCoord; var lpNumberOfCharsWritten: DWORD): BOOL; stdcall;
function WritePrivateProfileSection(lpAppName, lpString, lpFileName: PKOLChar): BOOL; stdcall;
function WritePrivateProfileString(lpAppName, lpKeyName, lpString, lpFileName: PKOLChar): BOOL; stdcall;
function WriteProfileSection(lpAppName, lpString: PKOLChar): BOOL; stdcall;
function WriteProfileString(lpAppName, lpKeyName, lpString: PKOLChar): BOOL; stdcall;
function lstrcat(lpString1, lpString2: PKOLChar): PKOLChar; stdcall;
function lstrcmp(lpString1, lpString2: PKOLChar): Integer; stdcall;
function lstrcmpi(lpString1, lpString2: PKOLChar): Integer; stdcall;
function lstrcpy(lpString1, lpString2: PKOLChar): PKOLChar; stdcall;
function lstrcpyn(lpString1, lpString2: PKOLChar; iMaxLength: Integer): PKOLChar; stdcall;
function lstrlen(lpString: PKOLChar): Integer; stdcall;
function MultinetGetConnectionPerformance(lpNetResource: PNetResource;
  lpNetConnectInfoStruc: PNetConnectInfoStruct): DWORD; stdcall;
function WNetAddConnection2(var lpNetResource: TNetResource;
  lpPassword, lpUserName: PKOLChar; dwFlags: DWORD): DWORD; stdcall;
function WNetAddConnection3(hwndOwner: HWND; var lpNetResource: TNetResource;
  lpPassword, lpUserName: PKOLChar; dwFlags: DWORD): DWORD; stdcall;
function WNetAddConnection(lpRemoteName, lpPassword, lpLocalName: PKOLChar): DWORD; stdcall;
function WNetCancelConnection2(lpName: PKOLChar; dwFlags: DWORD; fForce: BOOL): DWORD; stdcall;
function WNetCancelConnection(lpName: PKOLChar; fForce: BOOL): DWORD; stdcall;
function WNetConnectionDialog1(var lpConnDlgStruct: TConnectDlgStruct): DWORD; stdcall;
function WNetDisconnectDialog1(var lpConnDlgStruct: TDiscDlgStruct): DWORD; stdcall;
function WNetEnumResource(hEnum: THandle; var lpcCount: DWORD;
  lpBuffer: Pointer; var lpBufferSize: DWORD): DWORD; stdcall;
function WNetGetConnection(lpLocalName: PKOLChar;
  lpRemoteName: PKOLChar; var lpnLength: DWORD): DWORD; stdcall;
function WNetGetLastError(var lpError: DWORD; lpErrorBuf: PKOLChar;
  nErrorBufSize: DWORD; lpNameBuf: PKOLChar; nNameBufSize: DWORD): DWORD; stdcall;
function WNetGetNetworkInformation(lpProvider: PKOLChar;
  var lpNetInfoStruct: TNetInfoStruct): DWORD; stdcall;
function WNetGetProviderName(dwNetType: DWORD; lpProviderName: PKOLChar;
  var lpBufferSize: DWORD): DWORD; stdcall;
function WNetGetResourceParent(lpNetResource: PNetResource;
  lpBuffer: Pointer; var cbBuffer: DWORD): DWORD; stdcall;
function WNetGetUniversalName(lpLocalPath: PKOLChar; dwInfoLevel: DWORD;
  lpBuffer: Pointer; var lpBufferSize: DWORD): DWORD; stdcall;
function WNetGetUser(lpName: PKOLChar; lpUserName: PKOLChar; var lpnLength: DWORD): DWORD; stdcall;
function WNetOpenEnum(dwScope, dwType, dwUsage: DWORD;
  lpNetResource: PNetResource; var lphEnum: THandle): DWORD; stdcall;
function WNetSetConnection(lpName: PKOLChar; dwProperties: DWORD; pvValues: Pointer): DWORD; stdcall;
function WNetUseConnection(hwndOwner: HWND;
  var lpNetResource: TNetResource; lpUserID: PKOLChar;
  lpPassword: PKOLChar; dwFlags: DWORD; lpAccessName: PKOLChar;
  var lpBufferSize: DWORD; var lpResult: DWORD): DWORD; stdcall;
function GetFileVersionInfo(lptstrFilename: PKOLChar; dwHandle, dwLen: DWORD;
  lpData: Pointer): BOOL; stdcall;
function GetFileVersionInfoSize(lptstrFilename: PKOLChar; var lpdwHandle: DWORD): DWORD; stdcall;
function VerFindFile(uFlags: DWORD; szFileName, szWinDir, szAppDir, szCurDir: PKOLChar;
  var lpuCurDirLen: UINT; szDestDir: PKOLChar; var lpuDestDirLen: UINT): DWORD; stdcall;
function VerInstallFile(uFlags: DWORD;
  szSrcFileName, szDestFileName, szSrcDir, szDestDir, szCurDir, szTmpFile: PKOLChar;
  var lpuTmpFileLen: UINT): DWORD; stdcall;
function VerQueryValue(pBlock: Pointer; lpSubBlock: PKOLChar;
  var lplpBuffer: Pointer; var puLen: UINT): BOOL; stdcall;
function GetPrivateProfileStruct(lpszSection, lpszKey: PKOLChar;
  lpStruct: Pointer; uSizeStruct: UINT; szFile: PKOLChar): BOOL; stdcall;
function WritePrivateProfileStruct(lpszSection, lpszKey: PKOLChar;
  lpStruct: Pointer; uSizeStruct: UINT; szFile: PKOLChar): BOOL; stdcall;
function AddFontResource(FileName: PKOLChar): Integer; stdcall;
{$IFDEF _D4orHigher}
function AddFontResourceEx(p1: PKOLChar; p2: DWORD; p3: PDesignVector): Integer; stdcall;
{$ENDIF}
function CopyEnhMetaFile(p1: HENHMETAFILE; p2: PKOLChar): HENHMETAFILE; stdcall;
function CopyMetaFile(p1: HMETAFILE; p2: PKOLChar): HMETAFILE; stdcall;
function CreateColorSpace(var ColorSpace: TLogColorSpace): HCOLORSPACE; stdcall;
function CreateDC(lpszDriver, lpszDevice, lpszOutput: PKOLChar;
  lpdvmInit: PDeviceMode): HDC; stdcall;
function CreateEnhMetaFile(DC: HDC; FileName: PKOLChar; Rect: PRect; Desc: PKOLChar): HDC; stdcall;
function CreateFont(nHeight, nWidth, nEscapement, nOrientaion, fnWeight: Integer;
  fdwItalic, fdwUnderline, fdwStrikeOut, fdwCharSet, fdwOutputPrecision,
  fdwClipPrecision, fdwQuality, fdwPitchAndFamily: DWORD; lpszFace: PKOLChar): HFONT; stdcall;
function CreateFontIndirect(const p1: TLogFont): HFONT; stdcall;
{$IFDEF _D4orHigher}
function CreateFontIndirectEx(const p1: PEnumLogFontExDV): HFONT; stdcall;
{$ENDIF}
function CreateIC(lpszDriver, lpszDevice, lpszOutput: PKOLChar; lpdvmInit: PDeviceMode): HDC; stdcall;
function CreateMetaFile(p1: PKOLChar): HDC; stdcall;
function CreateScalableFontResource(p1: DWORD; p2, p3, p4: PKOLChar): BOOL; stdcall;
function DeviceCapabilities(pDriverName, pDeviceName, pPort: PKOLChar;
  iIndex: Integer; pOutput: PKOLChar; DevMode: PDeviceMode): Integer; stdcall;
function EnumFontFamilies(DC: HDC; p2: PKOLChar; p3: TFNFontEnumProc; p4: LPARAM): BOOL; stdcall;
function EnumFontFamiliesEx(DC: HDC; var p2: TLogFont;
  p3: TFNFontEnumProc; p4: LPARAM; p5: DWORD): BOOL; stdcall;
function EnumFonts(DC: HDC; lpszFace: PKOLChar; fntenmprc: TFNFontEnumProc;
  lpszData: PKOLChar): Integer; stdcall;
function EnumICMProfiles(DC: HDC; ICMProc: TFNICMEnumProc; p3: LPARAM): Integer; stdcall;
function ExtTextOut(DC: HDC; X, Y: Integer; Options: Longint;
  Rect: PRect; Str: PKOLChar; Count: Longint; Dx: PInteger): BOOL; stdcall;
function GetCharABCWidths(DC: HDC; FirstChar, LastChar: UINT; const ABCStructs): BOOL; stdcall;
function GetCharABCWidthsFloat(DC: HDC; FirstChar, LastChar: UINT; const ABCFloatSturcts): BOOL; stdcall;
function GetCharWidth32(DC: HDC; FirstChar, LastChar: UINT; const Widths): BOOL; stdcall;
function GetCharWidth(DC: HDC; FirstChar, LastChar: UINT; const Widths): BOOL; stdcall;
function GetCharWidthFloat(DC: HDC; FirstChar, LastChar: UINT; const Widths): BOOL; stdcall;
function GetCharacterPlacement(DC: HDC; p2: PKOLChar; p3, p4: BOOL;
  var p5: TGCPResults; p6: DWORD): DWORD; stdcall;
function GetEnhMetaFile(p1: PKOLChar): HENHMETAFILE; stdcall;
function GetEnhMetaFileDescription(p1: HENHMETAFILE; p2: UINT; p3: PKOLChar): UINT; stdcall;
function GetGlyphIndices(DC: HDC; p2: PKOLChar; p3: Integer; p4: PWORD; p5: DWORD): DWORD; stdcall;
function GetGlyphOutline(DC: HDC; uChar, uFormat: UINT;
  const lpgm: TGlyphMetrics; cbBuffer: DWORD; lpvBuffer: Pointer; const lpmat2: TMat2): DWORD; stdcall;
function GetICMProfile(DC: HDC; var Size: DWORD; Name: PKOLChar): BOOL; stdcall;
function GetLogColorSpace(p1: HCOLORSPACE; var ColorSpace: TLogColorSpace; Size: DWORD): BOOL; stdcall;
function GetMetaFile(p1: PKOLChar): HMETAFILE; stdcall;
function GetObject(p1: HGDIOBJ; p2: Integer; p3: Pointer): Integer; stdcall;
function GetOutlineTextMetrics(DC: HDC; p2: UINT; OTMetricStructs: Pointer): UINT; stdcall;
function GetTextExtentExPoint(DC: HDC; p2: PKOLChar;
  p3, p4: Integer; p5, p6: PInteger; var p7: TSize): BOOL; stdcall;
function GetTextExtentPoint32(DC: HDC; Str: PKOLChar; Count: Integer;
  var Size: TSize): BOOL; stdcall;
function GetTextExtentPoint(DC: HDC; Str: PKOLChar; Count: Integer;
  var Size: TSize): BOOL; stdcall;
function GetTextFace(DC: HDC; Count: Integer; Buffer: PKOLChar): Integer; stdcall;
function GetTextMetrics(DC: HDC; var TM: TTextMetric): BOOL; stdcall;
function PolyTextOut(DC: HDC; const PolyTextArray; Strings: Integer): BOOL; stdcall;
function RemoveFontResource(FileName: PKOLChar): BOOL; stdcall;
{$IFDEF _D4orHigher}
function RemoveFontResourceEx(p1: PKOLChar; p2: DWORD; p3: PDesignVector): BOOL; stdcall;
{$ENDIF}
function ResetDC(DC: HDC; const InitData: TDeviceMode): HDC; stdcall;
function SetICMProfile(DC: HDC; Name: PKOLChar): BOOL; stdcall;
function StartDoc(DC: HDC; const p2: TDocInfo): Integer; stdcall;
function TextOut(DC: HDC; X, Y: Integer; Str: PKOLChar; Count: Integer): BOOL; stdcall;
function UpdateICMRegKey(p1: DWORD; p2, p3: PKOLChar; p4: UINT): BOOL; stdcall;
function wglUseFontBitmaps(DC: HDC; p2, p3, p4: DWORD): BOOL; stdcall;
function wglUseFontOutlines(p1: HDC; p2, p3, p4: DWORD;
  p5, p6: Single; p7: Integer; p8: PGlyphMetricsFloat): BOOL; stdcall;
function AnsiToOem(const lpszSrc: LPCSTR; lpszDst: LPSTR): BOOL; stdcall;
function AnsiToOemBuff(lpszSrc: LPCSTR; lpszDst: LPSTR; cchDstLength: DWORD): BOOL; stdcall;
function AnsiToOemBuffA(lpszSrc: LPCSTR; lpszDst: LPSTR; cchDstLength: DWORD): BOOL; stdcall;
function AnsiUpper(lpsz: LPSTR): LPSTR; stdcall;
function AnsiUpperBuff(lpsz: LPSTR; cchLength: DWORD): DWORD; stdcall;
function AnsiLower(lpsz: LPSTR): LPSTR; stdcall;
function AnsiLowerBuff(lpsz: LPSTR; cchLength: DWORD): DWORD; stdcall;
function AnsiNext(const lpsz: LPCSTR): LPSTR; stdcall;
function AnsiPrev(const lpszStart: LPCSTR; const lpszCurrent: LPCSTR): LPSTR; stdcall;
function AppendMenu(hMenu: HMENU; uFlags, uIDNewItem: UINT;
  lpNewItem: PKOLChar): BOOL; stdcall;
//function BroadcastSystemMessage(Flags: DWORD; Recipients: PDWORD;
//  uiMessage: UINT; wParam: WPARAM; lParam: LPARAM): Longint; stdcall;
//function BroadcastSystemMessageW(Flags: DWORD; Recipients: PDWORD;
//  uiMessage: UINT; wParam: WPARAM; lParam: LPARAM): Longint; stdcall;
function CallMsgFilter(var lpMsg: TMsg; nCode: Integer): BOOL; stdcall;
function CallWindowProc(lpPrevWndFunc: TFNWndProc; hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
function ChangeDisplaySettings(var lpDevMode: TDeviceMode; dwFlags: DWORD): Longint; stdcall;
function ChangeDisplaySettingsEx(lpszDeviceName: PKOLChar; var lpDevMode: TDeviceMode;
        wnd: HWND; dwFlags: DWORD; lParam: Pointer): Longint; stdcall;
function ChangeMenu(hMenu: HMENU; cmd: UINT; lpszNewItem: PKOLChar;
  cmdInsert: UINT; flags: UINT): BOOL; stdcall;
function CharLower(lpsz: PKOLChar): PKOLChar; stdcall;
function CharLowerBuff(lpsz: PKOLChar; cchLength: DWORD): DWORD; stdcall;
function CharNext(lpsz: PKOLChar): PKOLChar; stdcall;
function CharNextEx(CodePage: Word; lpCurrentChar: LPCSTR; dwFlags: DWORD): LPSTR; stdcall;
function CharPrev(lpszStart: PKOLChar; lpszCurrent: PKOLChar): PKOLChar; stdcall;
function CharPrevEx(CodePage: Word; lpStart, lpCurrentChar: LPCSTR; dwFlags: DWORD): LPSTR; stdcall;
function CharToOem(lpszSrc: PKOLChar; lpszDst: PKOLChar): BOOL; stdcall;
function CharToOemBuff(lpszSrc: PKOLChar; lpszDst: PKOLChar; cchDstLength: DWORD): BOOL; stdcall;
function CharUpper(lpsz: PKOLChar): PKOLChar; stdcall;
function CharUpperBuff(lpsz: PKOLChar; cchLength: DWORD): DWORD; stdcall;
function CopyAcceleratorTable(hAccelSrc: HACCEL; var lpAccelDst; cAccelEntries: Integer): Integer; stdcall;
function CreateAcceleratorTable(var Accel; Count: Integer): HACCEL; stdcall;
function CreateDesktop(lpszDesktop, lpszDevice: PKOLChar;
  pDevmode: PDeviceMode; dwFlags: DWORD; dwDesiredAccess:
  DWORD; lpsa: PSecurityAttributes): HDESK; stdcall;
function CreateDialogIndirectParam(hInstance: HINST; const lpTemplate: TDlgTemplate;
  hWndParent: HWND; lpDialogFunc: TFNDlgProc; dwInitParam: LPARAM): HWND; stdcall;
function CreateDialogParam(hInstance: HINST; lpTemplateName: PKOLChar;
  hWndParent: HWND; lpDialogFunc: TFNDlgProc; dwInitParam: LPARAM): HWND; stdcall;
function CreateMDIWindow(lpClassName, lpWindowName: PKOLChar;
  dwStyle: DWORD; X, Y, nWidth, nHeight: Integer;
  hWndParent: HWND; hInstance: HINST; lParam: LPARAM): HWND; stdcall;
function CreateWindowEx(dwExStyle: DWORD; lpClassName: PKOLChar;
  lpWindowName: PKOLChar; dwStyle: DWORD; X, Y, nWidth, nHeight: Integer;
  hWndParent: HWND; hMenu: HMENU; hInstance: HINST; lpParam: Pointer): HWND; stdcall;
function CreateWindowStation(lpwinsta: PKOLChar; dwReserved, dwDesiredAccess: DWORD;
  lpsa: PSecurityAttributes): HWINSTA; stdcall;
function DefDlgProc(hDlg: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
function DefFrameProc(hWnd, hWndMDIClient: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
function DefMDIChildProc(hWnd: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
function DefWindowProc(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
function DialogBoxIndirectParam(hInstance: HINST; const lpDialogTemplate: TDlgTemplate;
  hWndParent: HWND; lpDialogFunc: TFNDlgProc; dwInitParam: LPARAM): Integer; stdcall;
function DialogBoxParam(hInstance: HINST; lpTemplateName: PKOLChar;
  hWndParent: HWND; lpDialogFunc: TFNDlgProc; dwInitParam: LPARAM): Integer; stdcall;
function DispatchMessage(const lpMsg: TMsg): LRESULT; stdcall;
function DlgDirList(hDlg: HWND; lpPathSpec: PKOLChar;
  nIDListBox, nIDStaticPath: Integer; uFileType: UINT): Integer; stdcall;
function DlgDirListComboBox(hDlg: HWND; lpPathSpec: PKOLChar;
  nIDComboBox, nIDStaticPath: Integer; uFiletype: UINT): Integer; stdcall;
function DlgDirSelectComboBoxEx(hDlg: HWND; lpString: PKOLChar;
  nCount, nIDComboBox: Integer): BOOL; stdcall;
function DlgDirSelectEx(hDlg: HWND; lpString: PKOLChar; nCount, nIDListBox: Integer): BOOL; stdcall;
function DrawState(DC: HDC; Brush: HBRUSH; CBFunc: TFNDrawStateProc;
  lData: LPARAM; wData: WPARAM; x, y, cx, cy: Integer; Flags: UINT): BOOL; stdcall;
function DrawText(hDC: HDC; lpString: PKOLChar; nCount: Integer;
  var lpRect: TRect; uFormat: UINT): Integer; stdcall;
function DrawTextEx(DC: HDC; lpchText: PKOLChar; cchText: Integer; var p4: TRect;
  dwDTFormat: UINT; DTParams: PDrawTextParams): Integer; stdcall;
function EnumDesktops(hwinsta: HWINSTA; lpEnumFunc: TFNDeskTopEnumProc; lParam: LPARAM): BOOL; stdcall;
function EnumDisplaySettings(lpszDeviceName: PKOLChar; iModeNum: DWORD;
  var lpDevMode: TDeviceMode): BOOL; stdcall;
{$IFDEF _D4orHigher}
function EnumDisplayDevices(Unused: Pointer; iDevNum: DWORD;
  var lpDisplayDevice: TDisplayDevice; dwFlags: DWORD): BOOL; stdcall;
{$ENDIF}
function EnumProps(hWnd: HWND; lpEnumFunc: TFNPropEnumProc): Integer; stdcall;
function EnumPropsEx(hWnd: HWND; lpEnumFunc: TFNPropEnumProcEx; lParam: LPARAM): Integer; stdcall;
function EnumWindowStations(lpEnumFunc: TFNWinStaEnumProc; lParam: LPARAM): BOOL; stdcall;
function FindWindow(lpClassName, lpWindowName: PKOLChar): HWND; stdcall;
function FindWindowEx(Parent, Child: HWND; ClassName, WindowName: PKOLChar): HWND; stdcall;
{$IFDEF _D4orHigher}
function GetAltTabInfo(hwnd: HWND; iItem: Integer; var pati: TAltTabInfo;
  pszItemText: PKOLChar; cchItemText: UINT): BOOL; stdcall;
{$ENDIF}
function GetClassInfo(hInstance: HINST; lpClassName: PKOLChar;
  var lpWndClass: TWndClass): BOOL; stdcall;
function GetClassInfoEx(Instance: HINST; Classname: PKOLChar; var WndClass: TWndClassEx): BOOL; stdcall;
function GetClassLong(hWnd: HWND; nIndex: Integer): DWORD; stdcall;
function GetClassName(hWnd: HWND; lpClassName: PKOLChar; nMaxCount: Integer): Integer; stdcall;
function GetClipboardFormatName(format: UINT; lpszFormatName: PKOLChar;
  cchMaxCount: Integer): Integer; stdcall;
function GetDlgItemText(hDlg: HWND; nIDDlgItem: Integer;
  lpString: PKOLChar; nMaxCount: Integer): UINT; stdcall;
function GetKeyNameText(lParam: Longint; lpString: PKOLChar; nSize: Integer): Integer; stdcall;
function GetKeyboardLayoutName(pwszKLID: PKOLChar): BOOL; stdcall;
function GetMenuItemInfo(p1: HMENU; p2: UINT; p3: BOOL; var p4: TMenuItemInfo): BOOL; stdcall;
function GetMenuString(hMenu: HMENU; uIDItem: UINT; lpString: PKOLChar;
  nMaxCount: Integer; uFlag: UINT): Integer; stdcall;
function GetMessage(var lpMsg: TMsg; hWnd: HWND;
  wMsgFilterMin, wMsgFilterMax: UINT): BOOL; stdcall;
function GetProp(hWnd: HWND; lpString: PKOLChar): THandle; stdcall;
function GetTabbedTextExtent(hDC: HDC; lpString: PKOLChar;
  nCount, nTabPositions: Integer; var lpnTabStopPositions): DWORD; stdcall;
function GetUserObjectInformation(hObj: THandle; nIndex: Integer; pvInfo: Pointer;
  nLength: DWORD; var lpnLengthNeeded: DWORD): BOOL; stdcall;
function GetWindowLong(hWnd: HWND; nIndex: Integer): Longint; stdcall;
function GetWindowModuleFileName(hwnd: HWND; pszFileName: PKOLChar; cchFileNameMax: UINT): UINT; stdcall;
function GetWindowText(hWnd: HWND; lpString: PKOLChar; nMaxCount: Integer): Integer; stdcall;
function GetWindowTextLength(hWnd: HWND): Integer; stdcall;
function GrayString(hDC: HDC; hBrush: HBRUSH; lpOutputFunc: TFNGrayStringProc;
  lpData: LPARAM; nCount, X, Y, nWidth, nHeight: Integer): BOOL; stdcall;
function InsertMenu(hMenu: HMENU; uPosition, uFlags, uIDNewItem: UINT;
  lpNewItem: PKOLChar): BOOL; stdcall;
function InsertMenuItem(p1: HMENU; p2: UINT; p3: BOOL; const p4: TMenuItemInfo): BOOL; stdcall;
function IsCharAlpha(ch: KOLChar): BOOL; stdcall;
function IsCharAlphaNumeric(ch: KOLChar): BOOL; stdcall;
function IsCharLower(ch: KOLChar): BOOL; stdcall;
function IsCharUpper(ch: KOLChar): BOOL; stdcall;
function IsDialogMessage(hDlg: HWND; var lpMsg: TMsg): BOOL; stdcall;
function LoadAccelerators(hInstance: HINST; lpTableName: PKOLChar): HACCEL; stdcall;
function LoadBitmap(hInstance: HINST; lpBitmapName: PKOLChar): HBITMAP; stdcall;
function LoadCursor(hInstance: HINST; lpCursorName: PKOLChar): HCURSOR; stdcall;
function LoadCursorFromFile(lpFileName: PKOLChar): HCURSOR; stdcall;
function LoadIcon(hInstance: HINST; lpIconName: PKOLChar): HICON; stdcall;
function LoadImage(hInst: HINST; ImageName: PKOLChar; ImageType: UINT; X, Y: Integer; Flags: UINT): THandle; stdcall;
function LoadKeyboardLayout(pwszKLID: PKOLChar; Flags: UINT): HKL; stdcall;
function LoadMenu(hInstance: HINST; lpMenuName: PKOLChar): HMENU; stdcall;
function LoadMenuIndirect(lpMenuTemplate: Pointer): HMENU; stdcall;
function LoadString(hInstance: HINST; uID: UINT; lpBuffer: PKOLChar; nBufferMax: Integer): Integer; stdcall;
function MapVirtualKey(uCode, uMapType: UINT): UINT; stdcall;
function MapVirtualKeyEx(uCode, uMapType: UINT; dwhkl: HKL): UINT; stdcall;
function MessageBox(hWnd: HWND; lpText, lpCaption: PKOLChar; uType: UINT): Integer; stdcall;
function MessageBoxEx(hWnd: HWND; lpText, lpCaption: PKOLChar;
  uType: UINT; wLanguageId: Word): Integer; stdcall;
function MessageBoxIndirect(const MsgBoxParams: TMsgBoxParams): BOOL; stdcall;
function ModifyMenu(hMnu: HMENU; uPosition, uFlags, uIDNewItem: UINT;
  lpNewItem: PKOLChar): BOOL; stdcall;
function OemToAnsi(const lpszSrc: LPCSTR; lpszDst: LPSTR): BOOL; stdcall;
function OemToAnsiBuff(lpszSrc: LPCSTR; lpszDst: LPSTR; cchDstLength: DWORD): BOOL; stdcall;
function OemToChar(lpszSrc: PKOLChar; lpszDst: PKOLChar): BOOL; stdcall;
function OemToCharBuff(lpszSrc: PKOLChar; lpszDst: PKOLChar; cchDstLength: DWORD): BOOL; stdcall;
function OpenDesktop(lpszDesktop: PKOLChar; dwFlags: DWORD; fInherit: BOOL;
  dwDesiredAccess: DWORD): HDESK; stdcall;
function OpenWindowStation(lpszWinSta: PKOLChar; fInherit: BOOL;
  dwDesiredAccess: DWORD): HWINSTA; stdcall;
function PeekMessage(var lpMsg: TMsg; hWnd: HWND;
  wMsgFilterMin, wMsgFilterMax, wRemoveMsg: UINT): BOOL; stdcall;
function PostMessage(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL; stdcall;
function PostThreadMessage(idThread: DWORD; Msg: UINT; wParam: WPARAM; lParam: LPARAM): BOOL; stdcall;
function RealGetWindowClass(hwnd: HWND; pszType: PKOLChar; cchType: UINT): UINT; stdcall;
function RegisterClass(const lpWndClass: TWndClass): ATOM; stdcall;
function RegisterClassEx(const WndClass: TWndClassEx): ATOM; stdcall;
function RegisterClipboardFormat(lpszFormat: PKOLChar): UINT; stdcall;
{$IFDEF _D4orHigher}
function RegisterDeviceNotification(hRecipient: THandle; NotificationFilter: Pointer; Flags: DWORD): HDEVNOTIFY; stdcall;
{$ENDIF}
function RegisterWindowMessage(lpString: PKOLChar): UINT; stdcall;
function RemoveProp(hWnd: HWND; lpString: PKOLChar): THandle; stdcall;
function SendDlgItemMessage(hDlg: HWND; nIDDlgItem: Integer;
  Msg: UINT; wParam: WPARAM; lParam: LPARAM): Longint; stdcall;
function SendMessage(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
function SendMessageCallback(hWnd: HWND; Msg: UINT; wParam: WPARAM;
  lParam: LPARAM; lpResultCallBack: TFNSendAsyncProc; dwData: DWORD): BOOL; stdcall;
function SendMessageTimeout(hWnd: HWND; Msg: UINT; wParam: WPARAM;
  lParam: LPARAM; fuFlags, uTimeout: UINT; var lpdwResult: DWORD): LRESULT; stdcall;
function SendNotifyMessage(hWnd: HWND; Msg: UINT; wParam: WPARAM;
  lParam: LPARAM): BOOL; stdcall;
function SetClassLong(hWnd: HWND; nIndex: Integer; dwNewLong: Longint): DWORD; stdcall;
function SetDlgItemText(hDlg: HWND; nIDDlgItem: Integer; lpString: PKOLChar): BOOL; stdcall;
function SetMenuItemInfo(p1: HMENU; p2: UINT; p3: BOOL; const p4: TMenuItemInfo): BOOL; stdcall;
function SetProp(hWnd: HWND; lpString: PKOLChar; hData: THandle): BOOL; stdcall;
function SetUserObjectInformation(hObj: THandle; nIndex: Integer;
  pvInfo: Pointer; nLength: DWORD): BOOL; stdcall;
function SetWindowLong(hWnd: HWND; nIndex: Integer; dwNewLong: Longint): Longint; stdcall;
function SetWindowText(hWnd: HWND; lpString: PKOLChar): BOOL; stdcall;
function SetWindowsHook(nFilterType: Integer; pfnFilterProc: TFNHookProc): HHOOK; stdcall;
function SetWindowsHookEx(idHook: Integer; lpfn: TFNHookProc; hmod: HINST; dwThreadId: DWORD): HHOOK; stdcall;
function SystemParametersInfo(uiAction, uiParam: UINT;
  pvParam: Pointer; fWinIni: UINT): BOOL; stdcall;
function TabbedTextOut(hDC: HDC; X, Y: Integer; lpString: PKOLChar; nCount, nTabPositions: Integer;
  var lpnTabStopPositions; nTabOrigin: Integer): Longint; stdcall;
function TranslateAccelerator(hWnd: HWND; hAccTable: HACCEL; var lpMsg: TMsg): Integer; stdcall;
function UnregisterClass(lpClassName: PKOLChar; hInstance: HINST): BOOL; stdcall;
function VkKeyScan(ch: KOLChar): SHORT; stdcall;
function VkKeyScanEx(ch: KOLChar; dwhkl: HKL): SHORT; stdcall;
function WinHelp(hWndMain: HWND; lpszHelp: PKOLChar; uCommand: UINT; dwData: DWORD): BOOL; stdcall;
function wsprintf(Output: PKOLChar; Format: PKOLChar): Integer; stdcall;
function wvsprintf(Output: PKOLChar; Format: PKOLChar; arglist: va_list): Integer; stdcall;
function CreateMutex(lpMutexAttributes: PSecurityAttributes; bInitialOwner: BOOL; lpName: PWideChar): THandle;

const
  IDC_ARROW = MakeIntResource(32512);
  IDC_IBEAM = MakeIntResource(32513);
  IDC_WAIT = MakeIntResource(32514);
  IDC_CROSS = MakeIntResource(32515);
  IDC_UPARROW = MakeIntResource(32516);
  IDC_SIZE = MakeIntResource(32640);
  IDC_ICON = MakeIntResource(32641);
  IDC_SIZENWSE = MakeIntResource(32642);
  IDC_SIZENESW = MakeIntResource(32643);
  IDC_SIZEWE = MakeIntResource(32644);
  IDC_SIZENS = MakeIntResource(32645);
  IDC_SIZEALL = MakeIntResource(32646);
  IDC_NO = MakeIntResource(32648);
  IDC_HAND = MakeIntResource(32649);
  IDC_APPSTARTING = MakeIntResource(32650);
  IDC_HELP = MakeIntResource(32651);
  RT_CURSOR       = PKOLChar(1);
  RT_BITMAP       = PKOLChar(2);
  RT_ICON         = PKOLChar(3);
  RT_MENU         = PKOLChar(4);
  RT_DIALOG       = PKOLChar(5);
  RT_STRING       = PKOLChar(6);
  RT_FONTDIR      = PKOLChar(7);
  RT_FONT         = PKOLChar(8);
  RT_ACCELERATOR  = PKOLChar(9);
  RT_RCDATA       = PKOLChar(10);
  RT_MESSAGETABLE = PKOLChar(11);
  RT_VERSION      = PKOLChar(16);
  RT_DLGINCLUDE   = PKOLChar(17);
  RT_PLUGPLAY     = PKOLChar(19);
  RT_VXD          = PKOLChar(20);
  RT_ANICURSOR    = PKOLChar(21);
  RT_ANIICON      = PKOLChar(22);

{$EXTERNALSYM GetWindowLongPtr}
function GetWindowLongPtr(hWnd: HWND; nIndex: Integer): LONG_PTR; stdcall;
{$EXTERNALSYM SetWindowLongPtr}
function SetWindowLongPtr(hWnd: HWND; nIndex: Integer; dwNewLong: LONG_PTR): LONG_PTR; stdcall;
{$EXTERNALSYM GetWindowLongPtrA}
function GetWindowLongPtrA(hWnd: HWND; nIndex: Integer): LONG_PTR; stdcall;
{$EXTERNALSYM SetWindowLongPtrA}
function SetWindowLongPtrA(hWnd: HWND; nIndex: Integer; dwNewLong: LONG_PTR): LONG_PTR; stdcall;
{$EXTERNALSYM GetWindowLongPtrW}
function GetWindowLongPtrW(hWnd: HWND; nIndex: Integer): LONG_PTR; stdcall;
{$EXTERNALSYM SetWindowLongPtrW}
function SetWindowLongPtrW(hWnd: HWND; nIndex: Integer; dwNewLong: LONG_PTR): LONG_PTR; stdcall;
{$EXTERNALSYM GetClassLongPtr}
function GetClassLongPtr(hWnd: HWND; nIndex: Integer): ULONG_PTR; stdcall;
{$EXTERNALSYM SetClassLongPtr}
function SetClassLongPtr(hWnd: HWND; nIndex: Integer; dwNewLong: LONG_PTR): ULONG_PTR; stdcall;
{$EXTERNALSYM GetClassLongPtrA}
function GetClassLongPtrA(hWnd: HWND; nIndex: Integer): ULONG_PTR; stdcall;
{$EXTERNALSYM SetClassLongPtrA}
function SetClassLongPtrA(hWnd: HWND; nIndex: Integer; dwNewLong: LONG_PTR): ULONG_PTR; stdcall;
{$EXTERNALSYM GetClassLongPtrW}
function GetClassLongPtrW(hWnd: HWND; nIndex: Integer): ULONG_PTR; stdcall;
{$EXTERNALSYM SetClassLongPtrW}
function SetClassLongPtrW(hWnd: HWND; nIndex: Integer; dwNewLong: LONG_PTR): ULONG_PTR; stdcall;

{$ENDIF interface_part} ////////////////////////////////////////////////////////

{$IFDEF implementation_part} ///////////////////////////////////////////////////
function AbortSystemShutdown; external advapi32 name 'AbortSystemShutdownW';
function AccessCheckAndAuditAlarm; external advapi32 name 'AccessCheckAndAuditAlarmW';
{$IFDEF _D4orHigher}
function AccessCheckByTypeAndAuditAlarm; external advapi32 name 'AccessCheckByTypeAndAuditAlarmW';
function AccessCheckByTypeResultListAndAuditAlarm; external advapi32 name 'AccessCheckByTypeResultListAndAuditAlarmW';
{$ENDIF}
function BackupEventLog; external advapi32 name 'BackupEventLogW';
function ClearEventLog; external advapi32 name 'ClearEventLogW';
function CreateProcessAsUser; external advapi32 name 'CreateProcessAsUserW';
function GetCurrentHwProfile; external advapi32 name 'GetCurrentHwProfileW';
function GetFileSecurity; external advapi32 name 'GetFileSecurityW';
function GetUserName; external advapi32 name 'GetUserNameW';
function InitiateSystemShutdown; external advapi32 name 'InitiateSystemShutdownW';
function LogonUser; external advapi32 name 'LogonUserW';
function LookupAccountName; external advapi32 name 'LookupAccountNameW';
function LookupAccountSid; external advapi32 name 'LookupAccountSidW';
function LookupPrivilegeDisplayName; external advapi32 name 'LookupPrivilegeDisplayNameW';
function LookupPrivilegeName; external advapi32 name 'LookupPrivilegeNameW';
function LookupPrivilegeValue; external advapi32 name 'LookupPrivilegeValueW';
function ObjectCloseAuditAlarm; external advapi32 name 'ObjectCloseAuditAlarmW';
function ObjectDeleteAuditAlarm; external advapi32 name 'ObjectDeleteAuditAlarmW';
function ObjectOpenAuditAlarm; external advapi32 name 'ObjectOpenAuditAlarmW';
function ObjectPrivilegeAuditAlarm; external advapi32 name 'ObjectPrivilegeAuditAlarmW';
function OpenBackupEventLog; external advapi32 name 'OpenBackupEventLogW';
function OpenEventLog; external advapi32 name 'OpenEventLogW';
function PrivilegedServiceAuditAlarm; external advapi32 name 'PrivilegedServiceAuditAlarmW';
function ReadEventLog; external advapi32 name 'ReadEventLogW';
function RegConnectRegistry; external advapi32 name 'RegConnectRegistryW';
function RegCreateKey; external advapi32 name 'RegCreateKeyW';
function RegCreateKeyEx; external advapi32 name 'RegCreateKeyExW';
function RegDeleteKey; external advapi32 name 'RegDeleteKeyW';
function RegDeleteValue; external advapi32 name 'RegDeleteValueW';
function RegEnumKeyEx; external advapi32 name 'RegEnumKeyExW';
function RegEnumKey; external advapi32 name 'RegEnumKeyW';
function RegEnumValue; external advapi32 name 'RegEnumValueW';
function RegLoadKey; external advapi32 name 'RegLoadKeyW';
function RegOpenKey; external advapi32 name 'RegOpenKeyW';
function RegOpenKeyEx; external advapi32 name 'RegOpenKeyExW';
function RegQueryInfoKey; external advapi32 name 'RegQueryInfoKeyW';
function RegQueryMultipleValues; external advapi32 name 'RegQueryMultipleValuesW';
function RegQueryValue; external advapi32 name 'RegQueryValueW';
function RegQueryValueEx; external advapi32 name 'RegQueryValueExW';
function RegReplaceKey; external advapi32 name 'RegReplaceKeyW';
function RegRestoreKey; external advapi32 name 'RegRestoreKeyW';
function RegSaveKey; external advapi32 name 'RegSaveKeyW';
function RegSetValue; external advapi32 name 'RegSetValueW';
function RegSetValueEx; external advapi32 name 'RegSetValueExW';
function RegUnLoadKey; external advapi32 name 'RegUnLoadKeyW';
function RegisterEventSource; external advapi32 name 'RegisterEventSourceW';
function ReportEvent; external advapi32 name 'ReportEventW';
function SetFileSecurity; external advapi32 name 'SetFileSecurityW';
function AddAtom; external kernel32 name 'AddAtomW';
function BeginUpdateResource; external kernel32 name 'BeginUpdateResourceW';
function BuildCommDCB; external kernel32 name 'BuildCommDCBW';
function BuildCommDCBAndTimeouts; external kernel32 name 'BuildCommDCBAndTimeoutsW';
function CallNamedPipe; external kernel32 name 'CallNamedPipeW';
function CommConfigDialog; external kernel32 name 'CommConfigDialogW';
function CompareString; external kernel32 name 'CompareStringW';
function CopyFile; external kernel32 name 'CopyFileW';
function CopyFileEx; external kernel32 name 'CopyFileExW';
function CreateDirectory; external kernel32 name 'CreateDirectoryW';
function CreateDirectoryEx; external kernel32 name 'CreateDirectoryExW';
function CreateEvent; external kernel32 name 'CreateEventW';
function CreateFile; external kernel32 name 'CreateFileW';
function CreateFileMapping; external kernel32 name 'CreateFileMappingW';
function CreateHardLink; external kernel32 name 'CreateHardLinkW';
function CreateMailslot; external kernel32 name 'CreateMailslotW';
function CreateNamedPipe; external kernel32 name 'CreateNamedPipeW';
function CreateProcess; external kernel32 name 'CreateProcessW';
function CreateSemaphore; external kernel32 name 'CreateSemaphoreW';
function CreateWaitableTimer; external kernel32 name 'CreateWaitableTimerW';
function DefineDosDevice; external kernel32 name 'DefineDosDeviceW';
function DeleteFile; external kernel32 name 'DeleteFileW';
function EndUpdateResource; external kernel32 name 'EndUpdateResourceW';
function EnumCalendarInfo; external kernel32 name 'EnumCalendarInfoW';
function EnumDateFormats; external kernel32 name 'EnumDateFormatsW';
function EnumResourceLanguages; external kernel32 name 'EnumResourceLanguagesW';
function EnumResourceNames; external kernel32 name 'EnumResourceNamesW';
function EnumResourceTypes; external kernel32 name 'EnumResourceTypesW';
function EnumSystemCodePages; external kernel32 name 'EnumSystemCodePagesW';
function EnumSystemLocales; external kernel32 name 'EnumSystemLocalesW';
function EnumTimeFormats; external kernel32 name 'EnumTimeFormatsW';
function ExpandEnvironmentStrings; external kernel32 name 'ExpandEnvironmentStringsW';
procedure FatalAppExit; external kernel32 name 'FatalAppExitW';
function FillConsoleOutputCharacter; external kernel32 name 'FillConsoleOutputCharacterW';
function FindAtom; external kernel32 name 'FindAtomW';
function FindFirstChangeNotification; external kernel32 name 'FindFirstChangeNotificationW';
function FindFirstFile; external kernel32 name 'FindFirstFileW';
function FindFirstFileEx; external kernel32 name 'FindFirstFileExW';
function FindNextFile; external kernel32 name 'FindNextFileW';
function FindResource; external kernel32 name 'FindResourceW';
function FindResourceEx; external kernel32 name 'FindResourceExW';
function FoldString; external kernel32 name 'FoldStringW';
function FormatMessage; external kernel32 name 'FormatMessageW';
function FreeEnvironmentStrings; external kernel32 name 'FreeEnvironmentStringsW';
function GetAtomName; external kernel32 name 'GetAtomNameW';
function GetBinaryType; external kernel32 name 'GetBinaryTypeW';
function GetCommandLine; external kernel32 name 'GetCommandLineW';
function GetCompressedFileSize; external kernel32 name 'GetCompressedFileSizeW';
function GetComputerName; external kernel32 name 'GetComputerNameW';
function GetConsoleTitle; external kernel32 name 'GetConsoleTitleW';
function GetCurrencyFormat; external kernel32 name 'GetCurrencyFormatW';
function GetCurrentDirectory; external kernel32 name 'GetCurrentDirectoryW';
function GetDateFormat; external kernel32 name 'GetDateFormatW';
function GetDefaultCommConfig; external kernel32 name 'GetDefaultCommConfigW';
function GetDiskFreeSpace; external kernel32 name 'GetDiskFreeSpaceW';
function GetDiskFreeSpaceEx; external kernel32 name 'GetDiskFreeSpaceExW';
function GetDriveType; external kernel32 name 'GetDriveTypeW';
function GetEnvironmentStrings; external kernel32 name 'GetEnvironmentStringsW';
function GetEnvironmentVariable(lpName: PKOLChar; lpBuffer: PKOLChar;
  nSize: DWORD): DWORD; external kernel32 name 'GetEnvironmentVariableW';
function GetFileAttributes; external kernel32 name 'GetFileAttributesW';
function GetFileAttributesEx; external kernel32 name 'GetFileAttributesExW';
function GetFullPathName; external kernel32 name 'GetFullPathNameW';
function GetLocaleInfo; external kernel32 name 'GetLocaleInfoW';
function GetLogicalDriveStrings; external kernel32 name 'GetLogicalDriveStringsW';
function GetModuleFileName; external kernel32 name 'GetModuleFileNameW';
function GetModuleHandle; external kernel32 name 'GetModuleHandleW';
function GetNamedPipeHandleState; external kernel32 name 'GetNamedPipeHandleStateW';
function GetNumberFormat; external kernel32 name 'GetNumberFormatW';
function GetPrivateProfileInt; external kernel32 name 'GetPrivateProfileIntW';
function GetPrivateProfileSection; external kernel32 name 'GetPrivateProfileSectionW';
function GetPrivateProfileSectionNames; external kernel32 name 'GetPrivateProfileSectionNamesW';
function GetPrivateProfileString; external kernel32 name 'GetPrivateProfileStringW';
function GetProfileInt; external kernel32 name 'GetProfileIntW';
function GetProfileSection; external kernel32 name 'GetProfileSectionW';
function GetProfileString; external kernel32 name 'GetProfileStringW';
function GetShortPathName; external kernel32 name 'GetShortPathNameW';
procedure GetStartupInfo; external kernel32 name 'GetStartupInfoW';
function GetStringTypeEx; external kernel32 name 'GetStringTypeExW';
function GetSystemDirectory; external kernel32 name 'GetSystemDirectoryW';
function GetTempFileName; external kernel32 name 'GetTempFileNameW';
function GetTempPath; external kernel32 name 'GetTempPathW';
function GetTimeFormat; external kernel32 name 'GetTimeFormatW';
function GetVersionEx; external kernel32 name 'GetVersionExW';
function GetVolumeInformation; external kernel32 name 'GetVolumeInformationW';
function GetWindowsDirectory; external kernel32 name 'GetWindowsDirectoryW';
function GlobalAddAtom; external kernel32 name 'GlobalAddAtomW';
function GlobalFindAtom; external kernel32 name 'GlobalFindAtomW';
function GlobalGetAtomName; external kernel32 name 'GlobalGetAtomNameW';
function IsBadStringPtr; external kernel32 name 'IsBadStringPtrW';
function LCMapString; external kernel32 name 'LCMapStringW';
function LoadLibrary; external kernel32 name 'LoadLibraryW';
function LoadLibraryEx; external kernel32 name 'LoadLibraryExW';
function MoveFile; external kernel32 name 'MoveFileW';
function MoveFileEx; external kernel32 name 'MoveFileExW';
function MoveFileWithProgress; external kernel32 name 'MoveFileWithProgressW';
function OpenEvent; external kernel32 name 'OpenEventW';
function OpenFileMapping; external kernel32 name 'OpenFileMappingW';
function OpenMutex; external kernel32 name 'OpenMutexW';
function OpenSemaphore; external kernel32 name 'OpenSemaphoreW';
function OpenWaitableTimer; external kernel32 name 'OpenWaitableTimerW';
procedure OutputDebugString; external kernel32 name 'OutputDebugStringW';
function PeekConsoleInput; external kernel32 name 'PeekConsoleInputW';
function QueryDosDevice; external kernel32 name 'QueryDosDeviceW';
{$IFDEF _D4orHigher}
function QueryRecoveryAgents; external kernel32 name 'QueryRecoveryAgentsW';
{$ENDIF}
function ReadConsole; external kernel32 name 'ReadConsoleW';
function ReadConsoleInput; external kernel32 name 'ReadConsoleInputW';
function ReadConsoleOutput; external kernel32 name 'ReadConsoleOutputW';
function ReadConsoleOutputCharacter; external kernel32 name 'ReadConsoleOutputCharacterW';
function RemoveDirectory; external kernel32 name 'RemoveDirectoryW';
function ScrollConsoleScreenBuffer; external kernel32 name 'ScrollConsoleScreenBufferW';
function SearchPath; external kernel32 name 'SearchPathW';
function SetComputerName; external kernel32 name 'SetComputerNameW';
function SetConsoleTitle; external kernel32 name 'SetConsoleTitleW';
function SetCurrentDirectory; external kernel32 name 'SetCurrentDirectoryW';
function SetDefaultCommConfig; external kernel32 name 'SetDefaultCommConfigW';
function SetEnvironmentVariable; external kernel32 name 'SetEnvironmentVariableW';
function SetFileAttributes; external kernel32 name 'SetFileAttributesW';
function SetLocaleInfo; external kernel32 name 'SetLocaleInfoW';
function SetVolumeLabel; external kernel32 name 'SetVolumeLabelW';
function UpdateResource; external kernel32 name 'UpdateResourceW';
function VerLanguageName; external kernel32 name 'VerLanguageNameW';
function WaitNamedPipe; external kernel32 name 'WaitNamedPipeW';
function WriteConsole; external kernel32 name 'WriteConsoleW';
function WriteConsoleInput; external kernel32 name 'WriteConsoleInputW';
function WriteConsoleOutput; external kernel32 name 'WriteConsoleOutputW';
function WriteConsoleOutputCharacter; external kernel32 name 'WriteConsoleOutputCharacterW';
function WritePrivateProfileSection; external kernel32 name 'WritePrivateProfileSectionW';
function WritePrivateProfileString; external kernel32 name 'WritePrivateProfileStringW';
function WriteProfileSection; external kernel32 name 'WriteProfileSectionW';
function WriteProfileString; external kernel32 name 'WriteProfileStringW';
function lstrcat; external kernel32 name 'lstrcatW';
function lstrcmp; external kernel32 name 'lstrcmpW';
function lstrcmpi; external kernel32 name 'lstrcmpiW';
function lstrcpy; external kernel32 name 'lstrcpyW';
function lstrcpyn; external kernel32 name 'lstrcpynW';
function lstrlen; external kernel32 name 'lstrlenW';
function MultinetGetConnectionPerformance; external mpr name 'MultinetGetConnectionPerformanceW';
function WNetAddConnection2; external mpr name 'WNetAddConnection2W';
function WNetAddConnection3; external mpr name 'WNetAddConnection3W';
function WNetAddConnection; external mpr name 'WNetAddConnectionW';
function WNetCancelConnection2; external mpr name 'WNetCancelConnection2W';
function WNetCancelConnection; external mpr name 'WNetCancelConnectionW';
function WNetConnectionDialog1; external mpr name 'WNetConnectionDialog1W';
function WNetDisconnectDialog1; external mpr name 'WNetDisconnectDialog1W';
function WNetEnumResource; external mpr name 'WNetEnumResourceW';
function WNetGetConnection; external mpr name 'WNetGetConnectionW';
function WNetGetLastError; external mpr name 'WNetGetLastErrorW';
function WNetGetNetworkInformation; external mpr name 'WNetGetNetworkInformationW';
function WNetGetProviderName; external mpr name 'WNetGetProviderNameW';
function WNetGetResourceParent; external mpr name 'WNetGetResourceParentW';
function WNetGetUniversalName; external mpr name 'WNetGetUniversalNameW';
function WNetGetUser; external mpr name 'WNetGetUserW';
function WNetOpenEnum; external mpr name 'WNetOpenEnumW';
function WNetSetConnection; external mpr name 'WNetSetConnectionW';
function WNetUseConnection; external mpr name 'WNetUseConnectionW';
function GetFileVersionInfo; external version name 'GetFileVersionInfoW';
function GetFileVersionInfoSize; external version name 'GetFileVersionInfoSizeW';
function VerFindFile; external version name 'VerFindFileW';
function VerInstallFile; external version name 'VerInstallFileW';
function VerQueryValue; external version name 'VerQueryValueW';
function GetPrivateProfileStruct; external kernel32 name 'GetPrivateProfileStructW';
function WritePrivateProfileStruct; external kernel32 name 'WritePrivateProfileStructW';
function AddFontResource; external gdi32 name 'AddFontResourceW';
{$IFDEF _D4orHigher}
function AddFontResourceEx; external gdi32 name 'AddFontResourceExW';
{$ENDIF}
function CopyEnhMetaFile; external gdi32 name 'CopyEnhMetaFileW';
function CopyMetaFile; external gdi32 name 'CopyMetaFileW';
function CreateColorSpace; external gdi32 name 'CreateColorSpaceW';
function CreateDC; external gdi32 name 'CreateDCW';
function CreateEnhMetaFile; external gdi32 name 'CreateEnhMetaFileW';
function CreateFont; external gdi32 name 'CreateFontW';
function CreateFontIndirect; external gdi32 name 'CreateFontIndirectW';
{$IFDEF _D4orHigher}
function CreateFontIndirectEx; external gdi32 name 'CreateFontIndirectExW';
{$ENDIF}
function CreateIC; external gdi32 name 'CreateICW';
function CreateMetaFile; external gdi32 name 'CreateMetaFileW';
function CreateScalableFontResource; external gdi32 name 'CreateScalableFontResourceW';
function DeviceCapabilities; external gdi32 name 'DeviceCapabilitiesW';
function EnumFontFamilies; external gdi32 name 'EnumFontFamiliesW';
function EnumFontFamiliesEx; external gdi32 name 'EnumFontFamiliesExW';
function EnumFonts; external gdi32 name 'EnumFontsW';
function EnumICMProfiles; external gdi32 name 'EnumICMProfilesW';
function ExtTextOut; external gdi32 name 'ExtTextOutW';
function GetCharABCWidths; external gdi32 name 'GetCharABCWidthsW';
function GetCharABCWidthsFloat; external gdi32 name 'GetCharABCWidthsFloatW';
function GetCharWidth32; external gdi32 name 'GetCharWidth32W';
function GetCharWidth; external gdi32 name 'GetCharWidthW';
function GetCharWidthFloat; external gdi32 name 'GetCharWidthFloatW';
function GetCharacterPlacement; external gdi32 name 'GetCharacterPlacementW';
function GetEnhMetaFile; external gdi32 name 'GetEnhMetaFileW';
function GetEnhMetaFileDescription; external gdi32 name 'GetEnhMetaFileDescriptionW';
function GetGlyphIndices; external gdi32 name 'GetGlyphIndicesW';
function GetGlyphOutline; external gdi32 name 'GetGlyphOutlineW';
function GetICMProfile; external gdi32 name 'GetICMProfileW';
function GetLogColorSpace; external gdi32 name 'GetLogColorSpaceW';
function GetMetaFile; external gdi32 name 'GetMetaFileW';
function GetObject; external gdi32 name 'GetObjectW';
function GetOutlineTextMetrics; external gdi32 name 'GetOutlineTextMetricsW';
function GetTextExtentExPoint; external gdi32 name 'GetTextExtentExPointW';
function GetTextExtentPoint32; external gdi32 name 'GetTextExtentPoint32W';
function GetTextExtentPoint; external gdi32 name 'GetTextExtentPointW';
function GetTextFace; external gdi32 name 'GetTextFaceW';
function GetTextMetrics; external gdi32 name 'GetTextMetricsW';
function PolyTextOut; external gdi32 name 'PolyTextOutW';
function RemoveFontResource; external gdi32 name 'RemoveFontResourceW';
{$IFDEF _D4orHigher}
function RemoveFontResourceEx; external gdi32 name 'RemoveFontResourceExW';
{$ENDIF}
function ResetDC; external gdi32 name 'ResetDCW';
function SetICMProfile; external gdi32 name 'SetICMProfileW';
function StartDoc; external gdi32 name 'StartDocW';
function TextOut; external gdi32 name 'TextOutW';
function UpdateICMRegKey; external gdi32 name 'UpdateICMRegKeyW';
function wglUseFontBitmaps; external opengl32 name 'wglUseFontBitmapsW';
function wglUseFontOutlines; external opengl32 name 'wglUseFontOutlinesW';
function AnsiToOem; external user32 name 'CharToOemW';
function AnsiToOemBuff; external user32 name 'CharToOemBuffW';
function AnsiToOemBuffA; external user32 name 'CharToOemBuffA';
function AnsiUpper; external user32 name 'CharUpperW';
function AnsiUpperBuff; external user32 name 'CharUpperBuffW';
function AnsiLower; external user32 name 'CharLowerW';
function AnsiLowerBuff; external user32 name 'CharLowerBuffW';
function AnsiNext; external user32 name 'CharNextW';
function AnsiPrev; external user32 name 'CharPrevW';
function AppendMenu; external user32 name 'AppendMenuW';
//function BroadcastSystemMessage; external user32 name 'BroadcastSystemMessageW';
//function BroadcastSystemMessageW; external user32 name 'BroadcastSystemMessageW';
function CallMsgFilter; external user32 name 'CallMsgFilterW';
function CallWindowProc; external user32 name 'CallWindowProcW';
function ChangeDisplaySettings; external user32 name 'ChangeDisplaySettingsW';
function ChangeDisplaySettingsEx; external user32 name 'ChangeDisplaySettingsExW';
function ChangeMenu; external user32 name 'ChangeMenuW';
function CharLower; external user32 name 'CharLowerW';
function CharLowerBuff; external user32 name 'CharLowerBuffW';
function CharNext; external user32 name 'CharNextW';
function CharNextEx; external user32 name 'CharNextExW';
function CharPrev; external user32 name 'CharPrevW';
function CharPrevEx; external user32 name 'CharPrevExW';
function CharToOem; external user32 name 'CharToOemW';
function CharToOemBuff; external user32 name 'CharToOemBuffW';
function CharUpper; external user32 name 'CharUpperW';
function CharUpperBuff; external user32 name 'CharUpperBuffW';
function CopyAcceleratorTable; external user32 name 'CopyAcceleratorTableW';
function CreateAcceleratorTable; external user32 name 'CreateAcceleratorTableW';
function CreateDesktop; external user32 name 'CreateDesktopW';
function CreateDialogIndirectParam; external user32 name 'CreateDialogIndirectParamW';
function CreateDialogParam; external user32 name 'CreateDialogParamW';
function CreateMDIWindow; external user32 name 'CreateMDIWindowW';
function CreateWindowEx; external user32 name 'CreateWindowExW';
function CreateWindowStation; external user32 name 'CreateWindowStationW';
function DefDlgProc; external user32 name 'DefDlgProcW';
function DefFrameProc; external user32 name 'DefFrameProcW';
function DefMDIChildProc; external user32 name 'DefMDIChildProcW';
function DefWindowProc; external user32 name 'DefWindowProcW';
function DialogBoxIndirectParam; external user32 name 'DialogBoxIndirectParamW';
function DialogBoxParam; external user32 name 'DialogBoxParamW';
function DispatchMessage; external user32 name 'DispatchMessageW';
function DlgDirList; external user32 name 'DlgDirListW';
function DlgDirListComboBox; external user32 name 'DlgDirListComboBoxW';
function DlgDirSelectComboBoxEx; external user32 name 'DlgDirSelectComboBoxExW';
function DlgDirSelectEx; external user32 name 'DlgDirSelectExW';
function DrawState; external user32 name 'DrawStateW';
function DrawText; external user32 name 'DrawTextW';
function DrawTextEx; external user32 name 'DrawTextExW';
function EnumDesktops; external user32 name 'EnumDesktopsW';
function EnumDisplaySettings; external user32 name 'EnumDisplaySettingsW';
{$IFDEF _D4orHigher}
function EnumDisplayDevices; external user32 name 'EnumDisplayDevicesW';
{$ENDIF}
function EnumProps; external user32 name 'EnumPropsW';
function EnumPropsEx; external user32 name 'EnumPropsExW';
function EnumWindowStations; external user32 name 'EnumWindowStationsW';
function FindWindow; external user32 name 'FindWindowW';
function FindWindowEx; external user32 name 'FindWindowExW';
{$IFDEF _D4orHigher}
function GetAltTabInfo; external user32 name 'GetAltTabInfoW';
{$ENDIF}
function GetClassInfo; external user32 name 'GetClassInfoW';
function GetClassInfoEx; external user32 name 'GetClassInfoExW';
function GetClassLong; external user32 name 'GetClassLongW';
function GetClassName; external user32 name 'GetClassNameW';
function GetClipboardFormatName; external user32 name 'GetClipboardFormatNameW';
function GetDlgItemText; external user32 name 'GetDlgItemTextW';
function GetKeyNameText; external user32 name 'GetKeyNameTextW';
function GetKeyboardLayoutName; external user32 name 'GetKeyboardLayoutNameW';
function GetMenuItemInfo; external user32 name 'GetMenuItemInfoW';
function GetMenuString; external user32 name 'GetMenuStringW';
function GetMessage; external user32 name 'GetMessageW';
function GetProp; external user32 name 'GetPropW';
function GetTabbedTextExtent; external user32 name 'GetTabbedTextExtentW';
function GetUserObjectInformation; external user32 name 'GetUserObjectInformationW';
function GetWindowLong; external user32 name 'GetWindowLongW';
function GetWindowModuleFileName; external user32 name 'GetWindowModuleFileNameW';
function GetWindowText; external user32 name 'GetWindowTextW';
function GetWindowTextLength; external user32 name 'GetWindowTextLengthW';
function GrayString; external user32 name 'GrayStringW';
function InsertMenu; external user32 name 'InsertMenuW';
function InsertMenuItem; external user32 name 'InsertMenuItemW';
function IsCharAlpha; external user32 name 'IsCharAlphaW';
function IsCharAlphaNumeric; external user32 name 'IsCharAlphaNumericW';
function IsCharLower; external user32 name 'IsCharLowerW';
function IsCharUpper; external user32 name 'IsCharUpperW';
function IsDialogMessage; external user32 name 'IsDialogMessageW';
function LoadAccelerators; external user32 name 'LoadAcceleratorsW';
function LoadBitmap; external user32 name 'LoadBitmapW';
function LoadCursor; external user32 name 'LoadCursorW';
function LoadCursorFromFile; external user32 name 'LoadCursorFromFileW';
function LoadIcon; external user32 name 'LoadIconW';
function LoadImage; external user32 name 'LoadImageW';
function LoadKeyboardLayout; external user32 name 'LoadKeyboardLayoutW';
function LoadMenu; external user32 name 'LoadMenuW';
function LoadMenuIndirect; external user32 name 'LoadMenuIndirectW';
function LoadString; external user32 name 'LoadStringW';
function MapVirtualKey; external user32 name 'MapVirtualKeyW';
function MapVirtualKeyEx; external user32 name 'MapVirtualKeyExW';
function MessageBox; external user32 name 'MessageBoxW';
function MessageBoxEx; external user32 name 'MessageBoxExW';
function MessageBoxIndirect; external user32 name 'MessageBoxIndirectW';
function ModifyMenu; external user32 name 'ModifyMenuW';
function OemToAnsi; external user32 name 'OemToCharW';
function OemToAnsiBuff; external user32 name 'OemToCharBuffW';
function OemToChar; external user32 name 'OemToCharW';
function OemToCharBuff; external user32 name 'OemToCharBuffW';
function OpenDesktop; external user32 name 'OpenDesktopW';
function OpenWindowStation; external user32 name 'OpenWindowStationW';
function PeekMessage; external user32 name 'PeekMessageW';
function PostMessage; external user32 name 'PostMessageW';
function PostThreadMessage; external user32 name 'PostThreadMessageW';
function RealGetWindowClass; external user32 name 'RealGetWindowClassW';
function RegisterClass; external user32 name 'RegisterClassW';
function RegisterClassEx; external user32 name 'RegisterClassExW';
function RegisterClipboardFormat; external user32 name 'RegisterClipboardFormatW';
{$IFDEF _D4orHigher}
function RegisterDeviceNotification; external user32 name 'RegisterDeviceNotificationW';
{$ENDIF}
function RegisterWindowMessage; external user32 name 'RegisterWindowMessageW';
function RemoveProp; external user32 name 'RemovePropW';
function SendDlgItemMessage; external user32 name 'SendDlgItemMessageW';
function SendMessage; external user32 name 'SendMessageW';
function SendMessageCallback; external user32 name 'SendMessageCallbackW';
function SendMessageTimeout; external user32 name 'SendMessageTimeoutW';
function SendNotifyMessage; external user32 name 'SendNotifyMessageW';
function SetClassLong; external user32 name 'SetClassLongW';
function SetDlgItemText; external user32 name 'SetDlgItemTextW';
function SetMenuItemInfo; external user32 name 'SetMenuItemInfoW';
function SetProp; external user32 name 'SetPropW';
function SetUserObjectInformation; external user32 name 'SetUserObjectInformationW';
function SetWindowLong; external user32 name 'SetWindowLongW';
function SetWindowText; external user32 name 'SetWindowTextW';
function SetWindowsHook; external user32 name 'SetWindowsHookW';
function SetWindowsHookEx; external user32 name 'SetWindowsHookExW';
function SystemParametersInfo; external user32 name 'SystemParametersInfoW';
function TabbedTextOut; external user32 name 'TabbedTextOutW';
function TranslateAccelerator; external user32 name 'TranslateAcceleratorW';
function UnregisterClass; external user32 name 'UnregisterClassW';
function VkKeyScan; external user32 name 'VkKeyScanW';
function VkKeyScanEx; external user32 name 'VkKeyScanExW';
function WinHelp; external user32 name 'WinHelpW';
function wsprintf; external user32 name 'wsprintfW';
function wvsprintf; external user32 name 'wvsprintfW';
// NT 4.0 bug workaround - NT 4.0 doesn't test bInitialOwner for zero/nonzero, it tests for 1
function _CreateMutex(lpMutexAttributes: PSecurityAttributes;
  bInitialOwner: Integer; lpName: PWideChar): THandle; stdcall;
  external kernel32 name 'CreateMutexW';
function CreateMutex(lpMutexAttributes: PSecurityAttributes; bInitialOwner: BOOL; lpName: PWideChar): THandle;
begin
  Result := _CreateMutex(lpMutexAttributes, Integer(Boolean(bInitialOwner)), lpName);
end;
{$IFDEF WIN64}
function GetWindowLongPtr; external user32 name 'GetWindowLongPtrW';
function SetWindowLongPtr; external user32 name 'SetWindowLongPtrW';
function GetClassLongPtr; external user32 name 'GetClassLongPtrW';
function SetClassLongPtr; external user32 name 'SetClassLongPtrW';
function GetWindowLongPtrA; external user32 name 'GetWindowLongPtrA';
function SetWindowLongPtrA; external user32 name 'SetWindowLongPtrA';
function GetClassLongPtrA; external user32 name 'GetClassLongPtrA';
function SetClassLongPtrA; external user32 name 'SetClassLongPtrA';
function GetWindowLongPtrW; external user32 name 'GetWindowLongPtrW';
function SetWindowLongPtrW; external user32 name 'SetWindowLongPtrW';
function GetClassLongPtrW; external user32 name 'GetClassLongPtrW';
function SetClassLongPtrW; external user32 name 'SetClassLongPtrW';
{$ELSE}
function GetWindowLongPtr; external user32 name 'GetWindowLongW';
function SetWindowLongPtr; external user32 name 'SetWindowLongW';
function GetClassLongPtr; external user32 name 'GetClassLongW';
function SetClassLongPtr; external user32 name 'SetClassLongW';
function GetWindowLongPtrA; external user32 name 'GetWindowLongA';
function SetWindowLongPtrA; external user32 name 'SetWindowLongA';
function GetClassLongPtrA; external user32 name 'GetClassLongA';
function SetClassLongPtrA; external user32 name 'SetClassLongA';
function GetWindowLongPtrW; external user32 name 'GetWindowLongW';
function SetWindowLongPtrW; external user32 name 'SetWindowLongW';
function GetClassLongPtrW; external user32 name 'GetClassLongW';
function SetClassLongPtrW; external user32 name 'SetClassLongW';
{$ENDIF}
{$ENDIF implementation_part} ///////////////////////////////////////////////////