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. C / C++ / MFC
  4. Communication between C++ DLL and VB6 window.

Communication between C++ DLL and VB6 window.

Scheduled Pinned Locked Moved C / C++ / MFC
c++performance
3 Posts 2 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

    What I need to do is have a C++ DLL send messages to a VB6 Program window and get back data (long and double) that is in the VB Code. I can get the handle to the window using FindWindow and send messages to it but I'm having problems getting the data back from the VB6 program without getting callback timeouts. Keep in mind the DLL currently creates a CDialog window to handle the communication between the two since the program that is calling the DLL is third party software from Aerotech that can use functions in C++ DLLs to perform functions that it can't do internally. Execution speed of the DLL functions are important so I would like to stay away from using I/O files to pass the data. Thanks, George

    T 1 Reply Last reply
    0
    • B BubbaGeeNH

      What I need to do is have a C++ DLL send messages to a VB6 Program window and get back data (long and double) that is in the VB Code. I can get the handle to the window using FindWindow and send messages to it but I'm having problems getting the data back from the VB6 program without getting callback timeouts. Keep in mind the DLL currently creates a CDialog window to handle the communication between the two since the program that is calling the DLL is third party software from Aerotech that can use functions in C++ DLLs to perform functions that it can't do internally. Execution speed of the DLL functions are important so I would like to stay away from using I/O files to pass the data. Thanks, George

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #2

      have you read this[^] ?


      [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

      B 1 Reply Last reply
      0
      • T toxcct

        have you read this[^] ?


        [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

        B Offline
        B Offline
        BubbaGeeNH
        wrote on last edited by
        #3

        Thanks for trying to help but not what I'm trying to do. I'm calling a function in the DLL from a third party software, the function then sends a message to a different program, written in VB6, and waits for that program to reply. The way it was written when I got the code was the VB6 code was sending a message (using SendMessage) back to the DLL that called the VB6 code. Now if I understand Windows correctly it will never finish because neither SendMessage will return because the last SendMessage won't be processed until the DLL responds to it and the DLL won't read it until the VB6 code responds to the initial SendMessage. ie. Software1 ----> DLL ----> Software2(VB6) -----> DLL -----> Software1 Does that explain it better? I've looked at using the WPARAM and LPARAM but can't find how to use them in VB6 because it looks like they are only passed by value. Maybe setting some shared variables in the DLL and having both programs access the variables. George

        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