procedure TForm1.Button1Click(Sender: TObject);
var
hInet: hInternet;
hConn: hInternet;
hReq: hInternet;
begin
hInet := InternetOpen('
SleepyMaster''
s Agent', INTERNET_OPEN_TYPE_PRECONFIG,
nil,
nil,0 );
hConn := InternetConnect(hInet, "'
host einfügen'", INTERNET_DEFAULT_HTTP_PORT,
nil,
nil, INTERNET_SERVICE_HTTP, 0, 0);
hReq := HttpOpenRequest(hConn, '
GET', "'
pfad einfügen'", '
HTTP/1.0',
nil,
nil, 0, 0);
if HttpSendRequest(hReq,
nil, 0,
nil, 0)
then
begin
InternetErrorDlg(
Handle, hReq, ERROR_INTERNET_INCORRECT_PASSWORD,
FLAGS_ERROR_UI_FLAGS_CHANGE_OPTIONS, Pointer(
nil^));
end;
if assigned(hConn)
then InternetCloseHandle(hConn);
if assigned(hReq)
then InternetCloseHandle(hReq);
if assigned(hInet)
then InternetCloseHandle(hInet);
end;