Search : in
By :

Want to execute a C program from a VisualC++

Last answer on Jan 30, 2009 6:46:58 pm GMT hummy, on Jan 29, 2009 2:43:13 pm GMT 
 Report this message to moderators

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.

Configuration: Linux Fedora
Firefox 1.0.4

Best answers for « want to execute a C program from a VisualC++ » in :
Change the default installation folder C: \ Program Files Show Change the default installation folder C: \ Program Files The installation of most software programs are set by default in the C: \ Program Files. Below is a means of how to change into another partition. Under Windows Vista, select...
A dialect for C language ShowA dialect for C language Cyclone language Conclusion You want to do some C programming but the fact that C embedded automatic Garbage Collector will make debugging harder and is not quite effective when making system programming, such...
Graphical interfaces for SQLite ShowGraphical interfaces for SQLite SQLite is a powerful database management engine found in a relatively small C programming library; it requires no monitoring and can be used with most programming languages (C, C++, Java, Python). Unlike...
Compiling a program in C with Dev C++ on Vista ShowCompiling a program in C with Dev C++ on Vista Compiling a C source code under Vista with Dev C++, can be a quite difficult procedure. Quick solution: the g++ compiler To be used with Dev-PSV: Go to Tools/compiler options and...
Introduction to object-oriented programming ShowA new programming concept Extract from "Understanding Active X and OLE" by David Chappel "In the last 35 years, designers of computer hardware have gone from designing machines the size of a hangar to thin notebooks based on minuscule...
Introduction to UNIX systems ShowThe UNIX system The Unix system is a multi-user, multi tasking operating system which means that it allows a single or multiprocessor computer to simultaneously execute several programs by one or several users. It has one or several command...
Msmsgs - msmsgs.exe Showmsmsgs - msmsgs.exe msmsgs.exe (msmsgs stands for Microsoft Messenger) is a process which corresponds to the instant messaging client MSN Messenger. The file which corresponds to this process is normally found in the directory "C:\Program...

1

wonderpc, on Jan 30, 2009 7:11:25 am GMT

Hi,
try this link to get all the information you are searching for:
http://cplus.about.com/od/learningc/qt/compilingc.htm
i hopr it helps you the best way.

Reply to wonderpc

2

 Steven, on Jan 30, 2009 6:46:58 pm GMT

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

Reply to Steven