I am loading a 3rd party dll which returns string value.
The string is returned properly in vb.net but when I wrote the same code in c# it is returning an empty string.
My c# declaration and calling code.
[DllImport("desdll.dll"]
public static extern short TDESDecrypt(string strIn, string key, string strOut)
char c= '\0';
string strEncDecResult = new string(c, 1024);
TDESDecrypt(strIn, key, strEncDecResult);
strEncDecResult = strEncDecResult.Substring(0, ((strEncDecResult.IndexOf('\0') + 1 - 1));