Want to execute a C program from a VisualC++

[Closed]
Report
-
 Steven -
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

Posts
15
Registration date
Wednesday November 5, 2008
Status
Member
Last seen
May 18, 2009
2
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
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2942 users have said thank you to us this month

It's a Win32 FAQ.
Ask on professional Win32 newsgroup :
news://comp.os.ms-windows.programmer.win32
2
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2942 users have said thank you to us this month