VB6 COM返回byRef变量中的ADODB.Recordset。如何在C#中检索?

VB6 COM返回byRef变量中的ADODB.Recordset。如何在C#中检索?,com,vb6,adodb,byref,Com,Vb6,Adodb,Byref,我正在尝试调用此COM方法: Public Function DoSomething(ByRef StringStuff As Variant, **ByRef Out_Data As Variant**) As Boolean Out_数据在方法体中定义并填充为ADODB.Recordset(2.6) 我尝试了几种不同的方法,但似乎仍然无法将记录集对象取出或放入 有什么想法吗 谢谢…你能用ref或out来调用它吗 Object StringStuff = "Hello Word"; Obje

我正在尝试调用此COM方法:

Public Function DoSomething(ByRef StringStuff As Variant, **ByRef Out_Data As Variant**) As Boolean
Out_数据在方法体中定义并填充为ADODB.Recordset(2.6)

我尝试了几种不同的方法,但似乎仍然无法将记录集对象取出或放入

有什么想法吗


谢谢…

你能用
ref
out
来调用它吗

Object StringStuff = "Hello Word";
Object Out_Data = null;
DoSomething(ref StringStuff, ref Out_Data);
// or
DoSomething(out StringStuff, out Out_Data);

//I haven't use ADODB in a long while so convert this to whatever type is necessary
ADODB.Recordset ar = (ADODB.Recordset)Out_Data;