lpFileName: PWideChar;
if string(lpFileName)<>'C:\a.txt' then begin
showmessage( string(lpFileName)+'-C:\a.txt' );
end;
结果showmessage出现了“C:\a.txt-C:\a.txt”
怎么才能让它正确的比较啊?
if string(lpFileName)<>'C:\a.txt' then begin
showmessage( string(lpFileName)+'-C:\a.txt' );
end;
结果showmessage出现了“C:\a.txt-C:\a.txt”
怎么才能让它正确的比较啊?
procedure TForm1.Button1Click(Sender: TObject);
var
lpFileName: PWideChar;
begin
lpFileName:='C:\a.txt';
if lpFileName <>'C:\a.txt' then
begin
showmessage(lpFileName+'-C:\a.txt' );
end;
end;我试好用