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. COM
  4. Problem with "ActivationContext" and multithreading

Problem with "ActivationContext" and multithreading

Scheduled Pinned Locked Moved COM
helpc++comquestion
2 Posts 2 Posters 1 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.
  • J Offline
    J Offline
    Jurgen Jung
    wrote on last edited by
    #1

    I have an application(MFC), which should work with some "registration-free" com-components. I have extended the the application manifest and created a "com-manifest", as shown in the ms-examples. Everything works fine. BUT, one of my menuitems starts a userthread which needs one of the "registration-free" com-components, an ocx. The creation of the component succeeeds, but the QuickActivate() fails with an access violation. Some ideas what goes wrong? :sigh: Hoping for help, thank you.

    N 1 Reply Last reply
    0
    • J Jurgen Jung

      I have an application(MFC), which should work with some "registration-free" com-components. I have extended the the application manifest and created a "com-manifest", as shown in the ms-examples. Everything works fine. BUT, one of my menuitems starts a userthread which needs one of the "registration-free" com-components, an ocx. The creation of the component succeeeds, but the QuickActivate() fails with an access violation. Some ideas what goes wrong? :sigh: Hoping for help, thank you.

      N Offline
      N Offline
      Nathan Holt at EMOM
      wrote on last edited by
      #2

      Jürgen Jung wrote:

      I have an application(MFC), which should work with some "registration-free" com-components. I have extended the the application manifest and created a "com-manifest", as shown in the ms-examples. Everything works fine. BUT, one of my menuitems starts a userthread which needs one of the "registration-free" com-components, an ocx. The creation of the component succeeeds, but the QuickActivate() fails with an access violation. Some ideas what goes wrong? Hoping for help, thank you.

      A .ocx file sounds like an ActiveX control dll, and ActiveX controls can only run in the user interface thread. It seems likely that whatever object you need to access would need special thread safety additions. If the component you need is itself an ActiveX control, then your problem is more difficuld. You can either find some way to get the control accessed from the UI thread, or you could factor out whatever you need access to into a thread safe component. Nathan

      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