'==============================================================================
' Test #4: Multiple Includes + Constants
' Tests #INCLUDE ONCE to prevent duplicates, and various constant types
'==============================================================================
#COMPILE EXE
#DIM ALL
#INCLUDE "Core/Windows.inc"

FUNCTION PBMAIN() AS LONG
    LOCAL result AS LONG
    LOCAL currentDir AS STRING
    LOCAL dirLen AS DWORD

    ' Test directory API
    currentDir = SPACE$(260)
    dirLen = GetCurrentDirectoryA(260, STRPTR(currentDir))
    PRINT "Current directory: "; LEFT$(currentDir, dirLen)

    ' Test GetLastError (should be 0 after success)
    PRINT "Last error: "; GetLastError()

    ' Test system metrics
    PRINT "Screen width: "; GetSystemMetrics(0)   ' SM_CXSCREEN
    PRINT "Screen height: "; GetSystemMetrics(1)  ' SM_CYSCREEN

    PRINT "Test #4 PASSED: Multi-include works"
    FUNCTION = 0
END FUNCTION
