Writing to windows console through foreign calls!
This commit is contained in:
11
Windows.kl
11
Windows.kl
@@ -6,6 +6,9 @@ HINSTANCE :: *void
|
||||
LPVOID :: *void
|
||||
SIZE_T :: U64
|
||||
BOOL :: int
|
||||
HANDLE :: *void
|
||||
VOID :: void
|
||||
LPDWORD :: *DWORD
|
||||
|
||||
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
|
||||
|
||||
@@ -28,4 +31,10 @@ PAGE_EXECUTE_READWRITE :: 0x40
|
||||
PAGE_EXECUTE_WRITECOPY :: 0x80
|
||||
|
||||
VirtualAlloc :: #foreign (lpAddress: LPVOID, dwSize: SIZE_T, flAllocationType: DWORD, flProtect: DWORD): LPVOID
|
||||
VirtualFree :: #foreign (lpAddress: LPVOID, dwSize: SIZE_T, dwFreeType: DWORD): BOOL
|
||||
VirtualFree :: #foreign (lpAddress: LPVOID, dwSize: SIZE_T, dwFreeType: DWORD): BOOL
|
||||
|
||||
STD_INPUT_HANDLE :: 4294967286//(-10)->DWORD
|
||||
STD_OUTPUT_HANDLE :: 4294967285//(-11)->DWORD
|
||||
//STD_ERROR_HANDLE :: (-12)->DWORD
|
||||
GetStdHandle :: #foreign (nStdHandle: DWORD): HANDLE
|
||||
WriteConsoleA :: #foreign (hConsoleOutput: HANDLE,lpBuffer: *VOID,nNumberOfCharsToWrite: DWORD,lpNumberOfCharsWritten: LPDWORD,lpReserve: LPVOID): BOOL
|
||||
Reference in New Issue
Block a user