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
  1. Home
  2. General Programming
  3. ATL / WTL / STL
  4. ATL Out of process EXE Question

ATL Out of process EXE Question

Scheduled Pinned Locked Moved ATL / WTL / STL
c++comsysadminhelptutorial
2 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.
  • K Offline
    K Offline
    ky_rerun
    wrote on last edited by
    #1

    Setup: I have a out of process COM exe which exposes a couple of objects Object A is created and has a connection point interface. On initialization Object A Creates a hidden window using the create function derived from CWindowImpl that listens for a custom message. Object A then creates a worker thread Worker thread does some stuff and sends a message to the hidden window to notify the original thread and have that thread fire an event on the com object Problem::mad: Nothing happens. The reason is that there is no message pump on the thread that contains Object A if it were and in process server the message pump for the client would work. I put a message pump after the thread spawn except it locks up the client since it is waiting for a return from the object creation. I tried to look at the ATL base classes to see if I could find how to add a message pump while still returning, but it was to no avail.

    M 1 Reply Last reply
    0
    • K ky_rerun

      Setup: I have a out of process COM exe which exposes a couple of objects Object A is created and has a connection point interface. On initialization Object A Creates a hidden window using the create function derived from CWindowImpl that listens for a custom message. Object A then creates a worker thread Worker thread does some stuff and sends a message to the hidden window to notify the original thread and have that thread fire an event on the com object Problem::mad: Nothing happens. The reason is that there is no message pump on the thread that contains Object A if it were and in process server the message pump for the client would work. I put a message pump after the thread spawn except it locks up the client since it is waiting for a return from the object creation. I tried to look at the ATL base classes to see if I could find how to add a message pump while still returning, but it was to no avail.

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      You can't make outgoing COM calls in a handler for a sent message. Change it to a posted message and it should work. --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | 1ClickPicGrabber | NEW~! CP SearchBar v3.0 | C++ Forum FAQ "Linux is good. It can do no wrong. It is open source so must be right. It has penguins. I want to eat your brain."   -- Paul Watson, Linux Zombie

      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