; subroutine to find and terminate the DASWIN ; program currently executing. For use in updating DASWIN ; software over phonelines #include "DDE.WAS" ; routine to start DDE with DASWIN Proc KillDASWIN integer t for t = 1 upto 5 setDDE() if DDEChan0 != 0 restsetup ; restore original setup values so that we don't change the setup file assign s0,"DWABORT" DDEPoke DDEChan0, "STATUS", s0 DDETerminate DDEChan0 else statmsg "" exitfor endif endfor EndProc ;func GetDasWinTag:integer ;string TaskNm ;INTEGER tag ; FirstTask tag ; while (1) ; TaskName tag TaskNm ; breakpoint "checking task names for 'DASWIN', Tag %ld - %s", tag, TaskNm ; strcmp TaskNm, "DASWIN" ; if Success ; exitwhile ; else ; NextTask Tag ; endif ; if tag == 0 ; quit loop if no more tasks ; exitwhile ; endif ; endWhile ; return tag ;endfunc proc StartDASWIN ; make sure DASWIN is not already running on system KillDASWIN() run "DASWIN.EXE" endproc