-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
29 lines (25 loc) · 1014 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// See https://aka.ms/new-console-template for more information
using System;
using System.Runtime.InteropServices;
namespace FiscalPrinterPnP {
public class PnPLoader {
[DllImport("pnpdll")] public static extern string PFabrepuerto(String port);
[DllImport("pnpdll")] public static extern string PFrepx();
[DllImport("pnpdll")] public static extern string PFcierrapuerto();
}
public class Program {
PnPLoader loader;
public Program(string port) {
loader = new PnPLoader();
string result = PnPLoader.PFabrepuerto(port);
Console.WriteLine("PFabrepuerto: {0}", result);
result = PnPLoader.PFrepx();
Console.WriteLine("PFrepx: {0}", result);
result = PnPLoader.PFcierrapuerto();
Console.WriteLine("PFcierrapuerto: {0}", result);
}
public static void Main(string[] args) {
new Program(args[0]);
}
}
}