Truckle, Andrew J wrote:
>>I believe you need to declare an array of BSTRs, and pass the 
>>pointer of that array to the method. I'm not entirely sure 
>>whether an array of CComBSTRs would be any good - depends if 
>>they're a thin wrapper around BSTR (like CRect is around 
>>RECT, CPoint around POINT, etc.) or whether they are more 
>>cumbersome. You might find it safer to declare (literally) 
>>BSTR strings[40] and pass 'strings', and then when it returns 
>>assign each entry to a CComBSTR to get back your safety.
> 
> 
> But that implies needing to know the number of categories before hand when
> creating the array.

Yes, you do.  If the method took a BSTR **, then you could pass a
pointer to a BSTR * which would then get allocated by the callee which
knows the number of items in the array, but with the current situation,
you need to figure out how to find the number of items in the array.

--
Ehsan Akhgari
Farda Technology <http://www.farda-tech.com/>

In C we had to code our own bugs. In C++ we can inherit them.


_______________________________________________
msvc mailing list
[email protected]
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for 
subscription changes, and list archive.

Reply via email to