Improved Windows DLL calls
This commit is contained in:
@ -1,14 +1,13 @@
|
||||
write(_ Int, _ Pointer, _ Int) -> Int {
|
||||
// WriteFile(fd, buffer, length, out numberOfBytesWritten, out overlapped)
|
||||
return 0
|
||||
write(fd Int, address Pointer, length Int) -> Int {
|
||||
// out numberOfBytesWritten
|
||||
// out overlapped
|
||||
return kernel32.WriteFile(fd, address, length)
|
||||
}
|
||||
|
||||
mmap(_ Int, _ Int, _ Int, _ Int) -> Pointer {
|
||||
// VirtualAlloc(address, length, flags, protection)
|
||||
return 0
|
||||
mmap(address Int, length Int, protection Int, flags Int) -> Pointer {
|
||||
return kernel32.VirtualAlloc(address, length, flags, protection)
|
||||
}
|
||||
|
||||
exit(_ Int) {
|
||||
// ExitProcess(code)
|
||||
return
|
||||
exit(code Int) {
|
||||
kernel32.ExitProcess(code)
|
||||
}
|
Reference in New Issue
Block a user