我的代码:
procedure Tconfig.Button9Click(Sender: TObject);
var judgefile:string;
var inidofile:tinifile;
var yh:lpcstr;
begin
if OpenDialog1.Execute then
begin
judgefile:=ExtractFileDir(Application.Exename)+'/clientconfig.ini';
inidofile:=Tinifile.create(judgefile);
inidofile.writestring('yhprom','order',opendialog1.FileName);
yh:=inidofile.writestring('yhprom','order','');
winexec('',SW_SHOWNORMAL)
end;
end;
因为Yh这个变量是lpcstr类型,而inidofile.writestring('yhprom','order','')是string类型,不匹配,如何解决这个问题,请指教!谢谢!