Board index » cppbuilder » I can call to an outer application so that it is executed?

I can call to an outer application so that it is executed?


2003-07-03 06:23:40 PM
cppbuilder55
Hello.
excuse me by my bad English. I have borland builder C++ 4,0. I wanted to
call from my program to an application so that process is executed in
another process (For example notepad). they can somebody help me, please?
Thanks
Fco. Javier Martínez.
 
 

Re:I can call to an outer application so that it is executed?

Look at the Windows API functions WinExec and CreateProcess. Either should
be able to do that. The C/C++ function system should also be able to do it.
For example,
WinExec("notepad.exe c:\\autoexec.bat", SW_SHOW);
. Ed
Quote
Javier Martínez wrote in message
news: XXXX@XXXXX.COM ...

excuse me by my bad English. I have borland builder C++
4,0. I wanted to call from my program to an application so
that process is executed in another process (For example
notepad). they can somebody help me, please?
 

Re:I can call to an outer application so that it is executed?

In article < XXXX@XXXXX.COM >, XXXX@XXXXX.COM says...
Quote
excuse me by my bad English. I have borland builder C++ 4,0. I wanted to
call from my program to an application so that process is executed in
another process (For example notepad). they can somebody help me, please?
Check WinExec(), CreateProcess() (SDK help) or system(), spawn(),
exec() (c++ help)
--
liz
 

{smallsort}

Re:I can call to an outer application so that it is executed?

Fco. Javier Martínez wrote:
Quote
I wanted to
call from my program to an application so that process is executed in
another process (For example notepad).
HINSTANCE hinstance = ShellExecute (
Application ->Handle,
"open",
"notepad.exe",
"E:\\MyDir\\MyText.txt",
NULL,
SW_SHOWNORMAL
);
if ( ((int)hinstance) <= 32 )
{
//error
}
Hans.