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. Thread Id of client app

Thread Id of client app

Scheduled Pinned Locked Moved COM
comsysadminquestion
4 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.
  • I Offline
    I Offline
    In At
    wrote on last edited by
    #1

    I have an out-of-proc COM server. In one of the method of my COM server, I need Thread Id of the client application who is calling the method. Is there any way to get thread id fo client process in COM server code? Regards.

    V 1 Reply Last reply
    0
    • I In At

      I have an out-of-proc COM server. In one of the method of my COM server, I need Thread Id of the client application who is calling the method. Is there any way to get thread id fo client process in COM server code? Regards.

      V Offline
      V Offline
      valikac
      wrote on last edited by
      #2

      One solution is to require the client to pass in its ID as one of the parameters. Kuphryn

      I 1 Reply Last reply
      0
      • V valikac

        One solution is to require the client to pass in its ID as one of the parameters. Kuphryn

        I Offline
        I Offline
        In At
        wrote on last edited by
        #3

        You are right, but this is not a solution for the problem. I was looking for an API to get thread id of COM client.

        V 1 Reply Last reply
        0
        • I In At

          You are right, but this is not a solution for the problem. I was looking for an API to get thread id of COM client.

          V Offline
          V Offline
          valikac
          wrote on last edited by
          #4

          There is no such API to my understanding. If the client does not provide the server with more information, then there is nothing linking the them except for the pointer that the client holds and the reference count on the server-side. Kuphryn

          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