public static int SendRequestString(ref f9rc.RcClientSession ses, ref Layout reqLayout, byte[] reqBytes) { fon9.CStrView strView = new fon9.CStrView(); unsafe { fixed(byte *p = reqBytes) { strView.Begin_ = new IntPtr(p); strView.End_ = new IntPtr(p + reqBytes.Length); } } return(SendRequestString(ref ses, ref reqLayout, strView)); }
// --------------------------------------------------------------------- internal unsafe void OnRcLinkEv(ref f9rc.RcClientSession ses, f9io.State st, fon9.CStrView info) { Console.WriteLine($"OnRcLinkEv|st={st}|info={info}"); this.Config_ = null; }
static extern fon9.CStrView f9omstw_MakeErrMsg(IntPtr txRes, ref byte pwbuf, uint buflen, OmsErrCode ec, fon9.CStrView orgmsg);
/// 建立錯誤訊息. /// - 如果 ec 在 txRes 沒設定, 則不改變 outbuf, 直接返回 orgmsg; /// - buflen 必須包含 EOS 的空間, 如果空間不足則輸出 orgmsg. public static string MakeErrMsg(IntPtr txRes, OmsErrCode ec, fon9.CStrView orgmsg) { byte[] txbuf = new byte[1024]; fon9.CStrView txmsg = f9omstw_MakeErrMsg(txRes, ref txbuf[0], (uint)txbuf.Length, ec, orgmsg); return(txmsg.ToString()); }
public static unsafe int SendRequestString(f9rc.ClientSession ses, ref Layout reqLayout, fon9.CStrView reqStr) => SendRequestString(ref *ses.RcSes_, ref reqLayout, reqStr);
public static unsafe extern int SendRequestString(ref f9rc.RcClientSession ses, ref Layout reqLayout, fon9.CStrView reqStr);