Our exe being locked

This forum is for eXpress++ general support.
Post Reply
Message
Author
omni
Posts: 531
Joined: Thu Jan 28, 2010 9:34 am

Our exe being locked

#1 Post by omni »

Roger.

we have some interface exe files we create to do requests and send files. Runs 24/7. User starts them. The issue is users do not pay attntion and will start them again. Eventually they lock up on one another.

Is there a method to block an exe (our exe) from being run more than one time. All are on windows servers.

(Like the new board view/format)


Fred
Omni

User avatar
Auge_Ohr
Posts: 1405
Joined: Wed Feb 24, 2010 3:44 pm

Re: Our exe being locked

#2 Post by Auge_Ohr »

hi,

have a look at DC_IsAppRunning() in x:\exp20\Source\Dclipx\_dcfunct.prg
greetings by OHR
Jimmy

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

Re: Our exe being locked

#3 Post by bwolfsohn »

This handles multiple applications that can run from the same exe

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 SET_MULTIRUN
return(.f.)
ENDIF
IF fexists('multirun.ovl')
return(.f.)
ENDIF
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