Writing more real program and squashing bugs

This commit is contained in:
Krzosa Karol
2022-06-13 20:22:40 +02:00
parent 955167ce18
commit 2c431e3207
6 changed files with 68 additions and 15 deletions

View File

@@ -5,6 +5,7 @@ HMENU :: *void
HINSTANCE :: *void
LPVOID :: *void
SIZE_T :: U64
BOOL :: int
CreateWindowA :: #foreign (dwExStyle: DWORD, lpClassName: *char, lpWindowName: *char, dwStyle: DWORD, X: int, Y: int, nWidth: int, nHeight: int, hWndParent: HWND, hMenu: HMENU, hInstance: HINSTANCE, lpParam: *void): HWND
@@ -14,9 +15,17 @@ MEM_RESERVE :: 2//0x00002000
MEM_RESET :: 3//0x00080000
MEM_RESET_UNDO :: 4//0x1000000
PAGE_EXECUTE :: 1//0x10
PAGE_EXECUTE_READ :: 2//0x20
PAGE_EXECUTE_READWRITE :: 3//0x40
PAGE_EXECUTE_WRITECOPY :: 4//0x80
MEM_DECOMMIT :: 5//0x00004000
MEM_RELEASE :: 6//0x00008000
VirtualAlloc :: #foreign (lpAddress: LPVOID, dwSize: SIZE_T, flAllocationType: DWORD, flProtect: DWORD): LPVOID
PAGE_NOACCESS :: 1
PAGE_READONLY :: 2
PAGE_READWRITE :: 4
PAGE_WRITECOPY :: 8
PAGE_EXECUTE :: 10//0x10
PAGE_EXECUTE_READ :: 20//0x20
PAGE_EXECUTE_READWRITE :: 30//0x40
PAGE_EXECUTE_WRITECOPY :: 40//0x80
VirtualAlloc :: #foreign (lpAddress: LPVOID, dwSize: SIZE_T, flAllocationType: DWORD, flProtect: DWORD): LPVOID
VirtualFree :: #foreign (lpAddress: LPVOID, dwSize: SIZE_T, dwFreeType: DWORD): BOOL