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