Invoking Python COM server as 'local' server
Mark Hammond
MarkH at ActiveState.com
Thu May 31 23:27:18 EDT 2001
Bill Bell wrote:
> To my understanding, one usually builds a local COM server as an
> EXE. However, a Python COM server is neither a DLL nor an EXE;
> it's a PY. So how the heck does the Python COM machinery
> decide whether to create an in-process server or a local server,
> particularly when the default _reg_clsctx provides for registration of
> a server as both?
This is a COM question. Python Programming on Win32 covers this in
detail. Gregory shows how to indicate your server only supports one
type of instantiation, and using the "clsctx" param to
win32com.client.Dispatch() allows your client to specifically choose.
If neither the object itself nor the consumer indicates a preference,
COM chooses the fastest one - inproc.
Altough your object is implemented as a .py file, the COM registry
always has a reference to a .exe or .dll - pythonw.exe and
pythoncomxx.dll, respectively.
Mark.
More information about the Python-list
mailing list