Recieiving an arrray from VB



Hello,

I have a c++ program that passes information to a VB dll both in .net

Currently I get back a _bstr_t value for a single string. What I would
like to do is get back an array of strings from VB in order to account
for large amounts of data.

My questions are as follows

How do I define my return value as an array in c++ so that I define my
return value properly?

Since Im a c and c++ programmer I have only ever done arrays that call
a dll in the same language and as such Im used to having to define a
structure in the calling program that is also defined in the dll and I
pass back the address of the structure to the calling program from the
dll

Would my array still be defined as a _bstr_t or would it be defined
differently?

Will the returned array be in VB format that I will have to convert to
c strings?

Is it better to get back a string and parse through the string and
create my array on the c++ side?

Also the reverse is also in question - How do I pass an array to VB.

I have seen several examples of sending information to c++ from VB but
nothing really on sending information to VB from c++ where I get an
array returned

Can someone help me better understand this process?

Thanks
Jake

.



Relevant Pages

  • Re: passing a string to a dll
    ... An array is just ... He stores strings into an array; these strings represent valid codes. ... bool IsValidCode(string codeToCheck) ... Putting them in a DLL has effectly zero impact. ...
    (microsoft.public.vc.mfc)
  • Re: passing a string to a dll
    ... you can put a STRINGTABLE in a DLL. ... downward, if> estimate upward, etc., but there is a LoadString to load the string. ... I might handle the array. ... look at insertion cost, organization cost, and search cost. ...
    (microsoft.public.vc.mfc)
  • Re: C string array problems (again)
    ... Since there's no obvious reason why that would happen, it'd help if you showed us exactly how you're declaring the function that you send these strings to, and the code that formats the string and sends it along. ... For one thing, an array of a UDT containing dynamic byte arrays is not even remotely similar to char *varand could never substitute for a single VB string, so I don't think we're getting a clear picture of what's going on. ... I take it that your DLL is just a wrapper, and that it's passing the VB arguments along to the underlying CAB DLL? ...
    (microsoft.public.vb.general.discussion)
  • Re: passing a string to a dll
    ... I might handle the array. ... I actually have been wondering if I could use a second string ... look at insertion cost, organization cost, and search cost. ... Putting them in a DLL has effectly zero impact. ...
    (microsoft.public.vc.mfc)
  • Help in French|Spanish|German translation.
    ... I am also an author of User-defined string functions. ... WORDTRANEX (cSearched, cArExpressionSought | cExpressionSough, ... each string of the array is searched ... If the parameter nArStartOccurrence is -1 or omitted, the replacement starts ...
    (microsoft.public.fox.helpwanted)

Loading