G
gs
what is the proper interop description for result of string array for an
function that is to be called through com interface by legacy application?
I tried
Public Function etstor0(<Out()> ByRef iCnt As Integer, _
<Out()> <MarshalAs(UnmanagedType.LPArray,
ArraySubType:=UnmanagedType.LPStr, SizeParamIndex:=0)> ByRef
strMatchReslts() As String _
) As Integer
----
end Function
I was calling something like this from a legacy application
// establish, initialize the com class object: myComclass
string sresult[]
long ll_cnt, ll_rc
ll_rc = myComclass.estor(Ref ll_cnt, Ref sresult)
but I got a message saying
Error calling external object function etstor0
I have established that in this legacy application, long is the vb integer,
and plan old string without array is ok with calling this .net com class
function that do not involve arrays.
function that is to be called through com interface by legacy application?
I tried
Public Function etstor0(<Out()> ByRef iCnt As Integer, _
<Out()> <MarshalAs(UnmanagedType.LPArray,
ArraySubType:=UnmanagedType.LPStr, SizeParamIndex:=0)> ByRef
strMatchReslts() As String _
) As Integer
----
end Function
I was calling something like this from a legacy application
// establish, initialize the com class object: myComclass
string sresult[]
long ll_cnt, ll_rc
ll_rc = myComclass.estor(Ref ll_cnt, Ref sresult)
but I got a message saying
Error calling external object function etstor0
I have established that in this legacy application, long is the vb integer,
and plan old string without array is ok with calling this .net com class
function that do not involve arrays.