[win32all] Out parameter in outgoing interface

Mark Hammond mhammond at skippinet.com.au
Thu Sep 12 19:05:03 EDT 2002

Syver Enstad wrote:
> It does not seem possible use out parameters in an outgoing interface.
> Scenario:
> outgoing dispinterface, atl implementation of server, makepy support
> generated, python client which implements the outgoing interface.
> Tried with both win32com.client.getevents and
> win32com.client.DispatchWithEvents
> Debugged through it, the event gets fired from atl code the python
> code gets called, I thought maybe returning a tuple (the return value
> + the outgoing value) would work but the out parameter, a BSTR* (ie a
> OLECHAR**) is untouched back in ATL land.
> I guess this is unsupported, or??

This does work.  Try it first with a simple type.  For a string, you may 
be expecting the string to be modified in place, but in general, a new 
BSTR will be allocated and returned.


More information about the Python-list mailing list