引入C/C++动态库
[DllImport("SocketAPI.dll", CharSet = CharSet.Ansi, ExactSpelling = true, SetLastError = true)]
public static extern int Obj_Meter_Formal_InitSession(int KeyState, [MarshalAs(UnmanagedType.VBByRefStr)] ref string EsamId, [MarshalAs(UnmanagedType.VBByRefStr)] ref string ASCTR, [MarshalAs(UnmanagedType.VBByRefStr)] ref string Flag, [MarshalAs(UnmanagedType.VBByRefStr)] ref string OutRandHost, [MarshalAs(UnmanagedType.VBByRefStr)] ref string OutSessinInit, [MarshalAs(UnmanagedType.VBByRefStr)] ref string OutSign);