Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Can a program/application written in QT access and read some Data from VB/VC++ applications
Forum Update on Monday, May 27th 2025

Can a program/application written in QT access and read some Data from VB/VC++ applications

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 4 Posters 810 Views
  • 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.
  • V Offline
    V Offline
    VikramSamy
    wrote on 2 Aug 2019, 08:56 last edited by VikramSamy 8 Feb 2019, 09:00
    #1

    HI all

    I have a window application (written using VC++), i will just called it
    "Application A".
    The "Application A" is a windows dialog written using windows
    MFC using visual studio.

    Application B is default application running always, and once Application A is executed,it will get some data string from Application B and displays it on its window. By looking at the application A sourcecode:-

    Once the application A is executed, it will find another window application (which i called as Application B just now) using "Findwindow" , if the expected window is found, it then use GetTextWindow function to get a string from the windows. It then create a COPYDATASTRUCT and copies the string into it and then uses SendMessage to send it.

    also in the Application A itself, it have a OnCopyData function,which i think receives the message, and copy out the string from the COPYDATASTRUCT and displays it on a Clistbox.

    So As the application A executed, it will continuously add the newly received string from applications B to the Clistbox. (understand this after some study into the Application A sourcode),

    And now my question is, i want to write a QT program to read the strings which is being added in the Application A clistbox. Can we write a Program in QT and read some other VB/VC++ windows applications??

    Application B is actually a default camera processing application which read a camera and gets some data in strings format. The camera default application is running on windows 10. This camera application is automatically run after the camera is powered on, basically the data string is number people detected,timestamp and datestamp and it has a live low resolution video. As for now im concern on the numberofpeople count,timestamp and datestamp only.

    So to read the Data string of the default camera application i have to execute the application A and by executing the application A, it will get the data strings from the camera applications as i explain above.

    So for now my only access to get the data string from the camera is through this Application A. Im not sure if i can direct read camera application as i dont have any info of camera ,its protocol or ,sourcecodes or anything, just a running application.

    Because im not much experiences using Visual studios/c++,
    i plan to write a application in QT to read application A and get the same data string and then i can do whatever i want with it.
    so any hints,tips and idea to have a head start on this???

    I want to use QT because i just started working with QT and have some knowledge on it and wanted to continue using QT only.....

    P 1 Reply Last reply 2 Aug 2019, 10:34
    0
    • V VikramSamy
      2 Aug 2019, 08:56

      HI all

      I have a window application (written using VC++), i will just called it
      "Application A".
      The "Application A" is a windows dialog written using windows
      MFC using visual studio.

      Application B is default application running always, and once Application A is executed,it will get some data string from Application B and displays it on its window. By looking at the application A sourcecode:-

      Once the application A is executed, it will find another window application (which i called as Application B just now) using "Findwindow" , if the expected window is found, it then use GetTextWindow function to get a string from the windows. It then create a COPYDATASTRUCT and copies the string into it and then uses SendMessage to send it.

      also in the Application A itself, it have a OnCopyData function,which i think receives the message, and copy out the string from the COPYDATASTRUCT and displays it on a Clistbox.

      So As the application A executed, it will continuously add the newly received string from applications B to the Clistbox. (understand this after some study into the Application A sourcode),

      And now my question is, i want to write a QT program to read the strings which is being added in the Application A clistbox. Can we write a Program in QT and read some other VB/VC++ windows applications??

      Application B is actually a default camera processing application which read a camera and gets some data in strings format. The camera default application is running on windows 10. This camera application is automatically run after the camera is powered on, basically the data string is number people detected,timestamp and datestamp and it has a live low resolution video. As for now im concern on the numberofpeople count,timestamp and datestamp only.

      So to read the Data string of the default camera application i have to execute the application A and by executing the application A, it will get the data strings from the camera applications as i explain above.

      So for now my only access to get the data string from the camera is through this Application A. Im not sure if i can direct read camera application as i dont have any info of camera ,its protocol or ,sourcecodes or anything, just a running application.

      Because im not much experiences using Visual studios/c++,
      i plan to write a application in QT to read application A and get the same data string and then i can do whatever i want with it.
      so any hints,tips and idea to have a head start on this???

      I want to use QT because i just started working with QT and have some knowledge on it and wanted to continue using QT only.....

      P Offline
      P Offline
      Pl45m4
      wrote on 2 Aug 2019, 10:34 last edited by
      #2

      @vikramsamy

      Do you have access to the code from App A (allowed to make changes?).

      You could:

      • Use sockets to send and recieve data (your strings)
      • Write it to a file and read the file with your Qt App

      @vikramsamy said in Can a program/application written in QT access and read some Data from VB/VC++ applications:

      Because im not much experiences using Visual studios/c++
      [...]
      I want to use QT because i just started working with QT and have some knowledge on it and wanted to continue using QT only.....

      So you have no experience in VS/C++ and Qt?! Was App A written by you?


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      V 1 Reply Last reply 6 Aug 2019, 01:20
      1
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 2 Aug 2019, 10:40 last edited by
        #3

        Hi,

        Do I understand correctly that you want your application to "spy" on application A while application A "spies" on application B ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        J V 2 Replies Last reply 2 Aug 2019, 13:18
        0
        • S SGaist
          2 Aug 2019, 10:40

          Hi,

          Do I understand correctly that you want your application to "spy" on application A while application A "spies" on application B ?

          J Online
          J Online
          JonB
          wrote on 2 Aug 2019, 13:18 last edited by JonB 8 Feb 2019, 13:59
          #4

          @sgaist

          you want your application to "spy" on application A while application A "spies" on application B

          Quis custodiet ipsos custodes? ;-)

          S 1 Reply Last reply 2 Aug 2019, 19:58
          2
          • J JonB
            2 Aug 2019, 13:18

            @sgaist

            you want your application to "spy" on application A while application A "spies" on application B

            Quis custodiet ipsos custodes? ;-)

            S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 2 Aug 2019, 19:58 last edited by
            #5

            @jonb said in Can a program/application written in QT access and read some Data from VB/VC++ applications:

            Quis custodiet ipsos custodes? ;-)

            Uatu ;-)

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            3
            • P Pl45m4
              2 Aug 2019, 10:34

              @vikramsamy

              Do you have access to the code from App A (allowed to make changes?).

              You could:

              • Use sockets to send and recieve data (your strings)
              • Write it to a file and read the file with your Qt App

              @vikramsamy said in Can a program/application written in QT access and read some Data from VB/VC++ applications:

              Because im not much experiences using Visual studios/c++
              [...]
              I want to use QT because i just started working with QT and have some knowledge on it and wanted to continue using QT only.....

              So you have no experience in VS/C++ and Qt?! Was App A written by you?

              V Offline
              V Offline
              VikramSamy
              wrote on 6 Aug 2019, 01:20 last edited by
              #6

              @pl45m4 said in Can a program/application written in QT access and read some Data from VB/VC++ applications:

              @vikramsamy

              Do you have access to the code from App A (allowed to make changes?).

              You could:

              • Use sockets to send and recieve data (your strings)
              • Write it to a file and read the file with your Qt App

              @vikramsamy said in Can a program/application written in QT access and read some Data from VB/VC++ applications:

              Because im not much experiences using Visual studios/c++
              [...]
              I want to use QT because i just started working with QT and have some knowledge on it and wanted to continue using QT only.....

              So you have no experience in VS/C++ and Qt?! Was App A written by you?

              Yup i have access to application A source-code, and yup most probably i can modified it.... but at this moment i want to use QT because i have done some applications wt QT and planning to use the same framework...

              I have embedded programming knowledge and have develop an application with QT.

              The application A written by third party, who develop the camera., i was thinking not to modified application A as i need to do it in VC++, worse case only i do that.... but if i can just write a code in QT and read the APPLICATION A strings... that would be nice....unless cant do in QT, then no choice i must do using VC+++

              1 Reply Last reply
              0
              • S SGaist
                2 Aug 2019, 10:40

                Hi,

                Do I understand correctly that you want your application to "spy" on application A while application A "spies" on application B ?

                V Offline
                V Offline
                VikramSamy
                wrote on 6 Aug 2019, 01:49 last edited by
                #7

                @sgaist said in Can a program/application written in QT access and read some Data from VB/VC++ applications:

                Hi,

                Do I understand correctly that you want your application to "spy" on application A while application A "spies" on application B ?

                oh if the concept is called spying then it i a YES, i want MY application to get the data strings on from the application A as how
                applications A read from application B.

                as told before, application B is actually the camera application which i dont have any source-code or understanding of it.
                but to read the camera data from application B, u need to execute application A (which i have its source-code), and it gets the strings from application B as explain previously.

                from application A source-code i understand that when it is executed it is finding application B using Findwindow and then GetWindowText, it then using WM_COPYDATA for message passing and receiving,once it received the string it is displaying on its Clistbox.....
                please let me if u need more infomation, and hopefully i can make right decision to use QT to create my application or not...

                P 1 Reply Last reply 6 Aug 2019, 07:36
                0
                • V VikramSamy
                  6 Aug 2019, 01:49

                  @sgaist said in Can a program/application written in QT access and read some Data from VB/VC++ applications:

                  Hi,

                  Do I understand correctly that you want your application to "spy" on application A while application A "spies" on application B ?

                  oh if the concept is called spying then it i a YES, i want MY application to get the data strings on from the application A as how
                  applications A read from application B.

                  as told before, application B is actually the camera application which i dont have any source-code or understanding of it.
                  but to read the camera data from application B, u need to execute application A (which i have its source-code), and it gets the strings from application B as explain previously.

                  from application A source-code i understand that when it is executed it is finding application B using Findwindow and then GetWindowText, it then using WM_COPYDATA for message passing and receiving,once it received the string it is displaying on its Clistbox.....
                  please let me if u need more infomation, and hopefully i can make right decision to use QT to create my application or not...

                  P Offline
                  P Offline
                  Pl45m4
                  wrote on 6 Aug 2019, 07:36 last edited by
                  #8

                  @vikramsamy

                  You could try to modify your App A, that it sends the data in the same way, as it gets the data from App B.

                  https://www.qtcentre.org/threads/22333-Using-WinAPI-FindWindow-with-Qt

                  I guess the best way would be to implement a socket to send / recieve data instead of grabbing the string from your App Window.


                  If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                  ~E. W. Dijkstra

                  1 Reply Last reply
                  2

                  6/8

                  6 Aug 2019, 01:20

                  • Login

                  • Login or register to search.
                  6 out of 8
                  • First post
                    6/8
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved