Get Process ID of COM Server

前端 未结 2 574
粉色の甜心
粉色の甜心 2020-12-06 12:28

I\'m doing some automation via a combination of windows message sending directly to HWNDs and calls to a COM server exposed by the automated application.

If there is

相关标签:
2条回答
  • 2020-12-06 13:10

    If you control (write code for) both the server and the client you can add a method to your COM interface that would return the process / thread ID or anything of this nature (e.g. server hostname if it is remote) on the server end. I second @Hans - unless you have access to the server implementation you may be out of luck by design.

    0 讨论(0)
  • 2020-12-06 13:25

    I believe the kimgr CoGetServerPID function will give you the process-id of your COM server. However, it only works if the process-id is <65k.

    0 讨论(0)
提交回复
热议问题