I need to define the DllCanUnloadNow() function in one of my .ocx component(OLE based COM DLL).
The COM DLLs which are having ATL support are also having CComModule global object, which can be used to get the lock count. For this particular case it's easy to implement the DllCanUnloadNow() function.
In my .ocx component, I do not have the ATL support. For this I am looking for some alternate of CComModule to implement the DllCanUnloadNow() function.
So, my question is to how to implement the DllCanUnloadNow() function if we do not have the CComModule object?
If we see the MSDN documentation for DllCanUnloadNlow(), it says-
"OLE does not provide this function. DLLs that support the OLE Component Object Model (COM) should implement and export DllCanUnloadNow."
Any ideas would be highly appreciable.