Provides a way to make foreign function calls to dynamic libraries.
- Making a call to the MessageBoxA function in user32.dll to display a dialog box.
fn main() {
v user32 = new Library("user32.dll");
v dialog_response = user32.call_function(
"MessageBoxA",
[
("uint64", 0),
("pointer", "Hello, World!"),
("pointer", "Ellie Test"),
("uint32", 0)
]
) as int;
println("Dialog response: " + dialog_response);
}