A MoonBit FFI demo for calling the Win32 MessageBoxW API.
Dependencies

moon add justjavac/win32_messageboxmoon run src --target nativelet result = message_box(
0,
@ffi.to_wstr("Hello from MoonBit"),
@ffi.to_wstr("MoonBit Message Box"),
0x00000000,
)fn message_box(hWnd : Int, lpText : Bytes, lpCaption : Bytes, uType : Int) -> Intlet result = message_box(
0,
@ffi.to_wstr("Save changes before closing?"),
@ffi.to_wstr("Unsaved Changes"),
0x00000023,
)A MoonBit FFI demo for calling the Win32 MessageBoxW API.
Dependencies