The %getpid() function returns the Process-ID (PID) of the calling process.
var = %getpid()
FlashBASIC C functions overview, cfunction statement