LegacyWrapper
LegacyWrapper copied to clipboard
Int32 GetStr( out String Str) no string out
Int32 GetStr( out String Str); Not working, hangs or no Str change.
original: //[DllImport("x32.dll", // CallingConvention = CallingConvention.StdCall, // CharSet = CharSet.Unicode, // EntryPoint = "GetStr")] //public static extern Int32 GetStr( // [MarshalAs(UnmanagedType.BStr)] out String Str // );
Can you provide your interface definition and the calling code?
[LegacyDllImport("x32.dll")]
public interface IGetStr : IDisposable
{
[LegacyDllMethod(CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Unicode)]
Int32 GetStr( out String Str);
}
public static Int32 GetStr(ref String str)
{
return = client.GetStr(out s);
}
String s = ""
GetStr(ref s);
if ( s != "") Ok();
I am running into a very similar problem, which I logged as "How to call a ref string function?" at https://github.com/CodefoundryDE/LegacyWrapper/issues/18