using a com automation object (how do I avoid crash?)
James Carroll
mrmaple at gmail.com
Wed May 25 16:43:20 EDT 2005
I'm trying to call functions on an automation object, and I've run
makepy to generate a wrapper, and 99% of the calls I make on the
wrapper work great.
my question is: Is my [''] * 10 as close as I can come to a variant
array of pre-allocated empty strings?
I'm trying to call a function called EnumerateCameras
m.ShowLiveWindow(True) <--- this works
cams = [''] * 10
m.EnumerateCameras(cams)
<CRASH!>
The documentation that I have for the function says:
HRESULT EnumerateCameras
(
[in,out] VARIANT * pvBstrArray,
[out,retval] VARIANT_BOOL *pbSuccess
);
Parameters
pvBstrArray - Location of VARIANT array to read list of MicroFIRE
cameras into. Array must be pre-allocated with empty strings before
calling this function.
Is my [''] * 10 as close as I can come to a variant array of
pre-allocated empty strings?
Thanks,
-Jim
More information about the Python-list
mailing list