Want to execute a C program from a VisualC++

Closed
hummy - Jan 29, 2009 at 09:43 AM
 Steven - Jan 30, 2009 at 01:46 PM
Hello,
I want to execute a C program from a visual C++ program and wants to retrive the result of execution in the Visual C++ program.I tried to use ShellExecute() and WinExec() funtions.
Eg when i am trying to execute an addition funtion,the result i get in both the above funtions are 2.I don't know whether it is possible to retrieve a result using that method.
What i tried is
int d;
d=(int)ShellExecute(hwnd,"open","C:\path\to\file.exe",NULL,NULL,SW_NORMAL);
Please give a right syntax.
Thankyou.

2 replies

wonderpc Posts 15 Registration date Wednesday November 5, 2008 Status Member Last seen May 18, 2009 2
Jan 30, 2009 at 02:11 AM
hi,
try this link to get all the information you are searching for:
https://www.thoughtco.com/ruby-programming-4133469
i hopr it helps you the best way.
2
It's a Win32 FAQ.
Ask on professional Win32 newsgroup :
news://comp.os.ms-windows.programmer.win32
2