Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Need some suggestions.

Need some suggestions.

Scheduled Pinned Locked Moved Visual Basic
helpc++questionworkspace
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    BubbaGeeNH
    wrote on last edited by
    #1

    Currently have a VB6.0 program that is used to monitor/control a device via a serial connection. It is constantly polling the device to keep data up to date and to keep the communication link active. My problem is finding a reliable way to access the data via an external program (written in C++)(ProgC++). The previous programmer has been using "SendMessage" to send information to the VB6.0 program(ProgVB) and setup portions of device but his way of addressing getting information back from the program doesn't work. He was trying to use a similiar "SendMessage" approach but didn't take into account that the SendMessage from ProgC++ until the SendMessage from ProgVB finishes and that will only finish once ProgC++ reads it and acts on it. So it gets stuck in a cycle where neither program will run until the other finishes. Thought of using PostMessage but run into the issue where the data may not be valid in time for me to use it since PostMessage never reports when the message has been handled like SendMessage does. Is there a way to build external subroutines into VB6.0 that I can access from outside of the program? Thanks, George

    D 1 Reply Last reply
    0
    • B BubbaGeeNH

      Currently have a VB6.0 program that is used to monitor/control a device via a serial connection. It is constantly polling the device to keep data up to date and to keep the communication link active. My problem is finding a reliable way to access the data via an external program (written in C++)(ProgC++). The previous programmer has been using "SendMessage" to send information to the VB6.0 program(ProgVB) and setup portions of device but his way of addressing getting information back from the program doesn't work. He was trying to use a similiar "SendMessage" approach but didn't take into account that the SendMessage from ProgC++ until the SendMessage from ProgVB finishes and that will only finish once ProgC++ reads it and acts on it. So it gets stuck in a cycle where neither program will run until the other finishes. Thought of using PostMessage but run into the issue where the data may not be valid in time for me to use it since PostMessage never reports when the message has been handled like SendMessage does. Is there a way to build external subroutines into VB6.0 that I can access from outside of the program? Thanks, George

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      SendMessage is the poor-mans hack to IPC. I suggest using REAL Interprocess Communication. There's probably some IPC component out on the web somewhere. I just don't know of any off the top of my head. I stopped using VB6 6 years ago.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007

      C 1 Reply Last reply
      0
      • D Dave Kreskowiak

        SendMessage is the poor-mans hack to IPC. I suggest using REAL Interprocess Communication. There's probably some IPC component out on the web somewhere. I just don't know of any off the top of my head. I stopped using VB6 6 years ago.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #3

        Dave Kreskowiak wrote:

        VB6 6 years ago.

        Took me a second to realise that wasn't a typo...

        Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups