Your problem may be resolved by using a StringBuilder for the result buffer and I'll point you to a reference showing the win32 api function GetWindowText which returns a string. http://msdn.microsoft.com/en-us/magazine/cc301501.aspx[^]
[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,
StringBuilder result, int buf);
You'd then call your function like this
// create a 1K buffer
StringBuilder sb = new StringBuilder(1024);
int res = snod(............, sb, sb.Capacity);
string resultStr = sb.ToString();
Also make sure that you know what type of encoding the result string uses, i.e. Ansi or Unicode and set CharSet appropriately in your DllImport attribute. I'm not an expert at this so can't guarantee that these suggestions will work, but hopefully... Alan.