中国开发网: 论坛: 程序员情感CBD: 贴子 354666
softdream: 这个是改了的,但有问题。
TUWCRS_RECT_S = ^tagCRSRect;
tagCRSRect = record
usLeft :word;
usRight:word;
usTop :word;
usBotton:word;
end;

function UWCRS_GetImageRect(szFileIn,szFileOut:Pchar;pstRect:TUWCRS_RECT_S):integer; external OCRDLL;


在delphi中实现如下:
var
Rect:tagCRSRect;
A:TUWCRS_RECT_S;

begin
Rect.usLeft := 0;
Rect.usRight := 150;
rect.usTop := 0;
rect.usBotton := 150;

/*调用方法一
if UWCRS_GetImageRect(PChar(Edit1.Text),PChar(Edit2.Text),@Rect) = UWCRS_OK then
begin
ALert('区域块图像成功保存。');
end;


/*调用方法二
new(A);
A.usLeft := 0;
A.usRight := 150;
A.usTop := 0;
A.usBotton := 150;
if UWCRS_GetImageRect(PChar(Edit1.Text),PChar(Edit2.Text),A) = UWCRS_OK then
begin
ALert('区域块图像成功保存。');

end;


现在的问题是,Pascal运行后没有结果,大家看看这段代码错误出在哪里了。
弯得下腰干才是成熟,放得下身段才是高手

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录