Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: Fernando Alvares
  Where is Fernando Alvares?
 Porto Alegre
 Brazil
 Fernando Alvares
 Tags
Subject: RE: Using WScript.Shell to run a program
Thread ID: 365695 Message ID: 365723 # Views: 36 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Classes and Objects
Date: Sunday, December 30, 2012 8:45:18 PM         
   


> Thanks Stefan!
>
> It worked fine.
>
> Just a question: as my program will exectute this code snipet over and over, it is not a problem to DECLARE INTEGER ShellExecute many times?
>
> Regards,
>
> Fernando
>


You are welcome!

In my opinion, or in practice of a few projects, the "costs" of a Win32API-function declaration always seemed to less than zero, so that we used to Declare Whatever allover again, i.e. repeatedly directly before using a function, just to ensure code-block stability, and did not care for doing something like using the ADLLS() function or the CLEAR DLLS command.
(Whereas loading an entire COM server is probably (very) much more "footprint", I'd say.)



hth
-Stefan



CLEAR ALL
? ADLLS(laTemp) && 0
DECLARE integer Sleep IN WIN32API integer
? ADLLS(laTemp) && 1
FOR i = 1 TO 1000
	DECLARE integer Sleep IN WIN32API integer
ENDFOR
? ADLLS(laTemp) && 1


ENTIRE THREAD

Using WScript.Shell to run a program Posted by Fernando Alvares @ 12/30/2012 1:25:57 PM
RE: Using WScript.Shell to run a program Posted by Glen Villar @ 12/30/2012 1:34:52 PM
RE: Using WScript.Shell to run a program Posted by Fernando Alvares @ 12/30/2012 2:17:37 PM
RE: Using WScript.Shell to run a program Posted by Stefan Wuebbe @ 12/30/2012 1:43:01 PM
RE: Using WScript.Shell to run a program Posted by Fernando Alvares @ 12/30/2012 2:24:54 PM
RE: Using WScript.Shell to run a program Posted by Stefan Wuebbe @ 12/30/2012 8:45:18 PM
RE: Using WScript.Shell to run a program Posted by Fernando Alvares @ 12/30/2012 2:47:54 PM