Tilted Forum Project Discussion Community

Tilted Forum Project Discussion Community (https://thetfp.com/tfp/)
-   Tilted Knowledge and How-To (https://thetfp.com/tfp/tilted-knowledge-how/)
-   -   C++ / Visual Basic question (https://thetfp.com/tfp/tilted-knowledge-how/25277-c-visual-basic-question.html)

dimbulb 09-02-2003 09:10 AM

C++ / Visual Basic question
 
So i have a executable written in C++, and i wish to call this executable in Visual Basic, and be able to read results from running the C++ program.

The C program outputs its results in a text file when it's done running.

So my question is, how do I check, from Visual Basic for Applications, that the C program is done running?

thanks.

SaltPork 09-02-2003 10:07 AM

You have to use ShellandWait I think from advapi32.dll.

Flippy 09-02-2003 04:36 PM

I would use Shell, get the process ID, and use OpenProcess with the SYNCHRONIZE flag set.

Then, with the handle obtained from OpenProcess, use WaitForSingleObject

cowlick 09-02-2003 08:21 PM

So am I out of line in suggesting you simply throw a COM interface on the C++ program and load it from VB to get a rich programatic exchange?

GreasyP 09-10-2003 08:51 PM

Quote:

Originally posted by cowlick
So am I out of line in suggesting you simply throw a COM interface on the C++ program and load it from VB to get a rich programatic exchange?
Not at all, though some might argue the word "simply" is a bit misleading... ;)
Syncronizing the processes like ^^^ they said up there is probably easiest.

cowlick 09-12-2003 09:37 AM

Crud. I find VB one of the most annoying languages ever. What a lax grammar they build that language on.
I'd much rather C, C++, C#, Java, Lisp, JScript, Fortran...


All times are GMT -8. The time now is 03:39 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73