1、传入单字节ANSI字符
[DllImport("hostIO", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
public static extern int initHost([MarshalAs(UnmanagedType.LPStr)] string host);
2、传入双字节Unicode字符
[DllImport("hostIO", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
public static extern int initHost([MarshalAs(UnmanagedType.LPWStr)] string host);