程序运行时,第一次得到[随机码]是正常的,但是为了更好的表现出这个控件
的功能,可以点击[随机码]图,可再次随机得到随机码,问题:在以后的情况下
不定时的出错,提示信息如下:
1)Access violation at address 00401e58 in module 'PorSJMRZ.exe'.
Write of address 0000001e
Access violation at address 003821cc in module 'PorSJMRZ.exe'.
Write of address 00000014
Access violation at address 00382184 in module 'PorSJMRZ.exe'.
Write of address 00000024
2)"0x00383132"指令引用的"0x00a5335c"内存,该内存不能为"read"
3)Runtime error 216 at 00383132
的功能,可以点击[随机码]图,可再次随机得到随机码,问题:在以后的情况下
不定时的出错,提示信息如下:
1)Access violation at address 00401e58 in module 'PorSJMRZ.exe'.
Write of address 0000001e
Access violation at address 003821cc in module 'PorSJMRZ.exe'.
Write of address 00000014
Access violation at address 00382184 in module 'PorSJMRZ.exe'.
Write of address 00000024
2)"0x00383132"指令引用的"0x00a5335c"内存,该内存不能为"read"
3)Runtime error 216 at 00383132
==========================================
Library RandomDPRS;{ 定义产生随机码的位数[默认8位]. }
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,
Forms, Dialogs,StdCtrls, ExtCtrls, Buttons;
{$R *.res}
function RandomDPRS1(var img:Timage):string;stdcall;
var
I,j,k: Integer;
vPoint: TPoint;
最好的办法就是不用string,用pcharfunction RandomDPRS1(var img:Timage):pchar;stdcall;或者 uses shareMem,......
看看出错误提示的上一步做了什么
没有问题,再在程序中点击数次后就出错了呀,错误信息如下:
不定时的出错,提示信息如下:
1)Access violation at address 00401e58 in module 'PorSJMRZ.exe'.
Write of address 0000001e
Access violation at address 003821cc in module 'PorSJMRZ.exe'.
Write of address 00000014
Access violation at address 00382184 in module 'PorSJMRZ.exe'.
Write of address 00000024
2)"0x00383132"指令引用的"0x00a5335c"内存,该内存不能为"read"
3)Runtime error 216 at 00383132
具体访问DLL内存出错。2楼已经给你答案了/
var
I,j,k: Integer;
vPoint: TPoint;
var
I,j,k: Integer;
vPoint: TPoint;