Hi! I´m trying to translate Vba call method from .dll. But if i translate it it won´t be the same in C#. The code in VBA:
Public Sub SnodAnrop()
i = Module1.snod25x(host, port, user, pass, cert, cacert, service, arg, extra, result, buf)
End Sub
Declare Function snod25x Lib "sn25.dll" Alias "****" (ByVal Host As String, ByVal Port As String, ByVal User As String, ByVal Passwd As String, ByVal Cert As String, ByVal CAert As String, ByVal Nodtjanst As String, ByVal Arg As String, ByVal Extra As String, ByVal Result As String, ByVal Resultbuf As Long) As Long
The translation to C# have i done like this:
[DllImport("sn25.dll", EntryPoint = "****")]
static extern int snod(string host, string port, string user, string passwd, string cert, string CAert, string Nodtjänst, string arg, string extra, string result, int buf); private void button1_Click(object sender, EventArgs e)
{ int i = snod("", "", user, pass, "", "", service, arg, "",result, 1024); } The problem is now is the string "result" in VBA returns info, but in C# it doesn´t collect any info at all. Int i returns a status value wich is 0 that meens OK. The problem is that i dont get any info back with the string "result" in C# How Would u translate it? Have i missed something? Im pretty new in C# so explain easely. Would Appriciate some help!!! Thanks!!!!