使用DLL文件中的函数,返回值为pchar,但是将返回值显示到窗体上时,当此处超过366次时,就会报错,请大虾们帮忙。
for i := 0 to 500 do
BEGIN pchrUID := ReadNum('com1');
Button1.Caption := pchrUID + inttostr(i);
Button1.Refresh ;
sleep(200);
end;
for i := 0 to 500 do
BEGIN pchrUID := ReadNum('com1');
Button1.Caption := pchrUID + inttostr(i);
Button1.Refresh ;
sleep(200);
end;
function StrPas(const Str: PChar): string;DescriptionThis function is provided for backwards compatibility only. To convert a null terminated string to a Pascal-type string, use a typecast or an assignment.
如果是#0表示结束了?