using System; using System.Runtime.InteropServices; class PaymentStop { private const string POS_DLL = @"C:\Program Files (x86)\AllthatpayClient\PosToCatReq.dll"; [DllImport(POS_DLL, CallingConvention = CallingConvention.StdCall)] public static extern int ReqStop(); [DllImport(POS_DLL, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)] public static extern int ReqStop_TCP(string gwIp, string gwPort); static void Main(string[] args) { Console.WriteLine("=== Payment Stop ==="); try { int r1 = ReqStop(); Console.WriteLine("ReqStop: " + r1); } catch (Exception ex) { Console.WriteLine("ReqStop error: " + ex.Message); } try { int r2 = ReqStop_TCP("127.0.0.1", "49884"); Console.WriteLine("ReqStop_TCP: " + r2); } catch (Exception ex) { Console.WriteLine("ReqStop_TCP error: " + ex.Message); } } }