[阅读: 312] 2006-07-07 05:52:45
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运行后没有结果,大家看看这段代码错误出在哪里了。
弯得下腰干才是成熟,放得下身段才是高手