Using or Implementing Objects
There is a clear distinction between using COM objects and implementing COM objects. When you use a COM object, you make method calls on an object provided externally. When you implement a COM object, you publish an object with a number of interfaces external clients can use.
This distinction is just as true for the
IDispatch
interface; programs that use an
IDispatch object must call the
GetIDsOfNames() and Invoke()
methods to perform method calls or property reference. Objects that
wish to allow themselves to be called via
IDispatch must implement the
GetIDsOfNames() and Invoke()
methods, providing the logic for translating between names and IDs,
and so forth.
In the PythonCOM world, this distinction is known as client- and server-side COM. Python programs that need to use COM interfaces use client-side COM, while Python programs that implement COM interfaces use server-side COM.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access