var
hOpen, hConnect, hResource: HINTERNET;
DataProceed: array[0..8191] of Byte;
numread: DWORD;
begin
hOpen := InternetOpen('WinInet resuming sample', INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0);
hConnect := InternetConnect(hOpen, PChar(host), INTERNET_DEFAULT_HTTP_PORT, nil, nil, INTERNET_SERVICE_HTTP, 0, 0);
hResource := HttpOpenRequest(hConnect, 'GET', PChar(resource), nil, nil, nil, 0, 0);
HttpSendRequest(hResource, nil, 0, nil, 0);
InternetSetFilePointer(hResource, Position, nil, FILE_BEGIN, 0)
releat
InternetReadFile(hResource, @DataProceed, SizeOf(DataProceed), numread);
...
until (numread <= 0);
InternetCloseHandle(hConnect);
InternetCloseHandle(hOpen);
end;