-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwin32api.jl
11794 lines (10504 loc) · 349 KB
/
win32api.jl
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
const WINAPI_FAMILY_PC_APP = 2
const WINAPI_FAMILY_PHONE_APP = 3
const WINAPI_FAMILY_SYSTEM = 4
const WINAPI_FAMILY_SERVER = 5
const WINAPI_FAMILY_GAMES = 6
const WINAPI_FAMILY_DESKTOP_APP = 100
const STRICT = 1
const MAX_PATH = 260
const NULL = 0
const FALSE = 0
const TRUE = 1
const WPARAM = UInt
const LPARAM = Int
const LRESULT = Int
const HGLOBAL = Ptr{Cvoid}
const HLOCAL = Ptr{Cvoid}
const GLOBALHANDLE = Ptr{Cvoid}
const LOCALHANDLE = Ptr{Cvoid}
const ATOM = Cushort
const HFILE = Cint
mutable struct FILETIME
dwLowDateTime::Culong
dwHighDateTime::Culong
end
mutable struct SECURITY_ATTRIBUTES
nLength::Culong
lpSecurityDescriptor::Ptr{Cvoid}
bInheritHandle::Cint
end
mutable struct SYSTEMTIME
wYear::Cushort
wMonth::Cushort
wDayOfWeek::Cushort
wDay::Cushort
wHour::Cushort
wMinute::Cushort
wSecond::Cushort
wMilliseconds::Cushort
end
mutable struct WIN32_FIND_DATAA
dwFileAttributes::Culong
ftCreationTime::FILETIME
ftLastAccessTime::FILETIME
ftLastWriteTime::FILETIME
nFileSizeHigh::Culong
nFileSizeLow::Culong
dwReserved0::Culong
dwReserved1::Culong
cFileName::SVector{ 260 ,Cchar}
cAlternateFileName::SVector{ 14 ,Cchar}
dwFileType::Culong
dwCreatorType::Culong
wFinderFlags::Cushort
end
mutable struct WIN32_FIND_DATAW
dwFileAttributes::Culong
ftCreationTime::FILETIME
ftLastAccessTime::FILETIME
ftLastWriteTime::FILETIME
nFileSizeHigh::Culong
nFileSizeLow::Culong
dwReserved0::Culong
dwReserved1::Culong
cFileName::SVector{ 260 ,Cwchar_t}
cAlternateFileName::SVector{ 14 ,Cwchar_t}
dwFileType::Culong
dwCreatorType::Culong
wFinderFlags::Cushort
end
const WIN32_FIND_DATA = WIN32_FIND_DATAW
const LPWIN32_FIND_DATA = Ptr{WIN32_FIND_DATAW}
@enum FINDEX_INFO_LEVELS::Int32 FindExInfoStandard=0 FindExInfoBasic=1 FindExInfoMaxInfoLevel=2
@enum FINDEX_SEARCH_OPS::Int32 FindExSearchNameMatch=0 FindExSearchLimitToDirectories=1 FindExSearchLimitToDevices=2 FindExSearchMaxSearchOp=3
@enum READ_DIRECTORY_NOTIFY_INFORMATION_CLASS::Int32 ReadDirectoryNotifyInformation=1 ReadDirectoryNotifyExtendedInformation=2
@enum GET_FILEEX_INFO_LEVELS::Int32 GetFileExInfoStandard=0 GetFileExMaxInfoLevel=1
@enum FILE_INFO_BY_HANDLE_CLASS::Int32 FileBasicInfo=0 FileStandardInfo=1 FileNameInfo=2 FileRenameInfo=3 FileDispositionInfo=4 FileAllocationInfo=5 FileEndOfFileInfo=6 FileStreamInfo=7 FileCompressionInfo=8 FileAttributeTagInfo=9 FileIdBothDirectoryInfo=10 FileIdBothDirectoryRestartInfo=11 FileIoPriorityHintInfo=12 FileRemoteProtocolInfo=13 FileFullDirectoryInfo=14 FileFullDirectoryRestartInfo=15 FileStorageInfo=16 FileAlignmentInfo=17 FileIdInfo=18 FileIdExtdDirectoryInfo=19 FileIdExtdDirectoryRestartInfo=20 FileDispositionInfoEx=21 FileRenameInfoEx=22 FileCaseSensitiveInfo=23 FileNormalizedNameInfo=24 MaximumFileInfoByHandleClass=25
const EXCEPTION_DEBUG_EVENT = 1
const CREATE_THREAD_DEBUG_EVENT = 2
const CREATE_PROCESS_DEBUG_EVENT = 3
const EXIT_THREAD_DEBUG_EVENT = 4
const EXIT_PROCESS_DEBUG_EVENT = 5
const LOAD_DLL_DEBUG_EVENT = 6
const UNLOAD_DLL_DEBUG_EVENT = 7
const OUTPUT_DEBUG_STRING_EVENT = 8
const RIP_EVENT = 9
mutable struct EXIT_THREAD_DEBUG_INFO
dwExitCode::Culong
end
mutable struct EXIT_PROCESS_DEBUG_INFO
dwExitCode::Culong
end
mutable struct LOAD_DLL_DEBUG_INFO
hFile::Ptr{Cvoid}
lpBaseOfDll::Ptr{Cvoid}
dwDebugInfoFileOffset::Culong
nDebugInfoSize::Culong
lpImageName::Ptr{Cvoid}
fUnicode::Cushort
end
mutable struct UNLOAD_DLL_DEBUG_INFO
lpBaseOfDll::Ptr{Cvoid}
end
mutable struct OUTPUT_DEBUG_STRING_INFO
lpDebugStringData::Ptr{Cchar}
fUnicode::Cushort
nDebugStringLength::Cushort
end
mutable struct RIP_INFO
dwError::Culong
dwType::Culong
end
mutable struct PROCESS_INFORMATION
hProcess::Ptr{Cvoid}
hThread::Ptr{Cvoid}
dwProcessId::Culong
dwThreadId::Culong
end
mutable struct STARTUPINFOA
cb::Culong
lpReserved::Ptr{Cchar}
lpDesktop::Ptr{Cchar}
lpTitle::Ptr{Cchar}
dwX::Culong
dwY::Culong
dwXSize::Culong
dwYSize::Culong
dwXCountChars::Culong
dwYCountChars::Culong
dwFillAttribute::Culong
dwFlags::Culong
wShowWindow::Cushort
cbReserved2::Cushort
lpReserved2::Ptr{Cuchar}
hStdInput::Ptr{Cvoid}
hStdOutput::Ptr{Cvoid}
hStdError::Ptr{Cvoid}
end
mutable struct STARTUPINFOW
cb::Culong
lpReserved::Ptr{Cwchar_t}
lpDesktop::Ptr{Cwchar_t}
lpTitle::Ptr{Cwchar_t}
dwX::Culong
dwY::Culong
dwXSize::Culong
dwYSize::Culong
dwXCountChars::Culong
dwYCountChars::Culong
dwFillAttribute::Culong
dwFlags::Culong
wShowWindow::Cushort
cbReserved2::Cushort
lpReserved2::Ptr{Cuchar}
hStdInput::Ptr{Cvoid}
hStdOutput::Ptr{Cvoid}
hStdError::Ptr{Cvoid}
end
const STARTUPINFO = STARTUPINFOW
const LPSTARTUPINFO = Ptr{STARTUPINFOW}
function GetProcessTimes( hProcess::Ptr{Cvoid}, lpCreationTime::Ptr{FILETIME}, lpExitTime::Ptr{FILETIME}, lpKernelTime::Ptr{FILETIME}, lpUserTime::Ptr{FILETIME} )::Cint
ccall( (:GetProcessTimes, "kernel32"), stdcall, Cint,
( Ptr{Cvoid}, Ptr{FILETIME}, Ptr{FILETIME}, Ptr{FILETIME}, Ptr{FILETIME}, ),
hProcess, lpCreationTime, lpExitTime, lpKernelTime, lpUserTime )
end
function GetCurrentProcess( )::Ptr{Cvoid}
ccall( (:GetCurrentProcess, "kernel32"), stdcall, Ptr{Cvoid},
( ),
)
end
function GetCurrentProcessId( )::Culong
ccall( (:GetCurrentProcessId, "kernel32"), stdcall, Culong,
( ),
)
end
function ExitProcess( uExitCode::UInt32 )::Cvoid
ccall( (:ExitProcess, "kernel32"), stdcall, Cvoid,
( UInt32, ),
uExitCode )
end
function TerminateProcess( hProcess::Ptr{Cvoid}, uExitCode::UInt32 )::Cint
ccall( (:TerminateProcess, "kernel32"), stdcall, Cint,
( Ptr{Cvoid}, UInt32, ),
hProcess, uExitCode )
end
function GetExitCodeProcess( hProcess::Ptr{Cvoid}, lpExitCode::Ptr{Culong} )::Cint
ccall( (:GetExitCodeProcess, "kernel32"), stdcall, Cint,
( Ptr{Cvoid}, Ptr{Culong}, ),
hProcess, lpExitCode )
end
function SwitchToThread( )::Cint
ccall( (:SwitchToThread, "kernel32"), stdcall, Cint,
( ),
)
end
function GetCurrentThread( )::Ptr{Cvoid}
ccall( (:GetCurrentThread, "kernel32"), stdcall, Ptr{Cvoid},
( ),
)
end
function GetCurrentThreadId( )::Culong
ccall( (:GetCurrentThreadId, "kernel32"), stdcall, Culong,
( ),
)
end
function OpenThread( dwDesiredAccess::Culong, bInheritHandle::Cint, dwThreadId::Culong )::Ptr{Cvoid}
ccall( (:OpenThread, "kernel32"), stdcall, Ptr{Cvoid},
( Culong, Cint, Culong, ),
dwDesiredAccess, bInheritHandle, dwThreadId )
end
function SetThreadPriorityBoost( hThread::Ptr{Cvoid}, bDisablePriorityBoost::Cint )::Cint
ccall( (:SetThreadPriorityBoost, "kernel32"), stdcall, Cint,
( Ptr{Cvoid}, Cint, ),
hThread, bDisablePriorityBoost )
end
function GetThreadPriority( hThread::Ptr{Cvoid} )::Cint
ccall( (:GetThreadPriority, "kernel32"), stdcall, Cint,
( Ptr{Cvoid}, ),
hThread )
end
function ExitThread( dwExitCode::Culong )::Cvoid
ccall( (:ExitThread, "kernel32"), stdcall, Cvoid,
( Culong, ),
dwExitCode )
end
function TerminateThread( hThread::Ptr{Cvoid}, dwExitCode::Culong )::Cint
ccall( (:TerminateThread, "kernel32"), stdcall, Cint,
( Ptr{Cvoid}, Culong, ),
hThread, dwExitCode )
end
function SuspendThread( hThread::Ptr{Cvoid} )::Culong
ccall( (:SuspendThread, "kernel32"), stdcall, Culong,
( Ptr{Cvoid}, ),
hThread )
end
function ResumeThread( hThread::Ptr{Cvoid} )::Culong
ccall( (:ResumeThread, "kernel32"), stdcall, Culong,
( Ptr{Cvoid}, ),
hThread )
end
function TlsAlloc( )::Culong
ccall( (:TlsAlloc, "kernel32"), stdcall, Culong,
( ),
)
end
function TlsGetValue( dwTlsIndex::Culong )::Ptr{Cvoid}
ccall( (:TlsGetValue, "kernel32"), stdcall, Ptr{Cvoid},
( Culong, ),
dwTlsIndex )
end
function TlsSetValue( dwTlsIndex::Culong, lpTlsValue::Ptr{Cvoid} )::Cint
ccall( (:TlsSetValue, "kernel32"), stdcall, Cint,
( Culong, Ptr{Cvoid}, ),
dwTlsIndex, lpTlsValue )
end
function TlsFree( dwTlsIndex::Culong )::Cint
ccall( (:TlsFree, "kernel32"), stdcall, Cint,
( Culong, ),
dwTlsIndex )
end
function SetProcessShutdownParameters( dwLevel::Culong, dwFlags::Culong )::Cint
ccall( (:SetProcessShutdownParameters, "kernel32"), stdcall, Cint,
( Culong, Culong, ),
dwLevel, dwFlags )
end
function GetProcessVersion( ProcessId::Culong )::Culong
ccall( (:GetProcessVersion, "kernel32"), stdcall, Culong,
( Culong, ),
ProcessId )
end
function GetStartupInfoW( lpStartupInfo::Ptr{STARTUPINFOW} )::Cvoid
ccall( (:GetStartupInfoW, "kernel32"), stdcall, Cvoid,
( Ptr{STARTUPINFOW}, ),
lpStartupInfo )
end
function SetPriorityClass( hProcess::Ptr{Cvoid}, dwPriorityClass::Culong )::Cint
ccall( (:SetPriorityClass, "kernel32"), stdcall, Cint,
( Ptr{Cvoid}, Culong, ),
hProcess, dwPriorityClass )
end
function GetPriorityClass( hProcess::Ptr{Cvoid} )::Culong
ccall( (:GetPriorityClass, "kernel32"), stdcall, Culong,
( Ptr{Cvoid}, ),
hProcess )
end
function ProcessIdToSessionId( dwProcessId::Culong, pSessionId::Culong )::Cint
ccall( (:ProcessIdToSessionId, "kernel32"), stdcall, Cint,
( Culong, Culong, ),
dwProcessId, pSessionId )
end
function GetProcessId( Process::Ptr{Cvoid} )::Culong
ccall( (:GetProcessId, "kernel32"), stdcall, Culong,
( Ptr{Cvoid}, ),
Process )
end
function GetThreadId( Thread::Ptr{Cvoid} )::Culong
ccall( (:GetThreadId, "kernel32"), stdcall, Culong,
( Ptr{Cvoid}, ),
Thread )
end
function FlushProcessWriteBuffers( )::Cvoid
ccall( (:FlushProcessWriteBuffers, "kernel32"), stdcall, Cvoid,
( ),
)
end
function GetProcessIdOfThread( Thread::Ptr{Cvoid} )::Culong
ccall( (:GetProcessIdOfThread, "kernel32"), stdcall, Culong,
( Ptr{Cvoid}, ),
Thread )
end
function SetProcessAffinityUpdateMode( hProcess::Ptr{Cvoid}, dwFlags::Culong )::Cint
ccall( (:SetProcessAffinityUpdateMode, "kernel32"), stdcall, Cint,
( Ptr{Cvoid}, Culong, ),
hProcess, dwFlags )
end
function QueryProcessAffinityUpdateMode( hProcess::Ptr{Cvoid}, lpdwFlags::Ptr{Culong} )::Cint
ccall( (:QueryProcessAffinityUpdateMode, "kernel32"), stdcall, Cint,
( Ptr{Cvoid}, Ptr{Culong}, ),
hProcess, lpdwFlags )
end
function GetThreadTimes( hThread::Ptr{Cvoid}, lpCreationTime::Ptr{FILETIME}, lpExitTime::Ptr{FILETIME}, lpKernelTime::Ptr{FILETIME}, lpUserTime::Ptr{FILETIME} )::Cint
ccall( (:GetThreadTimes, "kernel32"), stdcall, Cint,
( Ptr{Cvoid}, Ptr{FILETIME}, Ptr{FILETIME}, Ptr{FILETIME}, Ptr{FILETIME}, ),
hThread, lpCreationTime, lpExitTime, lpKernelTime, lpUserTime )
end
function OpenProcess( dwDesiredAccess::Culong, bInheritHandle::Cint, dwProcessId::Culong )::Ptr{Cvoid}
ccall( (:OpenProcess, "kernel32"), stdcall, Ptr{Cvoid},
( Culong, Cint, Culong, ),
dwDesiredAccess, bInheritHandle, dwProcessId )
end
function IsProcessorFeaturePresent( ProcessorFeature::Culong )::Cint
ccall( (:IsProcessorFeaturePresent, "kernel32"), stdcall, Cint,
( Culong, ),
ProcessorFeature )
end
function GetProcessHandleCount( hProcess::Ptr{Cvoid}, pdwHandleCount::Ptr{Culong} )::Cint
ccall( (:GetProcessHandleCount, "kernel32"), stdcall, Cint,
( Ptr{Cvoid}, Ptr{Culong}, ),
hProcess, pdwHandleCount )
end
function GetCurrentProcessorNumber( )::Culong
ccall( (:GetCurrentProcessorNumber, "kernel32"), stdcall, Culong,
( ),
)
end
function SetProcessPriorityBoost( hProcess::Ptr{Cvoid}, bDisablePriorityBoost::Cint )::Cint
ccall( (:SetProcessPriorityBoost, "kernel32"), stdcall, Cint,
( Ptr{Cvoid}, Cint, ),
hProcess, bDisablePriorityBoost )
end
@enum THREAD_INFORMATION_CLASS::Int32 ThreadMemoryPriority=0 ThreadAbsoluteCpuPriority=1 ThreadDynamicCodePolicy=2 ThreadPowerThrottling=3 ThreadInformationClassMax=4
mutable struct MEMORY_PRIORITY_INFORMATION
MemoryPriority::Culong
end
const THREAD_POWER_THROTTLING_CURRENT_VERSION = 1
mutable struct THREAD_POWER_THROTTLING_STATE
Version::Culong
ControlMask::Culong
StateMask::Culong
end
function SetThreadIdealProcessor( hThread::Ptr{Cvoid}, dwIdealProcessor::Culong )::Culong
ccall( (:SetThreadIdealProcessor, "kernel32"), stdcall, Culong,
( Ptr{Cvoid}, Culong, ),
hThread, dwIdealProcessor )
end
@enum PROCESS_INFORMATION_CLASS::Int32 ProcessMemoryPriority=0 ProcessMemoryExhaustionInfo=1 ProcessAppMemoryInfo=2 ProcessInPrivateInfo=3 ProcessPowerThrottling=4 ProcessReservedValue1=5 ProcessTelemetryCoverageInfo=6 ProcessProtectionLevelInfo=7 ProcessLeapSecondInfo=8 ProcessInformationClassMax=9
mutable struct APP_MEMORY_INFORMATION
AvailableCommit::UInt64
PrivateCommitUsage::UInt64
PeakPrivateCommitUsage::UInt64
TotalCommitUsage::UInt64
end
const PME_CURRENT_VERSION = 1
@enum PROCESS_MEMORY_EXHAUSTION_TYPE::Int32 PMETypeFailFastOnCommitFailure=0 PMETypeMax=1
const PROCESS_POWER_THROTTLING_CURRENT_VERSION = 1
mutable struct PROCESS_POWER_THROTTLING_STATE
Version::Culong
ControlMask::Culong
StateMask::Culong
end
mutable struct PROCESS_LEAP_SECOND_INFO
Flags::Culong
Reserved::Culong
end
function GetProcessShutdownParameters( lpdwLevel::Ptr{Culong}, lpdwFlags::Ptr{Culong} )::Cint
ccall( (:GetProcessShutdownParameters, "kernel32"), stdcall, Cint,
( Ptr{Culong}, Ptr{Culong}, ),
lpdwLevel, lpdwFlags )
end
function SetThreadDescription( hThread::Ptr{Cvoid}, lpThreadDescription::Ptr{Cwchar_t} )::Clong
ccall( (:SetThreadDescription, "kernel32"), stdcall, Clong,
( Ptr{Cvoid}, Ptr{Cwchar_t}, ),
hThread, lpThreadDescription )
end
function GetThreadDescription( hThread::Ptr{Cvoid}, ppszThreadDescription::Ptr{Cwchar_t} )::Clong
ccall( (:GetThreadDescription, "kernel32"), stdcall, Clong,
( Ptr{Cvoid}, Ptr{Cwchar_t}, ),
hThread, ppszThreadDescription )
end
const FILEOPENORD = 1536
const MULTIFILEOPENORD = 1537
const PRINTDLGORD = 1538
const PRNSETUPDLGORD = 1539
const FINDDLGORD = 1540
const REPLACEDLGORD = 1541
const FONTDLGORD = 1542
const FORMATDLGORD31 = 1543
const FORMATDLGORD30 = 1544
const RUNDLGORD = 1545
const PAGESETUPDLGORD = 1546
const NEWFILEOPENORD = 1547
const PRINTDLGEXORD = 1549
const PAGESETUPDLGORDMOTIF = 1550
const COLORMGMTDLGORD = 1551
const NEWFILEOPENV2ORD = 1552
const NEWFILEOPENV3ORD = 1553
const NEWFORMATDLGWITHLINK = 1591
const IDC_MANAGE_LINK = 1592
mutable struct CRGB
bRed::Cuchar
bGreen::Cuchar
bBlue::Cuchar
bExtra::Cuchar
end
const VS_VERSION_INFO = 1
const VS_USER_DEFINED = 100
mutable struct VS_FIXEDFILEINFO
dwSignature::Culong
dwStrucVersion::Culong
dwFileVersionMS::Culong
dwFileVersionLS::Culong
dwProductVersionMS::Culong
dwProductVersionLS::Culong
dwFileFlagsMask::Culong
dwFileFlags::Culong
dwFileOS::Culong
dwFileType::Culong
dwFileSubtype::Culong
dwFileDateMS::Culong
dwFileDateLS::Culong
end
const COLORREF = Culong
mutable struct RECT
left::Culong
top::Culong
right::Culong
bottom::Culong
end
mutable struct RECTL
left::Culong
top::Culong
right::Culong
bottom::Culong
end
mutable struct POINT
x::Culong
y::Culong
end
mutable struct POINTL
x::Culong
y::Culong
end
mutable struct SIZE
cx::Culong
cy::Culong
end
const SIZEL = SIZE
mutable struct POINTS
x::Cshort
y::Cshort
y::Cshort
x::Cshort
end
const APP_LOCAL_DEVICE_ID_SIZE = 32
const DM_UPDATE = 1
const DM_COPY = 2
const DM_PROMPT = 4
const DM_MODIFY = 8
const DC_FIELDS = 1
const DC_PAPERS = 2
const DC_PAPERSIZE = 3
const DC_MINEXTENT = 4
const DC_MAXEXTENT = 5
const DC_BINS = 6
const DC_DUPLEX = 7
const DC_SIZE = 8
const DC_EXTRA = 9
const DC_VERSION = 10
const DC_DRIVER = 11
const DC_BINNAMES = 12
const DC_ENUMRESOLUTIONS = 13
const DC_FILEDEPENDENCIES = 14
const DC_TRUETYPE = 15
const DC_PAPERNAMES = 16
const DC_ORIENTATION = 17
const DC_COPIES = 18
function SetEnvironmentStringsW( NewEnvironment::Ptr{Cwchar_t} )::Cint
ccall( (:SetEnvironmentStringsW, "kernel32"), stdcall, Cint,
( Ptr{Cwchar_t}, ),
NewEnvironment )
end
function GetStdHandle( nStdHandle::Culong )::Ptr{Cvoid}
ccall( (:GetStdHandle, "kernel32"), stdcall, Ptr{Cvoid},
( Culong, ),
nStdHandle )
end
function SetStdHandle( nStdHandle::Culong, hHandle::Ptr{Cvoid} )::Cint
ccall( (:SetStdHandle, "kernel32"), stdcall, Cint,
( Culong, Ptr{Cvoid}, ),
nStdHandle, hHandle )
end
function SetStdHandleEx( nStdHandle::Culong, hHandle::Ptr{Cvoid}, phPrevValue::Ptr{Ptr{Cvoid}} )::Cint
ccall( (:SetStdHandleEx, "kernel32"), stdcall, Cint,
( Culong, Ptr{Cvoid}, Ptr{Ptr{Cvoid}}, ),
nStdHandle, hHandle, phPrevValue )
end
function GetCommandLineA( )::Ptr{Cchar}
ccall( (:GetCommandLineA, "kernel32"), stdcall, Ptr{Cchar},
( ),
)
end
function GetCommandLineW( )::Ptr{Cwchar_t}
ccall( (:GetCommandLineW, "kernel32"), stdcall, Ptr{Cwchar_t},
( ),
)
end
function GetEnvironmentStrings( )::Ptr{Cchar}
ccall( (:GetEnvironmentStrings, "kernel32"), stdcall, Ptr{Cchar},
( ),
)
end
function GetEnvironmentStringsW( )::Ptr{Cwchar_t}
ccall( (:GetEnvironmentStringsW, "kernel32"), stdcall, Ptr{Cwchar_t},
( ),
)
end
function FreeEnvironmentStringsA( penv::Ptr{Cchar} )::Cint
ccall( (:FreeEnvironmentStringsA, "kernel32"), stdcall, Cint,
( Ptr{Cchar}, ),
penv )
end
function FreeEnvironmentStringsW( penv::Ptr{Cwchar_t} )::Cint
ccall( (:FreeEnvironmentStringsW, "kernel32"), stdcall, Cint,
( Ptr{Cwchar_t}, ),
penv )
end
function SetEnvironmentVariableA( lpName::Ptr{Cchar}, lpValue::Ptr{Cchar} )::Cint
ccall( (:SetEnvironmentVariableA, "kernel32"), stdcall, Cint,
( Ptr{Cchar}, Ptr{Cchar}, ),
lpName, lpValue )
end
function SetEnvironmentVariableW( lpName::Ptr{Cwchar_t}, lpValue::Ptr{Cwchar_t} )::Cint
ccall( (:SetEnvironmentVariableW, "kernel32"), stdcall, Cint,
( Ptr{Cwchar_t}, Ptr{Cwchar_t}, ),
lpName, lpValue )
end
function SetCurrentDirectoryA( lpPathName::Ptr{Cchar} )::Cint
ccall( (:SetCurrentDirectoryA, "kernel32"), stdcall, Cint,
( Ptr{Cchar}, ),
lpPathName )
end
function SetCurrentDirectoryW( lpPathName::Ptr{Cwchar_t} )::Cint
ccall( (:SetCurrentDirectoryW, "kernel32"), stdcall, Cint,
( Ptr{Cwchar_t}, ),
lpPathName )
end
function SearchPathW( lpPath::Ptr{Cwchar_t}, lpFileName::Ptr{Cwchar_t}, lpExtension::Ptr{Cwchar_t}, nBufferLength::Culong, lpBuffer::Ptr{Cwchar_t}, lpFilePart::Ptr{Cwchar_t} )::Culong
ccall( (:SearchPathW, "kernel32"), stdcall, Culong,
( Ptr{Cwchar_t}, Ptr{Cwchar_t}, Ptr{Cwchar_t}, Culong, Ptr{Cwchar_t}, Ptr{Cwchar_t}, ),
lpPath, lpFileName, lpExtension, nBufferLength, lpBuffer, lpFilePart )
end
function SearchPathA( lpPath::Ptr{Cchar}, lpFileName::Ptr{Cchar}, lpExtension::Ptr{Cchar}, nBufferLength::Culong, lpBuffer::Ptr{Cchar}, lpFilePart::Ptr{Cchar} )::Culong
ccall( (:SearchPathA, "kernel32"), stdcall, Culong,
( Ptr{Cchar}, Ptr{Cchar}, Ptr{Cchar}, Culong, Ptr{Cchar}, Ptr{Cchar}, ),
lpPath, lpFileName, lpExtension, nBufferLength, lpBuffer, lpFilePart )
end
function NeedCurrentDirectoryForExePathA( ExeName::Ptr{Cchar} )::Cint
ccall( (:NeedCurrentDirectoryForExePathA, "kernel32"), stdcall, Cint,
( Ptr{Cchar}, ),
ExeName )
end
function NeedCurrentDirectoryForExePathW( ExeName::Ptr{Cwchar_t} )::Cint
ccall( (:NeedCurrentDirectoryForExePathW, "kernel32"), stdcall, Cint,
( Ptr{Cwchar_t}, ),
ExeName )
end
const CREATE_NEW = 1
const CREATE_ALWAYS = 2
const OPEN_EXISTING = 3
const OPEN_ALWAYS = 4
const TRUNCATE_EXISTING = 5
function CompareFileTime( lpFileTime1::FILETIME, lpFileTime2::FILETIME )::Culong
ccall( (:CompareFileTime, "kernel32"), stdcall, Culong,
( FILETIME, FILETIME, ),
lpFileTime1, lpFileTime2 )
end
function CreateDirectoryA( lpPathName::Ptr{Cchar}, lpSecurityAttributes::Ptr{SECURITY_ATTRIBUTES} )::Cint
ccall( (:CreateDirectoryA, "kernel32"), stdcall, Cint,
( Ptr{Cchar}, Ptr{SECURITY_ATTRIBUTES}, ),
lpPathName, lpSecurityAttributes )
end
function CreateDirectoryW( lpPathName::Ptr{Cwchar_t}, lpSecurityAttributes::Ptr{SECURITY_ATTRIBUTES} )::Cint
ccall( (:CreateDirectoryW, "kernel32"), stdcall, Cint,
( Ptr{Cwchar_t}, Ptr{SECURITY_ATTRIBUTES}, ),
lpPathName, lpSecurityAttributes )
end
function CreateFileA( lpFileName::Ptr{Cchar}, dwDesiredAccess::Culong, dwShareMode::Culong, lpSecurityAttributes::Ptr{SECURITY_ATTRIBUTES}, dwCreationDisposition::Culong, dwFlagsAndAttributes::Culong, hTemplateFile::Ptr{Cvoid} )::Ptr{Cvoid}
ccall( (:CreateFileA, "kernel32"), stdcall, Ptr{Cvoid},
( Ptr{Cchar}, Culong, Culong, Ptr{SECURITY_ATTRIBUTES}, Culong, Culong, Ptr{Cvoid}, ),
lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile )
end
function CreateFileW( lpFileName::Ptr{Cwchar_t}, dwDesiredAccess::Culong, dwShareMode::Culong, lpSecurityAttributes::Ptr{SECURITY_ATTRIBUTES}, dwCreationDisposition::Culong, dwFlagsAndAttributes::Culong, hTemplateFile::Ptr{Cvoid} )::Ptr{Cvoid}
ccall( (:CreateFileW, "kernel32"), stdcall, Ptr{Cvoid},
( Ptr{Cwchar_t}, Culong, Culong, Ptr{SECURITY_ATTRIBUTES}, Culong, Culong, Ptr{Cvoid}, ),
lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile )
end
function DefineDosDeviceW( dwFlags::Culong, lpDeviceName::Ptr{Cwchar_t}, lpTargetPath::Ptr{Cwchar_t} )::Cint
ccall( (:DefineDosDeviceW, "kernel32"), stdcall, Cint,
( Culong, Ptr{Cwchar_t}, Ptr{Cwchar_t}, ),
dwFlags, lpDeviceName, lpTargetPath )
end
function DeleteFileA( lpFileName::Ptr{Cchar} )::Cint
ccall( (:DeleteFileA, "kernel32"), stdcall, Cint,
( Ptr{Cchar}, ),
lpFileName )
end
function DeleteFileW( lpFileName::Ptr{Cwchar_t} )::Cint
ccall( (:DeleteFileW, "kernel32"), stdcall, Cint,
( Ptr{Cwchar_t}, ),
lpFileName )
end
function DeleteVolumeMountPointW( lpszVolumeMountPoint::Ptr{Cwchar_t} )::Cint
ccall( (:DeleteVolumeMountPointW, "kernel32"), stdcall, Cint,
( Ptr{Cwchar_t}, ),
lpszVolumeMountPoint )
end
function FileTimeToLocalFileTime( lpFileTime::FILETIME, lpLocalFileTime::Ptr{FILETIME} )::Cint
ccall( (:FileTimeToLocalFileTime, "kernel32"), stdcall, Cint,
( FILETIME, Ptr{FILETIME}, ),
lpFileTime, lpLocalFileTime )
end
function FindClose( hFindFile::Ptr{Cvoid} )::Cint
ccall( (:FindClose, "kernel32"), stdcall, Cint,
( Ptr{Cvoid}, ),
hFindFile )
end
function FindCloseChangeNotification( hChangeHandle::Ptr{Cvoid} )::Cint
ccall( (:FindCloseChangeNotification, "kernel32"), stdcall, Cint,
( Ptr{Cvoid}, ),
hChangeHandle )
end
function FindFirstChangeNotificationA( lpPathName::Ptr{Cchar}, bWatchSubtree::Cint, dwNotifyFilter::Culong )::Ptr{Cvoid}
ccall( (:FindFirstChangeNotificationA, "kernel32"), stdcall, Ptr{Cvoid},
( Ptr{Cchar}, Cint, Culong, ),
lpPathName, bWatchSubtree, dwNotifyFilter )
end
function FindFirstChangeNotificationW( lpPathName::Ptr{Cwchar_t}, bWatchSubtree::Cint, dwNotifyFilter::Culong )::Ptr{Cvoid}
ccall( (:FindFirstChangeNotificationW, "kernel32"), stdcall, Ptr{Cvoid},
( Ptr{Cwchar_t}, Cint, Culong, ),
lpPathName, bWatchSubtree, dwNotifyFilter )
end
function FindFirstFileA( lpFileName::Ptr{Cchar}, lpFindFileData::Ptr{WIN32_FIND_DATAA} )::Ptr{Cvoid}
ccall( (:FindFirstFileA, "kernel32"), stdcall, Ptr{Cvoid},
( Ptr{Cchar}, Ptr{WIN32_FIND_DATAA}, ),
lpFileName, lpFindFileData )
end
function FindFirstFileW( lpFileName::Ptr{Cwchar_t}, lpFindFileData::Ptr{WIN32_FIND_DATAW} )::Ptr{Cvoid}
ccall( (:FindFirstFileW, "kernel32"), stdcall, Ptr{Cvoid},
( Ptr{Cwchar_t}, Ptr{WIN32_FIND_DATAW}, ),
lpFileName, lpFindFileData )
end
function FindNextChangeNotification( hChangeHandle::Ptr{Cvoid} )::Cint
ccall( (:FindNextChangeNotification, "kernel32"), stdcall, Cint,
( Ptr{Cvoid}, ),
hChangeHandle )
end
function FindNextFileA( hFindFile::Ptr{Cvoid}, lpFindFileData::Ptr{WIN32_FIND_DATAA} )::Cint
ccall( (:FindNextFileA, "kernel32"), stdcall, Cint,
( Ptr{Cvoid}, Ptr{WIN32_FIND_DATAA}, ),
hFindFile, lpFindFileData )
end
function FindNextFileW( hFindFile::Ptr{Cvoid}, lpFindFileData::Ptr{WIN32_FIND_DATAW} )::Cint
ccall( (:FindNextFileW, "kernel32"), stdcall, Cint,
( Ptr{Cvoid}, Ptr{WIN32_FIND_DATAW}, ),
hFindFile, lpFindFileData )
end
function FindVolumeClose( hFindVolume::Ptr{Cvoid} )::Cint
ccall( (:FindVolumeClose, "kernel32"), stdcall, Cint,
( Ptr{Cvoid}, ),
hFindVolume )
end
function FlushFileBuffers( hFile::Ptr{Cvoid} )::Cint
ccall( (:FlushFileBuffers, "kernel32"), stdcall, Cint,
( Ptr{Cvoid}, ),
hFile )
end
function GetDiskFreeSpaceA( lpRootPathName::Ptr{Cchar}, lpSectorsPerCluster::Ptr{Culong}, lpBytesPerSector::Ptr{Culong}, lpNumberOfFreeClusters::Ptr{Culong}, lpTotalNumberOfClusters::Ptr{Culong} )::Cint
ccall( (:GetDiskFreeSpaceA, "kernel32"), stdcall, Cint,
( Ptr{Cchar}, Ptr{Culong}, Ptr{Culong}, Ptr{Culong}, Ptr{Culong}, ),
lpRootPathName, lpSectorsPerCluster, lpBytesPerSector, lpNumberOfFreeClusters, lpTotalNumberOfClusters )
end
function GetDiskFreeSpaceW( lpRootPathName::Ptr{Cwchar_t}, lpSectorsPerCluster::Ptr{Culong}, lpBytesPerSector::Ptr{Culong}, lpNumberOfFreeClusters::Ptr{Culong}, lpTotalNumberOfClusters::Ptr{Culong} )::Cint
ccall( (:GetDiskFreeSpaceW, "kernel32"), stdcall, Cint,
( Ptr{Cwchar_t}, Ptr{Culong}, Ptr{Culong}, Ptr{Culong}, Ptr{Culong}, ),
lpRootPathName, lpSectorsPerCluster, lpBytesPerSector, lpNumberOfFreeClusters, lpTotalNumberOfClusters )
end
function GetDriveTypeA( lpRootPathName::Ptr{Cchar} )::UInt32
ccall( (:GetDriveTypeA, "kernel32"), stdcall, UInt32,
( Ptr{Cchar}, ),
lpRootPathName )
end
function GetDriveTypeW( lpRootPathName::Ptr{Cwchar_t} )::UInt32
ccall( (:GetDriveTypeW, "kernel32"), stdcall, UInt32,
( Ptr{Cwchar_t}, ),
lpRootPathName )
end
mutable struct WIN32_FILE_ATTRIBUTE_DATA
dwFileAttributes::Culong
ftCreationTime::FILETIME
ftLastAccessTime::FILETIME
ftLastWriteTime::FILETIME
nFileSizeHigh::Culong
nFileSizeLow::Culong
end
function GetFileAttributesA( lpFileName::Ptr{Cchar} )::Culong
ccall( (:GetFileAttributesA, "kernel32"), stdcall, Culong,
( Ptr{Cchar}, ),
lpFileName )
end
function GetFileAttributesW( lpFileName::Ptr{Cwchar_t} )::Culong
ccall( (:GetFileAttributesW, "kernel32"), stdcall, Culong,
( Ptr{Cwchar_t}, ),
lpFileName )
end
mutable struct BY_HANDLE_FILE_INFORMATION
dwFileAttributes::Culong
ftCreationTime::FILETIME
ftLastAccessTime::FILETIME
ftLastWriteTime::FILETIME
dwVolumeSerialNumber::Culong
nFileSizeHigh::Culong
nFileSizeLow::Culong
nNumberOfLinks::Culong
nFileIndexHigh::Culong
nFileIndexLow::Culong
end
function GetFileInformationByHandle( hFile::Ptr{Cvoid}, lpFileInformation::Ptr{BY_HANDLE_FILE_INFORMATION} )::Cint
ccall( (:GetFileInformationByHandle, "kernel32"), stdcall, Cint,
( Ptr{Cvoid}, Ptr{BY_HANDLE_FILE_INFORMATION}, ),
hFile, lpFileInformation )
end
function GetFileSize( hFile::Ptr{Cvoid}, lpFileSizeHigh::Ptr{Culong} )::Culong
ccall( (:GetFileSize, "kernel32"), stdcall, Culong,
( Ptr{Cvoid}, Ptr{Culong}, ),
hFile, lpFileSizeHigh )
end
function GetFileType( hFile::Ptr{Cvoid} )::Culong
ccall( (:GetFileType, "kernel32"), stdcall, Culong,
( Ptr{Cvoid}, ),
hFile )
end
function GetFileTime( hFile::Ptr{Cvoid}, lpCreationTime::Ptr{FILETIME}, lpLastAccessTime::Ptr{FILETIME}, lpLastWriteTime::Ptr{FILETIME} )::Cint
ccall( (:GetFileTime, "kernel32"), stdcall, Cint,
( Ptr{Cvoid}, Ptr{FILETIME}, Ptr{FILETIME}, Ptr{FILETIME}, ),
hFile, lpCreationTime, lpLastAccessTime, lpLastWriteTime )
end
function GetLogicalDrives( )::Culong
ccall( (:GetLogicalDrives, "kernel32"), stdcall, Culong,
( ),
)
end
function GetLogicalDriveStringsW( nBufferLength::Culong, lpBuffer::Ptr{Cwchar_t} )::Culong
ccall( (:GetLogicalDriveStringsW, "kernel32"), stdcall, Culong,
( Culong, Ptr{Cwchar_t}, ),
nBufferLength, lpBuffer )
end
function LocalFileTimeToFileTime( lpLocalFileTime::FILETIME, lpFileTime::Ptr{FILETIME} )::Cint
ccall( (:LocalFileTimeToFileTime, "kernel32"), stdcall, Cint,
( FILETIME, Ptr{FILETIME}, ),
lpLocalFileTime, lpFileTime )
end
function LockFile( hFile::Ptr{Cvoid}, dwFileOffsetLow::Culong, dwFileOffsetHigh::Culong, nNumberOfBytesToLockLow::Culong, nNumberOfBytesToLockHigh::Culong )::Cint
ccall( (:LockFile, "kernel32"), stdcall, Cint,
( Ptr{Cvoid}, Culong, Culong, Culong, Culong, ),
hFile, dwFileOffsetLow, dwFileOffsetHigh, nNumberOfBytesToLockLow, nNumberOfBytesToLockHigh )
end
function QueryDosDeviceW( lpDeviceName::Ptr{Cwchar_t}, lpTargetPath::Ptr{Cwchar_t}, ucchMax::Culong )::Culong
ccall( (:QueryDosDeviceW, "kernel32"), stdcall, Culong,
( Ptr{Cwchar_t}, Ptr{Cwchar_t}, Culong, ),
lpDeviceName, lpTargetPath, ucchMax )
end
function RemoveDirectoryA( lpPathName::Ptr{Cchar} )::Cint
ccall( (:RemoveDirectoryA, "kernel32"), stdcall, Cint,
( Ptr{Cchar}, ),
lpPathName )
end
function RemoveDirectoryW( lpPathName::Ptr{Cwchar_t} )::Cint
ccall( (:RemoveDirectoryW, "kernel32"), stdcall, Cint,
( Ptr{Cwchar_t}, ),
lpPathName )
end
function SetEndOfFile( hFile::Ptr{Cvoid} )::Cint
ccall( (:SetEndOfFile, "kernel32"), stdcall, Cint,
( Ptr{Cvoid}, ),
hFile )
end
function SetFileAttributesA( lpFileName::Ptr{Cchar}, dwFileAttributes::Culong )::Cint
ccall( (:SetFileAttributesA, "kernel32"), stdcall, Cint,
( Ptr{Cchar}, Culong, ),
lpFileName, dwFileAttributes )
end
function SetFileAttributesW( lpFileName::Ptr{Cwchar_t}, dwFileAttributes::Culong )::Cint
ccall( (:SetFileAttributesW, "kernel32"), stdcall, Cint,
( Ptr{Cwchar_t}, Culong, ),
lpFileName, dwFileAttributes )
end
function SetFileTime( hFile::Ptr{Cvoid}, lpCreationTime::FILETIME, lpLastAccessTime::FILETIME, lpLastWriteTime::FILETIME )::Cint
ccall( (:SetFileTime, "kernel32"), stdcall, Cint,
( Ptr{Cvoid}, FILETIME, FILETIME, FILETIME, ),
hFile, lpCreationTime, lpLastAccessTime, lpLastWriteTime )
end
function SetFileValidData( hFile::Ptr{Cvoid}, ValidDataLength::Int64 )::Cint
ccall( (:SetFileValidData, "kernel32"), stdcall, Cint,
( Ptr{Cvoid}, Int64, ),
hFile, ValidDataLength )
end
function UnlockFile( hFile::Ptr{Cvoid}, dwFileOffsetLow::Culong, dwFileOffsetHigh::Culong, nNumberOfBytesToUnlockLow::Culong, nNumberOfBytesToUnlockHigh::Culong )::Cint
ccall( (:UnlockFile, "kernel32"), stdcall, Cint,
( Ptr{Cvoid}, Culong, Culong, Culong, Culong, ),
hFile, dwFileOffsetLow, dwFileOffsetHigh, nNumberOfBytesToUnlockLow, nNumberOfBytesToUnlockHigh )
end
function GetTempPathW( nBufferLength::Culong, lpBuffer::Ptr{Cwchar_t} )::Culong
ccall( (:GetTempPathW, "kernel32"), stdcall, Culong,
( Culong, Ptr{Cwchar_t}, ),
nBufferLength, lpBuffer )
end
mutable struct CREATEFILE2_EXTENDED_PARAMETERS
dwSize::Culong
dwFileAttributes::Culong
dwFileFlags::Culong
dwSecurityQosFlags::Culong
lpSecurityAttributes::Ptr{SECURITY_ATTRIBUTES}
hTemplateFile::Ptr{Cvoid}
end
function CreateFile2( lpFileName::Ptr{Cwchar_t}, dwDesiredAccess::Culong, dwShareMode::Culong, dwCreationDisposition::Culong, pCreateExParams::Ptr{CREATEFILE2_EXTENDED_PARAMETERS} )::Ptr{Cvoid}
ccall( (:CreateFile2, "kernel32"), stdcall, Ptr{Cvoid},
( Ptr{Cwchar_t}, Culong, Culong, Culong, Ptr{CREATEFILE2_EXTENDED_PARAMETERS}, ),
lpFileName, dwDesiredAccess, dwShareMode, dwCreationDisposition, pCreateExParams )
end
function SetFileIoOverlappedRange( FileHandle::Ptr{Cvoid}, OverlappedRangeStart::Ptr{UInt8}, Length::Culong )::Cint
ccall( (:SetFileIoOverlappedRange, "kernel32"), stdcall, Cint,
( Ptr{Cvoid}, Ptr{UInt8}, Culong, ),
FileHandle, OverlappedRangeStart, Length )
end
function GetCompressedFileSizeA( lpFileName::Ptr{Cchar}, lpFileSizeHigh::Ptr{Culong} )::Culong
ccall( (:GetCompressedFileSizeA, "kernel32"), stdcall, Culong,
( Ptr{Cchar}, Ptr{Culong}, ),
lpFileName, lpFileSizeHigh )
end
function GetCompressedFileSizeW( lpFileName::Ptr{Cwchar_t}, lpFileSizeHigh::Ptr{Culong} )::Culong
ccall( (:GetCompressedFileSizeW, "kernel32"), stdcall, Culong,
( Ptr{Cwchar_t}, Ptr{Culong}, ),
lpFileName, lpFileSizeHigh )
end
@enum STREAM_INFO_LEVELS::Int32 FindStreamInfoStandard=0 FindStreamInfoMaxInfoLevel=1
function AreFileApisANSI( )::Cint
ccall( (:AreFileApisANSI, "kernel32"), stdcall, Cint,
( ),
)
end
function GetTempPathA( nBufferLength::Culong, lpBuffer::Ptr{Cchar} )::Culong
ccall( (:GetTempPathA, "kernel32"), stdcall, Culong,
( Culong, Ptr{Cchar}, ),
nBufferLength, lpBuffer )
end
function SetFileApisToOEM( )::Cvoid
ccall( (:SetFileApisToOEM, "kernel32"), stdcall, Cvoid,
( ),
)
end
function SetFileApisToANSI( )::Cvoid
ccall( (:SetFileApisToANSI, "kernel32"), stdcall, Cvoid,
( ),
)
end
function IsDebuggerPresent( )::Cint
ccall( (:IsDebuggerPresent, "kernel32"), stdcall, Cint,
( ),
)
end
function DebugBreak( )::Cvoid
ccall( (:DebugBreak, "kernel32"), stdcall, Cvoid,
( ),
)
end
function OutputDebugStringA( lpOutputString::Ptr{Cchar} )::Cvoid
ccall( (:OutputDebugStringA, "kernel32"), stdcall, Cvoid,
( Ptr{Cchar}, ),
lpOutputString )
end
function OutputDebugStringW( lpOutputString::Ptr{Cwchar_t} )::Cvoid
ccall( (:OutputDebugStringW, "kernel32"), stdcall, Cvoid,
( Ptr{Cwchar_t}, ),
lpOutputString )
end
function ContinueDebugEvent( dwProcessId::Culong, dwThreadId::Culong, dwContinueStatus::Culong )::Cint
ccall( (:ContinueDebugEvent, "kernel32"), stdcall, Cint,
( Culong, Culong, Culong, ),
dwProcessId, dwThreadId, dwContinueStatus )
end
function DebugActiveProcess( dwProcessId::Culong )::Cint
ccall( (:DebugActiveProcess, "kernel32"), stdcall, Cint,
( Culong, ),
dwProcessId )
end
function DebugActiveProcessStop( dwProcessId::Culong )::Cint
ccall( (:DebugActiveProcessStop, "kernel32"), stdcall, Cint,
( Culong, ),
dwProcessId )
end
function EncodePointer( pPtr::Ptr{Cvoid} )::Ptr{Cvoid}
ccall( (:EncodePointer, "kernel32"), stdcall, Ptr{Cvoid},
( Ptr{Cvoid}, ),
pPtr )
end
function DecodePointer( pPtr::Ptr{Cvoid} )::Ptr{Cvoid}
ccall( (:DecodePointer, "kernel32"), stdcall, Ptr{Cvoid},
( Ptr{Cvoid}, ),
pPtr )
end
function EncodeSystemPointer( pPtr::Ptr{Cvoid} )::Ptr{Cvoid}
ccall( (:EncodeSystemPointer, "kernel32"), stdcall, Ptr{Cvoid},
( Ptr{Cvoid}, ),
pPtr )
end
function DecodeSystemPointer( pPtr::Ptr{Cvoid} )::Ptr{Cvoid}
ccall( (:DecodeSystemPointer, "kernel32"), stdcall, Ptr{Cvoid},
( Ptr{Cvoid}, ),
pPtr )
end
function EncodeRemotePointer( ProcessHandle::Ptr{Cvoid}, pPtr::Ptr{Cvoid}, EncodedpPtr::Ptr{Cvoid} )::Clong