I have a COM DLL written in Visual C++. I fully control that COM DLL code. Of course it can be consumed from both managed and unmanaged applications. I want to insert a very specific check that should only be run when the COM DLL is consumed by a .NET application.
Is there some programmatic way for my COM object to detect whether it is being consumed from a .NET application or from an unmanaged application?