private void OnRspQrySettlementInfo_callback(object sender, ref SettlementInfoField settlementInfo, int size1, bool bIsLast) { if (null != OnRspQrySettlementInfo) { OnRspQrySettlementInfo(this, new OnRspQrySettlementInfoEventArgs(ref settlementInfo, size1, bIsLast)); } }
private void _OnRspQrySettlementInfo(IntPtr ptr1, int size1, double double1) { if (OnRspQrySettlementInfo_ == null) { return; } SettlementInfoField obj = PInvokeUtility.GetObjectFromIntPtr <SettlementInfoField>(ptr1); OnRspQrySettlementInfo_(this, ref obj, size1, double1 != 0); }
public static SettlementInfoField GetSettlementInfo(IntPtr ptr) { var info = new SettlementInfoField(); if (ptr == IntPtr.Zero) { return(info); } var field = (InternalSettlementInfoField)Marshal.PtrToStructure(ptr, typeof(InternalSettlementInfoField)); var size = Marshal.SizeOf(typeof(InternalSettlementInfoField)); var content = new IntPtr(ptr.ToInt64() + size); info.TradingDay = field.TradingDay; unsafe { info.Content = new string((sbyte *)content, 0, field.Size, Gb2312); } return(info); }
public OnRspQrySettlementInfoEventArgs(ref SettlementInfoField settlementInfo, int size1, bool bIsLast) { this.settlementInfo = settlementInfo; this.size1 = size1; this.bIsLast = bIsLast; }