-
Calling External Programs with C++ code
I was wondering if anyone could help me with the code nessecary to call
external
windows pgorams from a terminal c++ program. I dont know the code to do this.
I would only need to run the external program not interact with it. Any
help would be greatly appreciated.
-
Re: Calling External Programs with C++ code
system("c:\...\whatever.exe");
or
lookup spawn*.*, shellexecute*(win32), etc for more powerful commands.
"Jabugalu" <activematrix@netzero.net> wrote:
>
>I was wondering if anyone could help me with the code nessecary to call
>external
>windows pgorams from a terminal c++ program. I dont know the code to do
this.
> I would only need to run the external program not interact with it. Any
>help would be greatly appreciated.
-
Re: Calling External Programs with C++ code
The prefered way to create another process in win32 should be something like
this. It gives the developer more control, but then again it is more complicated.
PROCESS_INFORMATION pi;
STARTUPINFO si;
memset(&si, 0, sizeof(si));
si.cb = sizeof(si);
if (CreateProcess(0, "C:\KEFFO\kickass.exe", 0, 0, FALSE,
NORMAL_PRIORITY_CLASS, 0, 0,
&si, &pi)) {
// ERROR
}
WaitForSingleObject(pi.hProcess, INFINITE);
CloseHandle(pi.hThread);
CloseHandle(pi.hProcess);
"jonnin" <jonnin@vol.com> wrote:
>
>system("c:\...\whatever.exe");
>or
>lookup spawn*.*, shellexecute*(win32), etc for more powerful commands.
>
>
>
>"Jabugalu" <activematrix@netzero.net> wrote:
>>
>>I was wondering if anyone could help me with the code nessecary to call
>>external
>>windows pgorams from a terminal c++ program. I dont know the code to do
>this.
>> I would only need to run the external program not interact with it. Any
>>help would be greatly appreciated.
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks