Want to execute a C program from a VisualC++
Closed
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.
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.
Related:
- 1 11 111 pattern in c
- Write a program to print the series 1 11 111 - Best answers
- 1 11 111 1111 pattern - Best answers
- Coagula program - Download - Other
- Window washer program - Download - Cleaning and optimization
- Kerbal space program download - Download - Simulation
- End it all program - Download - Cleaning and optimization
- Download program winrar - Download - File decompression
2 responses
wonderpc
Posts
15
Registration date
Wednesday November 5, 2008
Status
Member
Last seen
May 18, 2009
2
Jan 30, 2009 at 02:11 AM
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.
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.