16,472
社区成员
发帖
与我相关
我的任务
分享
//函数功能:识别验证码图片
//参数:[in] imagebuf: 图片内存文件数据
// [in] size: imagebuf大小
// [out] text:识别结果
//返回:0:正常识别;-1:异常,如文件不存在等
TESSDLL_API int __stdcall GetTessTextByBuf(const unsigned char *imagebuf,
int size, int type, char *text);
//函数功能:识别验证码图片
//参数:[in] imagefile:图片路径
// [out] text:识别结果
//返回:0:正常识别;-1:异常,如文件不存在等
TESSDLL_API int __stdcall GetTessText(const char *imagefile, char *text);
Dim text As String
Dim imagefile As String
imagefile = "D:\WorkSpace\MyOCR\VBTest\QQ\2.bmp"
Dim ncode
Dim result
result = GetTessText(imagefile, text)
Text1.text = text