コード例 #1
0
ファイル: PInvokeUtility.cs プロジェクト: dst1213/XAPI2
        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);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: handgod/QuantBox_XAPI
        static void OnRspQrySettlementInfo(object sender, ref SettlementInfoField settlementInfo, int size1, bool bIsLast)
        {

        }
コード例 #3
0
 static void OnRspQrySettlementInfo(object sender, ref SettlementInfoField settlementInfo, int size1, bool bIsLast)
 {
 }
コード例 #4
0
 public static string Content(this SettlementInfoField field)
 {
     return(PInvokeUtility.GetUnicodeString(field.Content));
 }