Writing to windows console through foreign calls!

This commit is contained in:
Krzosa Karol
2022-06-13 22:34:19 +02:00
parent c0253f0424
commit bc3d3d00ca
4 changed files with 17 additions and 75 deletions

View File

@@ -1,6 +1,9 @@
Base :: #load "base.kl"
CONSTANT :: 0xabCAFAAABCDAEAA
Win :: #load "Windows.kl"
main :: (argc: int, argv: **char): int
memory := Base.reserve(size = 10000)
handle := Win.GetStdHandle(Win.STD_OUTPUT_HANDLE)
string: *char = "hello world"
Win.WriteConsoleA(handle, string->*void, 11, 0, 0)