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. Managed C++/CLI
  4. Marshaling an interface between threads in a process

Marshaling an interface between threads in a process

Scheduled Pinned Locked Moved Managed C++/CLI
tutorialcsharpcomhelp
3 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.
  • M Offline
    M Offline
    Michael Mac
    wrote on last edited by
    #1

    I've got some problem trying to marshal an interface between threads in a process. :wtf: In Win32 app I can call CoMarshalInterThreadInterfaceInStream to marshal and CoGetInterfaceAndReleaseStream to unmarshal or use Global Interface Table but I don't know how to declare this functions/Com class in the .NET. Or mayby there is another solution build-in the framework. Can you guys write some example how to use this functions/COM class I'll appreciate it. Thanks in advance


    43 68 65 65 72 73 2c 4d 69 63 68 61 65 6c

    R 1 Reply Last reply
    0
    • M Michael Mac

      I've got some problem trying to marshal an interface between threads in a process. :wtf: In Win32 app I can call CoMarshalInterThreadInterfaceInStream to marshal and CoGetInterfaceAndReleaseStream to unmarshal or use Global Interface Table but I don't know how to declare this functions/Com class in the .NET. Or mayby there is another solution build-in the framework. Can you guys write some example how to use this functions/COM class I'll appreciate it. Thanks in advance


      43 68 65 65 72 73 2c 4d 69 63 68 61 65 6c

      R Offline
      R Offline
      Rama Krishna Vavilala
      wrote on last edited by
      #2

      In my opionion the framework takes care of that for you. Step back, rub your eyes, take a deep breath, stretch a bit, and reflect on the relative importance of CP, CG, the age / travel time sustained by supposedly 'fresh' cheese curds, and Life in General. - Shog9

      M 1 Reply Last reply
      0
      • R Rama Krishna Vavilala

        In my opionion the framework takes care of that for you. Step back, rub your eyes, take a deep breath, stretch a bit, and reflect on the relative importance of CP, CG, the age / travel time sustained by supposedly 'fresh' cheese curds, and Life in General. - Shog9

        M Offline
        M Offline
        Michael Mac
        wrote on last edited by
        #3

        That's right. :) I found the answer in the .Net SDK. But there is one requirement - both threads must be in the STA apartment, otherwise the function call on the interface will fail.


        43 68 65 65 72 73 2c 4d 69 63 68 61 65 6c

        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