ProcessID Property

 

Description

 

The process ID (PID) for a process started with the Exec method.

 

PowerBASIC Syntax

 

PROPERTY GET ProcessID () AS LONG

 

Remarks

 

You can use the ProcessID property to activate an application (as an argument to the AppActivate method).

 

Example [PowerBASIC]

 

#INCLUDE "WSHOM.INC"

 

DIM pWsh3 AS IWshShell3

DIM pWshExec AS IWshExec

 

pWsh3 = NEWCOM "WScript.Shell"

pWshExec = pWsh3.Exec(UCODE$("calc"))

PRINT "Process ID: " pWshExec.ProcessID

DO

   IF pWshExec.Status <> 0 THEN EXIT DO

   SLEEP 100

LOOP

 

PRINT "Status: " pWshExec.Status

 

Valid XHTML 1.0 Transitional