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
Our exe being locked
Re: Our exe being locked
hi,
have a look at DC_IsAppRunning() in x:\exp20\Source\Dclipx\_dcfunct.prg
have a look at DC_IsAppRunning() in x:\exp20\Source\Dclipx\_dcfunct.prg
greetings by OHR
Jimmy
Jimmy
Re: Our exe being locked
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.)
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
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