Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

variant array passing to vc 6.0 com dll from vb 6.0

2 views
Skip to first unread message

jjoohhnn

unread,
Apr 24, 2009, 11:09:27 AM4/24/09
to
Hi all,

how to pass an variant array from vb6.0 to vc 6.0 dll?


Thanks in advance.

Regards,
jjoohhnn.


Ralph

unread,
Apr 24, 2009, 11:42:29 AM4/24/09
to

"jjoohhnn" <jjoo...@microsoft.discussions.com> wrote in message
news:eXrRv6Ox...@TK2MSFTNGP04.phx.gbl...

> Hi all,
>
> how to pass an variant array from vb6.0 to vc 6.0 dll?
>
>
> Thanks in advance.
>

Take a look at VARIANT or variant_t (_variant_t, __variant_t) in the COM
support class (comdef.h).

A "variant" itself is simply a 16-byte struct containing a int (the type)
and a union (the data). It is never larger no matter what is "stored" in it.
Objects, strings, and arrays are thus passed by pointers or references.
Dereferencing these types requires a certain amount of knowledge about COM
protocols and marshaling techniques.

-ralph


Ralph

unread,
Apr 24, 2009, 11:59:41 AM4/24/09
to

"Ralph" <nt_cons...@yahoo.com> wrote in message
news:esepJNPx...@TK2MSFTNGP06.phx.gbl...

Meant to add ... Or use support classes to manage it for you.

Using ATL to development ActiveX Dlls for use with VB makes the whole
process easier.

-ralph


0 new messages