using System.Runtime.InteropServices;
。。。。
const string path = @"AspriseOCR.dll";//设定dll的路径
[DllImport(path, EntryPoint = "OCR")]
public static extern IntPtr OCR(string file, int type);
[DllImport(path, EntryPoint = "OCRpart")]
static extern IntPtr OCRpart(string file, int type, int startX, int startY, int width, int height);
[DllImport(path, EntryPoint = "OCRBarCodes")]
static extern IntPtr OCRBarCodes(string file, int type);
[DllImport(path, EntryPoint = "OCRpartBarCodes")]
static extern IntPtr OCRpartBarCodes(string file, int type, int startX, int startY, int width, int height);
直接在代码中引入