D
Daniel
Hello,
i have an assembly which is developped in C#.NET. The
assembly provides two classes, one class has a method
which accepts an instance of the other class as a
parameter, like this:
--- BOC ---
[ClassInterface(ClassInterfaceType.AutoDispatch)]
public class clsOne
{
public clsOne() {}
}
[ClassInterface(ClassInterfaceType.AutoDispatch)]
public class clsTwo
{
public clsTwo() {}
public void test(clsOne cOne)
{
}
}
--- EOC ---
Now i create and register an COM-Typelib with RegAsm.exe.
After this, i can create instances from both classes in
Visual Basic 6. But if i create an instance of clsOne and
clsTwo, and call the method "test" in clsTwo with the
instance from clsOne, this clsOne-instance is NULL, when
the assembly finally gets it.
--- BOC ---
private sub test()
Dim cOne as New clsOne
Dim cTwo as New clsTwo
Call cTwo(cOne)
end sub
--- EOC ---
cOne is NULL is this case when the assembly gets the
parameter. Why? Do i have to declare anything else?
Thanks in advance for help.
Regards,
Daniel
i have an assembly which is developped in C#.NET. The
assembly provides two classes, one class has a method
which accepts an instance of the other class as a
parameter, like this:
--- BOC ---
[ClassInterface(ClassInterfaceType.AutoDispatch)]
public class clsOne
{
public clsOne() {}
}
[ClassInterface(ClassInterfaceType.AutoDispatch)]
public class clsTwo
{
public clsTwo() {}
public void test(clsOne cOne)
{
}
}
--- EOC ---
Now i create and register an COM-Typelib with RegAsm.exe.
After this, i can create instances from both classes in
Visual Basic 6. But if i create an instance of clsOne and
clsTwo, and call the method "test" in clsTwo with the
instance from clsOne, this clsOne-instance is NULL, when
the assembly finally gets it.
--- BOC ---
private sub test()
Dim cOne as New clsOne
Dim cTwo as New clsTwo
Call cTwo(cOne)
end sub
--- EOC ---
cOne is NULL is this case when the assembly gets the
parameter. Why? Do i have to declare anything else?
Thanks in advance for help.
Regards,
Daniel