Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi all!

How would one go about *programatically* blocking all processes from communicating with a COM service except processes that are running from a specific location?

Possible places that I'm looking into now are the following:
In the DllGetClassObject implementation
In the IClassFactory::CreateInstance implementation

The problem is that the two methods above don't seem to have any idea about the COM client process.... so I need your help on this one.

So I guess what I really want to know is:
1- Which parts of the COM implementation know about the caller process
2- Which one of these parts is the best place to "deny" the caller request.

p.s. if you haven't guessed it by now, I know nothing about COM :sigh:
Posted

1 solution

You may change a bit the point of view and make the COM service requiring a runtime licence from its clients. This way only allowed clients will access it.
:)
 
Share this answer
 
Comments
Ribhi Kamal 19-Feb-11 15:37pm    
Thanks! But I'm really unfamiliar with runtime licence (not that it makes a difference). However, I'd like to explore the process path way to its fullest before giving up :). The next step would be to verify the process signer.

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