璇籌NI鏂囦欢
鍙戝竷: 2008-6-26 20:32 | 浣滆: admin | 鏌ョ湅: 14娆
width="84%">璇籌NI鏂囦欢
function GetINIfile(lpAppNameL,lpKeyName,lpDefault:string;
lpsize:integer;lpFileName:string):string;
{璇诲彇ini鏂囦欢鍑芥暟}
var f:textfile;
sn:string;
begin
assignfile(f,lpFileName);
reset(f);
repeat
readln(f,sn);
if sn='['+lpAppNameL+']' then
begin
readln(f,sn);
while(copy(sn,1,1)<>'[')or(not(eof(f)))do
begin
if copy(sn,1,pos('=',sn)-1)=lpKeyName then
begin
GetINIfile:=copy(sn,pos('=',sn)+1,lpsize);
exit;
end;
readln(f,sn);
end;
end
else GetINIfile:=lpDefault;
until eof(f);
closefile(f);
end;
{------------}
Timeout:=GetINIfile('MailSetup','Timeout','0',5,prgpath+'\CNMSet.ini');




发表于 2009-1-5 19:48
| 











