Can a program/application written in QT access and read some Data from VB/VC++ applications
-
wrote on 2 Aug 2019, 08:56 last edited by VikramSamy 8 Feb 2019, 09:00
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.....
-
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.....
wrote on 2 Aug 2019, 10:34 last edited byDo 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?
-
Hi,
Do I understand correctly that you want your application to "spy" on application A while application A "spies" on application B ?
-
Hi,
Do I understand correctly that you want your application to "spy" on application A while application A "spies" on application B ?
-
you want your application to "spy" on application A while application A "spies" on application B
Quis custodiet ipsos custodes? ;-)
@jonb said in Can a program/application written in QT access and read some Data from VB/VC++ applications:
Quis custodiet ipsos custodes? ;-)
Uatu ;-)
-
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?
wrote on 6 Aug 2019, 01:20 last edited by@pl45m4 said in Can a program/application written in QT access and read some Data from VB/VC++ applications:
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+++
-
Hi,
Do I understand correctly that you want your application to "spy" on application A while application A "spies" on application B ?
wrote on 6 Aug 2019, 01:49 last edited by@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... -
@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...wrote on 6 Aug 2019, 07:36 last edited byYou 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.
1/8