Numpty question alert.
Is COM one type of DLL interface, or are DLLs one type of COM interface?
If I call a Native (not .net) C++ DLL from Python using ctypes, is that using COM?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes and no. Per-se COM has nothing to do with DLL exports as such, but it is often implemented through one or more DLL entry points for inproc servers.
In this case the registry holds some book-keeping information so that the DLL can be found (which doesn’t have to be named
*.dll) and theDllGetClassObjectentry point can be called implicitly whenever you instantiate the COM object through. So when you callCoCreateInstanceorCoCreateInstanceExand give a CLSID/GUID, what happens behind the scenes is that registered COM classes are looked up in the registry to figure out the mechanism (of which DLL is one) to use and then in case of DLLs the functionDllGetClassObjectwill get called to create the instance you requested. In theory you can do all of that manually as well. COM just provides a nice way to hide the gory details and give you that unified abstraction layer on top.Note: COM DLLs are DLLs proper on Windows, but DLLs in general have nothing to do with COM. DLLs provide but one way to implement COM objects – specifically for COM InProc servers.
Often there are four functions in such a COM DLL:
DllCanUnloadNowDllGetClassObjectDllRegisterServerDllUnregisterServerNo. To my knowledge there are separate Python mechanisms for COM on Windows. See here.
Edit: COM vs ActiveX
COM, ActiveX and OLE are all names for basically the same underlying mechanisms with at most a slightly changed focus (for example in the case of ActiveX).