473,396 Members | 2,039 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 993

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: kids | last post by:
Does anybody know any reason which could cause Ms. word automation to crash? I try to call word automation to open a document and use find and replace function. For some reason it works but I...
12
by: Joe | last post by:
Hello All: Do I have to use the LoadControl method of the Page to load a UserControl? I have a class which contains three methods (one public and two private). The class acts as a control...
1
by: Mike H | last post by:
I can't seem to figure out the right thing to search on, so I thought I'd just provide an example and see if someone can point me to some tips. What I have is an Automation Server that has a...
4
by: LoveLorn | last post by:
how can i make my node info in linked list as an object of another class f.e i want to make my node data as a person information like name , surname , date of birth and job . can any one help me plz
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.