Форум АНТИЧАТ

Форум АНТИЧАТ (https://forum.antichat.xyz/index.php)
-   С/С++, C#, Delphi, .NET, Asm (https://forum.antichat.xyz/forumdisplay.php?f=24)
-   -   URLOpenBlockingStream +iStream? (https://forum.antichat.xyz/showthread.php?t=68735)

zl0y 29.04.2008 08:12

URLOpenBlockingStream +iStream?
 
Цитата:

function GetStr(URL: String): PChar;
var hMyResult: HRESULT;
ppStream: IStream;
lpBuffer: Pointer;
dwRead: Integer;
begin
result:='';
hMyResult:=URLOpenBlockingStream(nil, PChar(URL), ppStream, 0, nil);
if hMyResult<>S_OK then exit;
lpBuffer:=AllocMem(1024);
ppStream.Read(lpBuffer, 32, @dwread);
result:=lpBuffer;
end;
почему когда я задаю 32 байта для скачивания,скачивается походу весь файл,может неверно, что то делаю :confused:


Все разобрался сделал через UrlDownloadToFileA + CallBack :)


Время: 01:25