Results 1 to 10 of 10

Thread: PostMessage() across process boundaries equivalent

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Mountain View, CA
    Posts
    279
    Thanked 42 Times in 37 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: PostMessage() across process boundaries equivalent

    Do you have a commercial license? If not don't bother reading the rest of my answer.

    With the QtSingleApplication solution code, you can set up your different apps to be singletons (I'm not sure if this is appropriate for you). Then, to send a message, you can just execute the app using QProcess and a commandline that describes your new message. If the app is already running, then a message is just sent directly to the running app.

    In fact, if you inspect the QtSingleApplication code carefully, you can probably change this to eliminate the singleton behaviour, but maintain the message passing behaviour.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany.
    Posts
    111
    Thanks
    29
    Thanked 3 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: PostMessage() across process boundaries equivalent

    Wow, nice hack . That sounds like it's worth playing with! I'll give it a try.

    thanks
    K

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: PostMessage() across process boundaries equivalent

    Or you can just use winapi to make your call and then catch it with platform events (winEvent or something like that -- never used it, so check the docs).

  4. #4
    Join Date
    Jan 2006
    Location
    Mountain View, CA
    Posts
    279
    Thanked 42 Times in 37 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: PostMessage() across process boundaries equivalent

    Doesn't work very well on other platforms though.

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: PostMessage() across process boundaries equivalent

    Just like COM itself.

  6. #6
    Join Date
    Jan 2006
    Location
    Mountain View, CA
    Posts
    279
    Thanked 42 Times in 37 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: PostMessage() across process boundaries equivalent

    Quote Originally Posted by wysota
    Just like COM itself.
    ...which is why he said this:

    eventually I'd like to remove the MS dependencies. and eventually would like to get away from COM altogether, I'll need to run on other operating systems. I think that'll be a challenge - I'll need to start learning CORBA ' stuff.

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: PostMessage() across process boundaries equivalent

    Yes, I missed that.

    Anyway, things like shared memory or named pipes are always an alternative (yes, I know Qt doesn't have direct support for them).

    BTW. Corba (and other RPCs) involve using network sockets, so with simple apps it might be simpler to just use network sockets yourself instead of higher level protocols.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.