I am having trouble making a function of my c# com class callable by legacy
application.
The desired unmanaged signautre for calling gthe function is
int32 lsz;
string str_result[]
// setup the oleobj to connect to the com calls...
lsz = oleobj.strArrayfcn(str_result)
// or similar
After reading the msdn articles ( my mind is still clear as mud)
I tried in c#
public int strArrayfcn( out string[] str_result)) {
...
}
public int strArrayfcn(out int iSize, out string[] str_result))
{
...
}
public integer strArrayfcn[Out()] [MarshalAs(UnmanagedType.LPArray,
ArraySubType=UnmanagedType.LPStr, SizeParamIndex=1)] out string[] str_ar,
int iSz )
{
...
}
public integer strArrayfcn[Out()] [int iSz,
MarshalAs(UnmanagedType.LPArray,
ArraySubType=UnmanagedType.LPStr, SizeParamIndex=0)] out string[] str_ar )
{
...
}
but none worked. what should I do
===================================
This list is hosted by DevelopMentorĀ® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com