Communicating with Non Qt Application



  • Dear All:

    I have been trying to use Qt to develop some GUI for an existing project. This project is done in Labwindows but I would like to use Qt for the new things. I try to create a DLL and use it inside this project to show the GUI but I did not success. I was thinking then to create a separate Qt application and to use the Share Memory from windows. This seem to be not a big problem specially if I use Boots the problem I have now is that I need to inform the Qt application when to look for new data in the share memory. Normally I will think to use the SendMessage from the windows API. That someone has any experience with this. A piece of code will be of real value.

    All the best and thanks for any help
    Ernesto



  • Hi,

    I never used shared memory for inter-process communication, but regarding "QSharedMemory":http://qt-project.org/doc/qt-5/qsharedmemory.html documentation, I don't think you can inform one process there is new data to look for. Shared memory is more like an event queue : you're not informed by the event queue, it's up to you to inspect it when you want -- and when you can, i.e. when your process is not busy -- to see if there is something to process. If you're about to use messages, I would say just forget shared memory and use messages to pass your data instead.



  • The question for me will be if I can use the windows message system from non Qt application to a Qt application? If that is the case then I have all my problems solve.

    Best and thanks
    Ernesto


  • Lifetime Qt Champion

    Hi,

    AFAIK, yes you can. And you have QCoreApplication::winEventFilter to handle them


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.