Thema: Delphi SSL for dummies

Einzelnen Beitrag anzeigen

Benutzerbild von KodeZwerg
KodeZwerg

Registriert seit: 1. Feb 2018
3.691 Beiträge
 
Delphi 11 Alexandria
 
#14

AW: SSL for dummies

  Alt 16. Dez 2021, 20:19
Hier ein mini Beispiel ohne Wrapper:

Delphi-Quellcode:
function DownLoadInternetFile(Source, Dest : String): Integer;
begin
  try
    Result := URLDownloadToFile(nil, PChar(Source), PChar(Dest), 0, nil);
  except
    Result := -1;
  end;
end;
Mögliche Return Codes:
S_OK
The download started successfully.

E_OUTOFMEMORY
The buffer length is invalid, or there is insufficient memory to complete the operation.

INET_E_DOWNLOAD_FAILURE
The specified resource or callback interface was invalid.

-1
Exception



Anleitung zur API: URLDownloadToFile
Gruß vom KodeZwerg
  Mit Zitat antworten Zitat