com class function

G

gs

I would like to compile some functions returning string array as com class.
The unmanaged legacy c caller uses c style string array and calls the
functions in com class via com interface.
how should I marshal the result?

I tried reading msdn interop arrays section, but my brain must be too dense
or overloaded. I am still not sure.
 
G

gs

I tried
unmated:
ll_sz = lole_regex.ctststra1ds(Ref ls_out, ll_cnt)
and
ll_sz = lole_regex.ctststra1ds(Ref ls_out, ref ll_cnt)
on C# signature of

public int ctststra1ds( [Out()] [MarshalAs(UnmanagedType.LPArray,
ArraySubType=

UnmanagedType.LPStr, SizeParamIndex=1)] out string[] str_ar,

int iSz )

{

.....

}

and I stil get error for both ways

Looks like I have to try a number of different ways
 

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

Top