In my Delphi program I need to download a file. Since when the request arrives it takes some time for the server to compile the data to download it could happen that the client has to wait for some time. Unfortunately, my client doesn't wait long enough and the call to InternetOpenUrl returns error code 12002.
Therefore my question: how can I increase the time allowed to wait for the InternetOpenUrl call to return?
See attached code for details.
hSession := InternetOpen('MyApp', INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0);
if not Assigned(hSession) then Exit;
hService := InternetOpenUrl(hSession, PChar(aUrl), nil, 0, 0, 0);
if not Assigned(hService) then
FErrorText := SysErrorMessage(GetLastError);