public static SettlementInfoClass GetSettlementInfoClass(IntPtr ptr) { SettlementInfoField obj = (SettlementInfoField)Marshal.PtrToStructure(ptr, typeof(SettlementInfoField)); SettlementInfoClass cls = new SettlementInfoClass(); int size = Marshal.SizeOf(typeof(SettlementInfoField)); IntPtr pContent = new IntPtr(ptr.ToInt64() + size); cls.TradingDay = obj.TradingDay; unsafe { cls.Content = new string((sbyte *)pContent, 0, obj.Size, encodingGB2312); } return(cls); }
static void OnRspQrySettlementInfo(object sender, ref SettlementInfoClass settlementInfo, int size1, bool bIsLast) { Console.WriteLine(settlementInfo.Content); }
static void OnRspQrySettlementInfo(object sender, ref SettlementInfoClass settlementInfo, int size1, bool bIsLast) { }