'==============================================================================
' Test #2: MessageBoxA - User32.dll WinAPI
'==============================================================================
#COMPILE EXE
#DIM ALL

DECLARE FUNCTION MessageBoxA LIB "user32.dll" ALIAS "MessageBoxA" (BYVAL hWnd AS QUAD, BYVAL lpText AS ASCIIZ PTR, BYVAL lpCaption AS ASCIIZ PTR, BYVAL uType AS LONG) AS LONG

%NULL = 0
%MB_OK = 0
%MB_ICONINFORMATION = 64

FUNCTION PBMAIN() AS LONG
    LOCAL result AS LONG
    result = MessageBoxA(%NULL, "Hello from PBXA64!", "WinAPI Test", %MB_OK + %MB_ICONINFORMATION)
    PRINT "MessageBox returned:", result
    FUNCTION = 0
END FUNCTION
