-
Re: Returning an array to VB through COM
The only array COM allows is a SAFEARRAY which contains VARIANT as described
in the example.
The good thing is that each one of those VARIANT variables can hold a BSTR
(COM string) to be returned ...
P.S. Remember to SysAllocString() your string when you put it in the VARIANT.
"sean" <sean@schof.com> wrote:
>
>I'm a COM newbie and I need help with a function that returns a String array
>to VB from a C++ DLL. There is an example of how to do this in the "Beginning
>ATL COM" book but only for an array of VARIANTS. If anyone could provide
>me with a simple example with the IDL as well as the C++ implemenation ,
>I'd be very grateful.
>
>Thanks,
>
>- sean
-
Re: Returning an array to VB through COM
This subject is addressed in the following MSDN articles: Q194609 and Q171583.
The document VB4DLL.TXT also has very helpful information. It works, but
it's not a trivial subject.
BZ
"Peggy Young" <peggy_young@daytimer.com> wrote:
>
>The only array COM allows is a SAFEARRAY which contains VARIANT as described
>in the example.
>
>The good thing is that each one of those VARIANT variables can hold a BSTR
>(COM string) to be returned ...
>
>P.S. Remember to SysAllocString() your string when you put it in the VARIANT.
>
>"sean" <sean@schof.com> wrote:
>>
>>I'm a COM newbie and I need help with a function that returns a String
array
>>to VB from a C++ DLL. There is an example of how to do this in the "Beginning
>>ATL COM" book but only for an array of VARIANTS. If anyone could provide
>>me with a simple example with the IDL as well as the C++ implemenation
,
>>I'd be very grateful.
>>
>>Thanks,
>>
>>- sean
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks