> Thanks for your help -- I searched around some more and I think I
> have the basic idea down -- if you want to implement a COM
> interface, it should
> look something like this:

That all looks correct!

> import win32com.server.util
> qnotify = win32com.server.util.wrap(Q())

Try adding useDispatcher=1 as a param to wrap.  That will cause the object
to use a "debug" dispatcher, and should spew print statements to
win32traceutil - ie, the same as if the object was registered with "--debug"
(but as this object is not registered at all, --debug isn't an option; the
param to wrap is though).

> Sometimes the OnQuoteData callback is
> invoked with an int (the int is 1240772, if that means anything)
> instead of the quote datatype as advertised. Sometimes the interpreter
> crashes.

Ack - that can't be good.  What is the makepy generated code for
OnQuoteData?

> However, I suspect that the above code is correct, unless I
> am still doing something wrong.  (Perhaps using wrap is not the right
> function for creating an object that is passed as an argument to
> another COM function?)

It all looks ok to me, so I'm not really able to offer much more help at
this stage.

Mark

_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to