469,963 Members | 1,943 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,963 developers. It's quick & easy.

using a com automation object (how do I avoid crash?)

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
Jul 19 '05 #1
0 903

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.