PythonCOM arbritrary vtable based interfaces

Mark Hammond mhammond at skippinet.com.au
Fri Feb 15 19:58:53 EST 2002


Sanjay wrote:
> What I am trying to do is something that was somewhat discussed on a
> previous thread, but I'm not sure the thought was fully completed. 
> Specifically, I would like to write an exchange server event sink by
> implementing two com interfaces, IExStoreAsyncEvents and
> IExStoreSyncEvents.  The problem I'm having is that when the python
> event listener is loaded as a com+ application, and I register this
> application for events with exchange, I get the error TypeError ...
> IID not supported.  From looking at the previous threads, it seems as
> this problem is caused by not being able to handle arbitrary vtable
> interfaces, such as the interface methods of IExStoreAsyncEvents and
> IExStoreSyncEvents.  If, however,  the two com classes
> IExStoreAsyncEvents and IExStoreSyncEvents were defined in a pyd, then
> pythoncom would have knowledge of these interfaces, and properly call
> my application.
> 
> I hope I'm explaining the problem clearly. I am a little confused as
> to how to get around this with pythoncom.

You need t6o check out the win32com\servers\test_pycomtest.py.  This 
shows how arbitary vtables must be loaded by your code before it is 
recognized.  This in-turn implies that the interface is described in a 
type library.

Mark.




More information about the Python-list mailing list