Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2003.06.26;
Скачать: CL | DM;

Вниз

Господа,как из программы скачать определенный файл с инета   Найти похожие ветки 

 
dor ©   (2003-06-05 14:41) [0]

Господа,как из программы скачать определенный файл(с указанного места: Например: www.delphi.mastak.ru/1.zip) в указанную папку...например в папку с программой.


 
VMcL ©   (2003-06-05 14:49) [1]

>dor © (05.06.03 14:41)

FAQ!


 
VMcL ©   (2003-06-05 14:56) [2]

>dor © (05.06.03 14:41)

UrlDownloadToFile, unit UrlMon.


 
Ihor Osov'yak ©   (2003-06-05 15:04) [3]


procedure TGetHTPResursThread.Execute;
const agentName = "bla-bla";
var
hHttpSession,hReqUrl:HInternet;
Buffer:array[0..1023] of char;
sWork:string;
nRead:cardinal;

begin
res:="";
flOk:=false;
try
if not userPrm.enCustomProxy
then hHttpSession := InternetOpen(agentName,INTERNET_OPEN_TYPE_PRECONFIG,nil,nil,0)
else begin
if userPrm.enUseProxy
then hHttpSession := InternetOpen(agentName,INTERNET_OPEN_TYPE_PROXY,
PChar(userPrm.proxyAddr),PChar(userPrm.proxyPort),0)
else hHttpSession := InternetOpen(agentName,INTERNET_OPEN_TYPE_DIRECT,
PChar(userPrm.proxyAddr),PChar(userPrm.proxyPort),0)
end;
if not assigned(hHttpSession) then exit;
try
hReqUrl := InternetOpenUrl(hHTTPSession,PChar(url),nil,0,
//INTERNET_FLAG_PRAGMA_NOCACHE,
INTERNET_FLAG_RELOAD,
0);
if not assigned(hReqUrl) then exit;
try
repeat
InternetReadFile(hReqUrl,@Buffer,sizeof(Buffer),nRead);
if nRead>0 then begin
SetLength(sWork,nRead);
Move(buffer,sWork[1],nRead);
res:=res+sWork;
end;
until nRead=0;
flOk:=true;
finally
InternetCloseHandle(hReqUrl);
end;
finally
InternetCloseHandle(hHTTPSession);
end;
except
end;

end;



Страницы: 1 вся ветка

Текущий архив: 2003.06.26;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.034 c
14-84574
duby
2003-06-08 15:13
2003.06.26
Статьи о потоках


7-84808
new comer and co
2003-04-16 16:27
2003.06.26
эмуляция нажатия клавиш


14-84532
Кулюкин Олег
2003-06-05 10:23
2003.06.26
Поругайте Software Activation Service от WebMoney


3-83969
NewD
2003-05-29 08:51
2003.06.26
Как избавиться от слова (Memo) и добавить кнопку.


14-84524
Alexsus
2003-06-06 16:04
2003.06.26
Подскажите можно ли сделать в компоненте DBGrid сделать так....