Click here to Skip to main content
16,022,297 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello Folks,
1. Is there any way to get COM client pid once connected to COM server from COM server?

2. How to implement the authorization so that only allowed apps can call my COM server? any pointers will be useful

-- Vikram

What I have tried:

google search, chatGPT and few articles on codeproject.
Posted

I do not think a process identifier will work for what you want because it will vary every time app starts up. If you have the source code to the COM server then I think the best way to do this would be through interface methods in the server that are called by clients. In other words, you need to implement an authorization interface in the server that clients can call.
 
Share this answer
 
As Rick wrote the pid is some changing value and so no use is in it. I see rather their a FLAW in your concept for using the pid for some nasty operation. Dont do it - find some other way.

When you need no allowed apps than you need some authorization process. Sound you need some password or PKI implementation. See overview PKI.
Another appproach is that the client provides some interface to get some authentication like some challenge and response logic.
 
Share this answer
 
Comments
Member 15329325 13-Jun-24 2:16am    
Not really a nasty operation:) I would like to know who is calling me and verify the caller. I liked the IDEA of AUTH though.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900