Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 17th, 2005, 09:46 PM
Linux Inquirer
Guest
 
Posts: n/a
Default Passing a Structure with a string array from VB6 to VC++ 6

Hi Guys,

I need to pass a C structure of this form from VB6 <-> VC++ 6

struct BTag
{
int rowIndex;
BSTR* valueList;

} B;

struct ATag
{
BSTR* propNameList; // correspond to columns
struct B* values; // rows in the result views
}A;

I'd like to pass a table (A above) with rows and cols. Table header is
in the 1D array called propNameList in A and rows of data are in B as
a 1D array strings.

This thing works if I have simple UDTs - ie no arrays inside
structures. I can even pass an array of simple UDTs but with this one
- I get a message saying 'Variable uses an Automation Type not
supported in Visual Basic' when in VB I say - "Dim x As A"

(Note - VB understands A so I know DLLs etc are in place but it won't
compile..)


So is there a limitation on how complex a UDT can get or am I missing
something here..? Any other proposal to successfully exchange row-col
data is most welcome.

Thanks,
Aditya
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles