Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lazarus 调用例子 #4

Open
loadymf opened this issue Nov 18, 2024 · 0 comments
Open

lazarus 调用例子 #4

loadymf opened this issue Nov 18, 2024 · 0 comments

Comments

@loadymf
Copy link

loadymf commented Nov 18, 2024

调用声明:
procedure Init; external 'DdddOcr.dll' name 'Init';
procedure Shutdown; external 'DdddOcr.dll' name 'Close';
function Classification(aa: pchar): pchar; external 'DdddOcr.dll';

formcreate 事件增加:
init();
调用例子:
ProgramDirectory := ExtractFilePath(ParamStr(0));
fn:=ProgramDirectory+'yzmPic\captcha_1.jpg';
memo2.lines.Add(fn);
base64str:=PicToBase64(fn);//这里文件转成base编码
memo2.lines.Add(base64str);
recstr:= Classification(pchar(base64str));//传入参数与返回参数均为pchar类型
memo2.lines.Add(recstr);
formclose事件增加:
Shutdown;
问题其它模型如何引用?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant