What Apps running on Workstation?

This forum is for general support of Xbase++
Post Reply
Message
Author
dougtanner
Posts: 32
Joined: Fri Jan 20, 2012 9:24 am

What Apps running on Workstation?

#1 Post by dougtanner »

Does anyone know how the check what apps are running on a workstation in an xBase++ application? In XP and Windows 7.

Doug

User avatar
rdonnay
Site Admin
Posts: 4775
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: What Apps running on Workstation?

#2 Post by rdonnay »

If you are trying to determine if a specific app is running, you can use DC_IsAppRunning().
The eXpress train is coming - and it has more cars.

dougtanner
Posts: 32
Joined: Fri Jan 20, 2012 9:24 am

Re: What Apps running on Workstation?

#3 Post by dougtanner »

Thanks, but I keep getting a "parameter has wrong data type" error using your example in the help screen. In Line DC_ISAPPRUNNING(2364) Calling FINDWINDOWA(2290). I think it is the Class Name of the Window. I have tried:

IF DC_IsAppRunning('XbpDialog',,'MYAPP.EXE',.t.)
IF DC_IsAppRunning('XbpPmtClass',,'MYAPP.EXE',.t.)
IF DC_IsAppRunning('XbpWindow',,'MYAPP.EXE',.t.)
IF DC_IsAppRunning('XbpCrt',,'MYAPP.EXE',.t.)
IF DC_IsAppRunning('XbplWindow',,'MYAPP.EXE',.t.)

Seems I don't know what the class name of my window.

Doug

bwolfsohn
Posts: 649
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: What Apps running on Workstation?

#4 Post by bwolfsohn »

try it this way...

it's the title of the app..

if is_running({"Password","CUS Auction Management System","Monitor Online Auction(s)","Real-Time Sale Viewing"})
RETURN .f.
endif



*******************
function is_running(aApp)
*******************
local cApp,i
IF valtype(aApp)<>"A"
cApp:=aApp
aApp:={}
aadd(aApp,cApp)
ENDIF
FOR i := 1 TO len(aApp)
IF DC_IsAppRunning('XbpDialog',aApp,,.t.) .OR. DC_IsAppRunning('XbpPmtClass',aApp,,.t.)
IF yes_no3("This application is already running on this machine. Continue ?")
RETURN .f.
else
RETURN .t.
ENDIF
endif
NEXT
return(.f.)
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

Post Reply