|
-
May 31st, 2001, 07:53 PM
#1
Thread Starter
New Member
C++ to VB6 ?
I have a VC++6 program generating data in console mode. I need to pass the data real-time to a VB6 front-end? Both programs need to run simultaneously the C program passing the data to the VB program as quickly as it can and the VB program using the data as fast as possible. I have read about pipes but is there a simpler way of doing this? The data to be "streamed" are about 8K-16K maximum and absolute synchronization is not essential. Any ideas? Would be mightily appreciated. Thanks.
ronin1.
-
Jun 3rd, 2001, 03:00 PM
#2
Lively Member
ActiveX???
Maybe you could make an ActiveX DLL, with 2 functions. Make the DLL Standalone (I think thats what it is...). The C program calls the DLL's function named "C" whis saves it to a private variable. The VB program can call another function in the DLL, which checks to see if the new data is different than the old data (use 2 vars). The VB program calls this function as much as possible. (Timer interval 1, or loop with DoEvents?) Not sure if this would work, but its worth a try. You could make the DLL in VB, its not that hard, and it would talk to C++... Theres a great article on www.vbworld.com
-
Jun 3rd, 2001, 03:33 PM
#3
Monday Morning Lunatic
It's been established on the forums how to run an external program within a VB program using CreateProcess and Read/WriteFile.
Do a search for that and you should find your answer
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|