在VS 2008 中引用 AspriseOCR.dll 的问题

thegreensea 2011-09-20 11:15:23
各位大侠,小弟最近在做一个项目时遇到一个问题,我在VS 2008(C#) 的解决方案中想调用别人写好的的一个AspriseOCR.dll文件,这个文件也是用C# 编写的,但是添加引用的时候出现了如下的错误:


请问这是怎么回事啊 ,难道不是象这样添加引用的吗?纠结中,希望各位帮忙
...全文
392 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
sunsoncheng 2011-11-15
  • 打赏
  • 举报
回复
在VB中下载官方的演示程序,总出现DLL调用约定出错

下了所谓的破解版也同样的问题

请问如何解决?
APP开发王 2011-11-03
  • 打赏
  • 举报
回复
告诉你 不需要引用,不是.NET引用对象。直接复制到启动目录运行就好了!
OpenFileDialog openFileDialog1 = new OpenFileDialog();
[DllImport("AspriseOCR.dll", EntryPoint = "OCR")]
public static extern IntPtr OCR(string file, int type);

[DllImport("AspriseOCR.dll", EntryPoint = "OCRpart")]
static extern IntPtr OCRpart(string file, int type, int startX, int startY, int width, int height);

[DllImport("AspriseOCR.dll", EntryPoint = "OCRBarCodes")]
static extern IntPtr OCRBarCodes(string file, int type);

[DllImport("AspriseOCR.dll", EntryPoint = "OCRpartBarCodes")]
static extern IntPtr OCRpartBarCodes(string file, int type, int startX, int startY, int width, int height);
文斌_laolin 2011-10-31
  • 打赏
  • 举报
回复
我也遇到这个问题
坛子里有破解版的Asprise-OCR-Java,其原理就是利用开启CloseWin.exe窗口扫描有没有Asprise弹出过期的窗口,更具信息框的标题栏来判断是否要关闭此信息窗口。2011年7月以后的使用版无论是点击确定还是关闭按钮,都要跳转到Asprise网站。 此次真正破解的是AspriseOCR.dll这个文件。根据跟踪运行主要汇编代码如下: 10006CF4 . 50 push eax ; /pSystemTime 10006CF5 . FF15 C0931110 call dword ptr ds:[; \GetSystemTime 10006D19 . 68 02000080 push 0x80000002 ; |hKey = HKEY_LOCAL_MACHINE 10006D1E . FF15 10901110 call dword ptr ds:[; \RegCreateKeyExA 110006D39 . 68 9CA61110 push AspriseO.1011A69C ; |Title = "All rights reserved. Lab Asprise! (c) 1998-2008" 10006D3E . 68 D0A71110 push AspriseO.1011A7D0 ; |Text = "You are using the trial version of Asprise OCR. Do you want to remove this message box by buying a very affordable license from Lab Asprise? " 10006D53 . 68 98A71110 push AspriseO.1011A798 ; |FileName = "http://asprise.com/product/ocr/index.php?Ref=Eval" 由此可见,分析结果如下: 1.引用顺序 DevIL.dll ILU.dll AspriseOCR.dll AspriseJTwain.dll (DevIL.dll 是算法库) 2.使用 GetSystemTime获得系统的当前时间,和注册表里的键值(二进制格式,估计是第一次使用时间)处理运算,如果时间过期就会弹出信息框提醒需要购买license. 3.注册表HKEY_LOCAL_MACHINE\SOFTWARE\Asprise OCR\ 有键值,试用版有键值现已将AspriseOCR.dll 破解,经过测试,将电脑时间调整到任何时间,都不会弹出信息框。 HKEY_LOCAL_MACHINE\SOFTWARE\Asprise OCR\ 如果以前运行过此类OCR,请将此注册表的键值先 删除。四个动态库可放到C:\WINDOWS\system32 下,也可以放到jre\bin下,或者是PATH 指定环境变量. 仅供个人学习使用。一份网站Asprise-OCR-Java原始Demo,一个破解文件 四个动态库。具体java Demo,参看原始Demo实例。

110,534

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧