Accessing array inside a VARIANT in VC++

D

Demian

Hi,
I developed an OCX in VC++, wich takes a VARIANT as parameter and
return a Long as the result of the operation. This VARIANT cames from
a client VB6.0 wich send an array of Byte as a VARIANT, so acomplish
Autonmation std.

I need to access the array inside the variant to load an user-defined
struct with it. To do this I used the myvariant->parray.pvData but it
didn't work. It seems that the data wasn't there...
I tried with COleSafeArrary, SAFEARRAY and SAFEARRAYBOUND, and more.

Is there any form to load a Memfile with the data in that array? so I
can later use ReadFile to read it in pieces, so I can load every part
of the structure once a time.

Any help on this?
Thanks.
 
V

Victor Bazarov

Demian said:
I developed an OCX in VC++, wich takes a VARIANT as parameter and
[...]

I need to access the array inside the variant [...]

Is there any form to load a Memfile [...]

Any help on this?

Perhaps in microsoft.public.vc.mfcole ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top