Marshal数组字符串c#到MQL4

时间:2016-03-10 11:21:12

标签: c# arrays marshalling mql4

此代码正确编组了一个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;
    }
}

0 个答案:

没有答案