I want to PInvoke a function written in VB6 from C#. The VB6 code that calls the DLL is declared like this:
Declare Function ApplyNNet Lib " location of the DLL file" (MyNNetType As String, MyAddress As String, MyInput() As Double) As Variant
My C# version looks like this:*
public static extern object ApplyNNet(string type, string add, double data);
I call the function like this:
object P_ = ApplyNNet("Back Prop", address,data);
With this declaration I receive a PInvoke error:
PInvoke restriction: cannot return variants.