Newsgroups : Borland : borland.public.delphi.internet.winsock : 2005 Dec : How to download a webpage? (non-blocking)

www.cryer.info
Managed Newsgroup Archive

How to download a webpage? (non-blocking)

Subject:How to download a webpage? (non-blocking)
Posted by:"Martin" (m_re..@hotmail.com)
Date:Mon, 12 Dec 2005 15:58:20

Does anyone know how to download a webpage without using
UrlDownloadToCacheFile?
Am currently using the funtion below to download, but its blocking and not
flexible.

//--------------------------------------------------------------------------
------------
function UrlBlockedDownload(const AUrl: String): String;
var
    Buf: array[0..MAX_PATH] of Char;
begin
    if UrlDownloadToCacheFile(nil, PChar(AUrl), Buf, SizeOf(Buf), 0, nil) =
S_OK then
        Result := Buf
    else
        Result := EmptyStr;
end;
//--------------------------------------------------------------------------
------------

Am taking my first steps into windows programming, so a simple (or detailed)
solution is welcome.

Thanks =)

Replies:

www.cryer.info
Managed Newsgroup Archive