'==============================================================================
' Test #1: Console Output with WinAPI Includes
' Uses Windows.inc to test basic declares and constants
'==============================================================================
#COMPILE EXE
#DIM ALL
#INCLUDE "Core/Windows.inc"

FUNCTION PBMAIN() AS LONG
    LOCAL hStdOut AS QUAD
    LOCAL written AS DWORD
    LOCAL msg AS STRING

    msg = "PBXA64 WinAPI Test - Console Output" + CHR$(13) + CHR$(10)
    hStdOut = GetStdHandle(%STD_OUTPUT_HANDLE)
    CALL WriteFile(hStdOut, STRPTR(msg), LEN(msg), written, %NULL)

    PRINT "Test #1 PASSED: Windows.inc loaded successfully"
    FUNCTION = 0
END FUNCTION
