By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,462 Members | 1,369 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,462 IT Pros & Developers. It's quick & easy.

com class function

P: n/a
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.
May 16 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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
"gs" <gs@dontMail.telus> wrote in message
news:uZ**************@TK2MSFTNGP04.phx.gbl...
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.

May 17 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.