Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem invoking pcAnywhere (DOS)
Message
From
09/12/2002 08:31:02
 
 
To
09/12/2002 07:56:13
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00730525
Message ID:
00730840
Views:
18
>Hi Ed:
>
>>>
SET CLASSLIB TO PROCESS ADDITIVE
>>>oRun=CREATEOBJ('API_APPRUN','C:\AW\AWREMOTE.EXE -M=D -N="MCIB"','C:\AW','NOR')
>>>
>>>oRun.LaunchApp()
>>>LOCAL mCount
>>>mCount = 0
>>>DO WHILE oRun.CheckProcessExitCode() = 259 && app still running
>>>	mCount = mcount + 1
>>>	IF mCount < 3
>>>		WAIT TIMEOUT 5  &&do something, wait a little while and go back and check
>>>		oRun.CheckProcessExitCode()
>>>	ELSE
>>>		oRun.KillProc()
>>>                mCount = 0
>>>	endif
>>>ENDDO
>>>
>
>>You're running the release copy, as opposed to what I have here - try KillProc() rather than TerminateApp().
>
>In the Do While Loop, terminating the process after 3 attempts in about 5-10 seconds is not realistic - since it does take a while to computer. At times, the host computer many be busy - or at some point in time the transfer of files take a while. IOW what can i institute in place of waiting for 5-10 seconds before KillProc() kicks in. It would'nt be nice to introduce killProc() when pcAnywhere is transferring files. Any suggestions?

The Win32 API call Sleep comes to mind:

DECLARE Sleep IN WIN32API dwMillisecs
=Sleep(20000) && wait 20 seconds without giving control to VFP

>
>Thanks.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform