Results 1 to 3 of 3

Thread: C++ to VB6 ?

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2001
    Location
    IE
    Posts
    3

    Lightbulb 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.

  2. #2
    Lively Member
    Join Date
    Dec 2000
    Location
    Indiana
    Posts
    73

    Question 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

  3. #3
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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
  •  



Click Here to Expand Forum to Full Width