'
'       SAMPLE.BAS
'
'       Include all of the API function declarations in API.INC
'
REM $INCLUDE: 'API.INC'
'
'       Next set up a BASIC variable to be initialized with
'       the reflection serial number.  Reflection's
'       API support CAN NOT CHANGE THE LENGTH OF A BASIC
'       STRING.  This is something that ONLY BASIC can
'       change.  API can change the contents of the
'       string however.  For this reason, you must
'       fill the string to the maximum size required
'       before calling API.  Filling with spaces is handy.

serno$ = SPACE$(32)

IF api.instchk%(serno$) <> 0 THEN
        PRINT "API support not present - use /W switch"
        END
ELSE
        PRINT "Reflection present, serial no: "; serno$
END IF

PRINT "Hit any key to pop-up Reflection:";

DO
        a$ = INKEY$
LOOP WHILE a$ = ""
i% = api.popup
PRINT ""
PRINT "---------------------------------------------"
PRINT "Back from Reflection"
END
