> 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).

Thanks for this tip! Unfortunately, the few times I tried running it,
there wasn't any output
before crashing, but I'll keep at it and see if it turns up anything.

> > 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?

I think because it is an interface, makepy only generated these v_table entries:

IMbtQuotesNotify_vtables_dispatch_ = 0
IMbtQuotesNotify_vtables_ = [
        (( 'OnQuoteData' , 'pQuote' , ), 1610678272, (1610678272, (),
[ (36, 1, None, None) , ], 1 , 1
 , 4 , 0 , 12 , (3, 0, None, None) , 0 , )),
        (( 'OnLevel2Data' , 'pRec' , ), 1610678273, (1610678273, (), [
(36, 1, None, None) , ], 1 , 1
, 4 , 0 , 16 , (3, 0, None, None) , 0 , )),
        (( 'OnTSData' , 'pRec' , ), 1610678274, (1610678274, (), [
(36, 1, None, None) , ], 1 , 1 , 4
, 0 , 20 , (3, 0, None, None) , 0 , )),
        (( 'OnOptionsData' , 'pRec' , ), 1610678275, (1610678275, (),
[ (36, 1, None, None) , ], 1 , 1
 , 4 , 0 , 24 , (3, 0, None, None) , 0 , )),
]

Is the custom of passing an object that implements an interface as an
argument to a COM function an unusual one?  I've searched for other
COM functions that do this, and have yet to find any.  The most common
way of registering an event sink for most COM applications seems to be
overriding the callback functions on a COM object directly.

Thanks for all your help!
_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to