G
Guest
Subject: Problems with Interop in C#
We are having problems using Interop with a Vb6 ActiveX Dll in C# code in
Net2 using Vs2005. Below are the signatures of the method that is the
problem. It is the last argument (e.g., "out obj" in C#) that is returned
corrupted. It should be an array of integers. In one simple test App this
argument does return an array of integers reliably. In the actual App it
returns one or two integer arrays but then it starts returning corrupted
data. The difference between the two App's is on of complexity and that the
actual App uses many more threads then the test App.
We use Tlbimp.exe in the PreBuild step. We do not have the Vb6 code or Pdb
file.
ANY suggestions would be GREATLY appreciated.
C# signature--
bool b=pdc.Get_ArrayData(out Transfer_Complete,out DataNum,out
SamplingPeriod,out obj);
IDL signature--
[id(0x00000012), helpstring("method Get_ArrayData")]
VARIANT_BOOL Get_ArrayData(
[out] long* Transfer_Complete,
[out] long* DataNum,
[out] double* SamplingPeriod,
[out] VARIANT* arrayData);
We are having problems using Interop with a Vb6 ActiveX Dll in C# code in
Net2 using Vs2005. Below are the signatures of the method that is the
problem. It is the last argument (e.g., "out obj" in C#) that is returned
corrupted. It should be an array of integers. In one simple test App this
argument does return an array of integers reliably. In the actual App it
returns one or two integer arrays but then it starts returning corrupted
data. The difference between the two App's is on of complexity and that the
actual App uses many more threads then the test App.
We use Tlbimp.exe in the PreBuild step. We do not have the Vb6 code or Pdb
file.
ANY suggestions would be GREATLY appreciated.
C# signature--
bool b=pdc.Get_ArrayData(out Transfer_Complete,out DataNum,out
SamplingPeriod,out obj);
IDL signature--
[id(0x00000012), helpstring("method Get_ArrayData")]
VARIANT_BOOL Get_ArrayData(
[out] long* Transfer_Complete,
[out] long* DataNum,
[out] double* SamplingPeriod,
[out] VARIANT* arrayData);