Skip to content

Commit 0bfb247

Browse files
committed
Update examples
1 parent 1193fd0 commit 0bfb247

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

examples/import.evil

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import 'user32.dll' {
2-
fn MessageBox(i32, buffer, buffer, i32): i32 'MessageBoxA' // Map MessageBoxA external function to MessageBox
2+
// Map MessageBoxA external function to MessageBox
3+
// MessageBoxA is optional and can be omitted if function name is the same as external function
4+
// stdcall is for x86 only, on other archs, this will be ignored
5+
fn stdcall MessageBox(i32, buffer, buffer, i32): i32 'MessageBoxA'
36
}
47

58
MessageBox(0, 'Hello, World!', '', 0) // Strings are automatically converted to null-terminated strings

0 commit comments

Comments
 (0)