此代码正确编组了一个string
我想编组字符串数组。
[DllExport("Call", CallingConvention = CallingConvention.StdCall)]
[return: MarshalAs(UnmanagedType.LPWStr)]
public static string Call(
[MarshalAs(UnmanagedType.LPWStr)]string parameters,
[MarshalAs(UnmanagedType.LPWStr)]string host)
{
try
{
string resultValue = "some string";
return resultValue;
}
catch (Exception ex)
{
return ex.Message;
}
}