I am trying to scan a image using ZBar and I am working from this code example : http://blog.freehand.com.ua/2013/03/zbar-reading-bar-codes-in-delphi.html
我正在尝试使用ZBar扫描图像,我正在使用此代码示例:http://blog.freehand.com.ua/2013/03/zbar-reading-bar-codes-in-delphi.html
This is the code I currently have :
这是我目前的代码:
procedure TForm1.Button1Click(Sender: TObject);
var zimage : zbar_image_t;
weirdVarArea : SIZE_T;
weirdVarBlob : PByte;
sym: zbar_symbol_t;
begin
zimage := zbar_image_create;
zbar_image_set_format(zimage, 'Y800');
zbar_image_set_size(zimage, Image1.Picture.Width, Image1.Picture.Height);
weirdVarArea := Image1.Picture.Width * Image1.Picture.Height;
weirdVarBlob := GetMemory(weirdVarArea);
zbar_image_set_data(zimage, weirdVarBlob, weirdVarArea, nil);
zbar_process_image(processor, zimage);
// sym := zbar_image_first_symbol(zimage);
// ShowMessage(zbar_symbol_get_data(sym));
end;
end.
There is one button named "Button1" on the form as well as a image component named "Image1" with a qr code loaded into it.
表单上有一个名为“Button1”的按钮,以及一个名为“Image1”的图像组件,其中加载了qr代码。
When I run that code I get the error : Access violation at address 77E57543 in module 'ntdll.dll'. Write of address 000000A4.
当我运行该代码时,我收到错误:模块'ntdll.dll'中地址为77E57543的访问冲突。写入地址000000A4。
The line causing the trouble is zbar_process_image(processor, zimage);
引起麻烦的一行是zbar_process_image(processor,zimage);
I am not sure how to proceed.
我不知道该怎么办。
Thanks for your responce, Kobus
谢谢你的回应,Kobus
1 个解决方案
#1
Access violation at address 77E57543 in module 'ntdll.dll'. Write of address 000000A4.
模块'ntdll.dll'中地址为77E57543的访问冲突。写入地址000000A4。
This is actually Windows issue. When you get this error, you must find out the restore point when the application was working properly and close Windows automatic updates to prevent the issue happens again. If you cannot solve the issue with this way, you should reinstall your Windows.
这实际上是Windows问题。当您收到此错误时,您必须在应用程序正常工作时找到还原点并关闭Windows自动更新以防止问题再次发生。如果您无法以这种方式解决问题,则应重新安装Windows。
#1
Access violation at address 77E57543 in module 'ntdll.dll'. Write of address 000000A4.
模块'ntdll.dll'中地址为77E57543的访问冲突。写入地址000000A4。
This is actually Windows issue. When you get this error, you must find out the restore point when the application was working properly and close Windows automatic updates to prevent the issue happens again. If you cannot solve the issue with this way, you should reinstall your Windows.
这实际上是Windows问题。当您收到此错误时,您必须在应用程序正常工作时找到还原点并关闭Windows自动更新以防止问题再次发生。如果您无法以这种方式解决问题,则应重新安装Windows。