I'm have plan integrate API Status EPSON Printer. I have done the steps as per the documentation, but the App i can't run.
public partial class Form1 : Form
{
private const string path = @"C:\Program Files (x86)\EPSON\Advanced Printer Tool\StatusAPI\EpsonStatusAPI.dll";
[DllImport(path, CallingConvention = CallingConvention.Cdecl)]
public static extern ErrorCode OpenMonPrinter(OpenType type, String name);
public Form1()
{
InitializeComponent();
}
String namePrinter = "EPSON TM-T81III Receipt";
private void Form1_Load(object sender, EventArgs e)
{
OpenMonPrinter(OpenType.TYPE_PRINTER, namePrinter);
}
}
Output error: Unable to find an entry point named 'OpenMonPrinter' in DLL 'C:\Program Files (x86)\EPSON\Advanced Printer Tool\StatusAPI\EpsonStatusAPI.dll'.
I hope i will find a good solution from everyone.
CodePudding user response:
The overload method OpenMonPrinter(OpenType type, String name); might be mismatch. So better try with taking reference to Dll & get confirm if that exists.
CodePudding user response:
Did you miss any steps in the Advanced Printer Driver documentation available on this page?
StatusAPI for EPSON Advanced Printer Driver 6
in APD6_Status_en_revC.pdf
Page 11
Visual C#
The following is an example for creating the development environment using Visual C#.
- Start Microsoft Visual C# to open Solution Explorer.
- Right-click on [References] in Solution Explorer, and select [Add References].
- NOTE If the [References] item does not appear, click the [Show All Files] icon in Solution Explorer.
- The "Add References" screen appears. Click the [Browse] tab.
- Specify followings in [Look in].
32 bit OS: "C:\Programfiles\Epson\Advanced Printer Tool\StatusAPI"
64 bit OS: "C:\Program Files(x86)\Epson\Advanced Printer Tool\StatusAPI"- Type the file name "EpsonStatusAPI.dll", and click [OK].
- Select [References] - [EpsonStatusAPI] in Solution Explorer, and select "False" for [Specific Version] in Properties.
- Using the using keyword at the very start of the source code, describe as follows.
using com.epson.pos.driver- The Visual C# environment is ready for developing an application using Status API.
For example, it is possible that one of the 2nd to 8th steps has not been performed.
Are you then referring to the Reference for .NET starting on page 39 of the same document?
And do you have advanced printer drivers installed on the PC you are testing on?
Please check that area as well.