public CallResult <bool> CancelOrder(string account_id, string code, int order_id) { IntPtr r = TqapiDll.tapi_cancel_order2(this.handle, account_id, code, order_id); var cr = Marshal.PtrToStructure <TqapiDll.CallResultWrap>(r); CallResult <bool> ret; if (cr.value != IntPtr.Zero) { ret = new CallResult <bool>(Marshal.ReadInt32(cr.value) == 1); } else { ret = new CallResult <bool>(cr.msg); } TqapiDll.destroy_callresult(r); return(ret); }