[python-win32] Byte arrays and COM
Tim Roberts
timr at probo.com
Wed Mar 3 21:02:00 CET 2010
Dave Cross wrote:
> DOH! Should have spotted that 84 was 'T'
> So how do I convince MakePy that I mean an array?
> I thought the [size_is] in the IDL should achieve that?
There's no way to do this with the automatic translation. You will
either have to dig in to the comtypes module, which works at a lower level:
http://starship.python.net/crew/theller/comtypes/
or use a separate C routine to bridge between the two.
There's a spec for COM IDispatch objects that allows a rather narrow
subset of the vast range of possible types. Your object doesn't follow
that spec, so you need to take extraordinary steps.
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the python-win32
mailing list