Click to See Complete Forum and Search --> : VB+C program how to combine


arunravi
October 20th, 2004, 08:23 AM
Hi all,

I have a specific requirement.

I have a VB program which must spawn a c program (written in DOS, a console program), and must wait for its completion. IF console program returns a negative value the VB program must exit.

Is this possible ? How can i do this if possible?.

Or how can one pass values between a c program and a VB program, without using files?

Now If i write a windows application how can i spawn the VB program. if i9 have the path of it?

please consider this as very urgent

thanks & regards

arun

kirants
October 20th, 2004, 07:28 PM
Some Win32 APIs that might help:

To spawn a process ( VB program from VC or VC program from VB or console program from VC or whatever) :
CreateProcess

To get the return value of main:
GetExitCodeProcess

wshcdr
October 25th, 2004, 09:01 PM
Use DLL can combine C and VB, :)