With BPW 7.0, how to Exec another program? 
Author Message
 With BPW 7.0, how to Exec another program?

The function Exec is available from within a DOS-compiled  .PAS-program,
for example:
  exec('c:\myprog.exe', params);
But Exec is defined only for Real and Protected compiles. How do
you do this with Windows?


Tue, 01 Apr 2003 13:10:33 GMT  
 With BPW 7.0, how to Exec another program?
Hi,

Quote:

> The function Exec is available from within a DOS-compiled  .PAS-program,
> for example:
>   exec('c:\myprog.exe', params);
> But Exec is defined only for Real and Protected compiles. How do
> you do this with Windows?

From the Windows unit: LoadModule or WinExec.

 - Sebastian



Wed, 18 Jun 1902 08:00:00 GMT  
 With BPW 7.0, how to Exec another program?


Quote:
> The function Exec is available from within a DOS-compiled  .PAS-program,
> for example:
>   exec('c:\myprog.exe', params);
> But Exec is defined only for Real and Protected compiles. How do
> you do this with Windows?

In windows, you have the problem of whether or not wait until the program
you called has exit. So there are _two_ Win16 functions:

WinExec
and
WinExecWait

(in 32-Bit environments, you would use CreateProcess, but it is not defined
in Win16).

For further reference, look at the online help for WinExec, WinExecWait and
the SW_XXX constants (for hiding, maximizing etc. the new program window).

--
Rudolf Polzer
REBOUNCE - http://www.mycgiserver.com/~rebounce
I wish I was what I was when I wished I was what I am now.



Wed, 18 Jun 1902 08:00:00 GMT  
 With BPW 7.0, how to Exec another program?


Quote:

>The function Exec is available from within a DOS-compiled  .PAS-program,
>for example:
>  exec('c:\myprog.exe', params);
>But Exec is defined only for Real and Protected compiles. How do
>you do this with Windows?

Have you considered the online Help for WinExec?

--

 <URL: http://www.merlyn.demon.co.uk/> TP/BP/Delphi/&c., FAQqy topics & links;
 <URL: http://www.merlyn.demon.co.uk/clpb-faq.txt> Pedt Scragg: c.l.p.b. mFAQ;
 <URL: ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip> Timo Salmi's Turbo Pascal FAQ.



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. equivalant exec command in BP for BPW

2. MCI commands in BPW 7.0

3. BPW 7.0, graph unit problem

4. Handling Exceptions with BPW 7.0

5. No F2 to save? (BPW 7.0)

6. BPW 7.0 & Win95 Cursor

7. BPW 7.0 wanted

8. Debugging BPW 7.0 prgs under Winnt

9. Keyboard Routines in Windows 95 /BPW 7.0

10. HELP: Foreign Carac. in BPW 7.0

11. Timer /BPW 7.0

 

 
Powered by phpBB® Forum Software