Пример #1
0
        public static void MultiSubscribe()
        {
            order_status_callback      order_callback = new order_status_callback(order_status_callback_impl);
            trade_status_callback      trade_callback = new trade_status_callback(trade_status_callback_implementation);
            connection_status_callback conn_cb        = new connection_status_callback(connection_status_callback_Report);
            transaction_reply_callback trans_callback = new transaction_reply_callback(transaction_reply_callback_impl);

            GCHandle gcOrder = GCHandle.Alloc(order_callback);
            GCHandle gcTrade = GCHandle.Alloc(trade_callback);
            GCHandle gcConn  = GCHandle.Alloc(conn_cb);
            GCHandle gcTrans = GCHandle.Alloc(trans_callback);

            byte[] EMsg = new byte[50];
            uint   EMsgSz = 50, uExtEC = 0;
            int    ExtEC = 0;

            set_connection_status_callback(conn_cb, uExtEC, EMsg, EMsgSz);
            set_transaction_reply_callback(trans_callback, ref ExtEC, EMsg, EMsgSz);

            subscribe_trades("", "");
            start_trades(trade_callback);

            subscribe_orders("", "");
            start_orders(order_callback);
        }
Пример #2
0
        public static void MultiSubscribe()
        {

            order_status_callback order_callback = new order_status_callback(order_status_callback_impl);
            trade_status_callback trade_callback = new trade_status_callback(trade_status_callback_implementation);
            connection_status_callback conn_cb = new connection_status_callback(connection_status_callback_Report);
            transaction_reply_callback trans_callback = new transaction_reply_callback(transaction_reply_callback_impl);

            GCHandle gcOrder = GCHandle.Alloc(order_callback);
            GCHandle gcTrade = GCHandle.Alloc(trade_callback);
            GCHandle gcConn = GCHandle.Alloc(conn_cb);
            GCHandle gcTrans = GCHandle.Alloc(trans_callback);

            Byte[] EMsg = new Byte[50];
            UInt32 EMsgSz = 50, uExtEC = 0;
            Int32 ExtEC = 0;

            set_connection_status_callback(conn_cb, uExtEC, EMsg, EMsgSz);
            set_transaction_reply_callback(trans_callback, ref ExtEC, EMsg, EMsgSz);

            subscribe_trades("", "");
            start_trades(trade_callback);

            subscribe_orders("", "");
            start_orders(order_callback);
        }
Пример #3
0
 public static extern Int32 set_transaction_reply_callback(
     transaction_reply_callback pfTransactionReplyCallback,
     ref Int32 pnExtendedErrorCode,
     byte[] lpstrErrorMessage,
     UInt32 dwErrorMessageSize);
Пример #4
0
 public static extern Int32 set_transaction_reply_callback(
     transaction_reply_callback pfTransactionReplyCallback,
     ref Int32 pnExtendedErrorCode,
     byte[] lpstrErrorMessage,
     UInt32 dwErrorMessageSize);