none
Detecting when a Client attaches to my OLE/COM server RRS feed

  • Question

  • We have an OLE/COM server application that exposes a rather large API to users. I really need to know when an API attaches and releases the server. For example knowing when someone attaches by calling GetObject( ) on our interface. I'm thinking that I need to override the default/automatic IUnknown interface AddRef() and Release() methods, however I'm not quite sure how to do that. Maybe this is the wrong approach and there is another way.  

    Friday, July 19, 2019 7:39 PM

All replies

  • I really need to know when an API attaches and releases the server.

    Why is this needed?

    What problem are you trying to solve?

    Friday, July 19, 2019 8:53 PM
  • As long as applications are using the normal CoCreateInstance APIs, the DllGetClassObject entry point in your DLL will be called.  It gets passed the CLSID to be created.  I should think that would be enough.

    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    Monday, July 22, 2019 6:24 AM