Questions tagged [wininet]

The Windows Internet (WinINet) API enables Windows applications to interact with FTP, and HTTP protocols to access Internet resources.

The Windows Internet (WinINet) application programming interface (API) enables applications to interact with FTP, and HTTP protocols to access Internet resources. As standards evolve, these functions handle the changes in underlying protocols, enabling them to maintain consistent behavior.

559 questions
17
votes
1 answer

Why is FormatMessage() failing to find a message for WinINet errors?

I'm running this to test FormatMessage: LPVOID lpMsgBuf; errCode=12163; FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM , 0, errCode, 0, (LPTSTR) &lpMsgBuf, 0, NULL ); However, when it…
T.T.T.
  • 29,703
  • 45
  • 120
  • 161
15
votes
3 answers

How to send a HTTP POST Request in Delphi using WinInet api

I am trying to make HTTP Requests from Delphi using the WinInet functions. So far I have: function request:string; var hNet,hURL,hRequest: HINTERNET; begin hNet := InternetOpen(PChar('User Agent'),INTERNET_OPEN_TYPE_PRECONFIG or…
Sebastian
  • 786
  • 3
  • 12
  • 22
12
votes
4 answers

Detect an internet connection activation with Delphi

I've been using a 3G wireless card for a while and every time I connect, my anti-virus fires up the updates. I'm wondering what is the Win32 API set of functions that I can use to, either, get notified or query about the event of an Internet…
Gustavo Carreno
  • 8,809
  • 13
  • 42
  • 72
12
votes
1 answer

How to send HTTPS request using WinInet?

I want to send HTTPS GET request using WinInet. As far as i know, i should do it just like sending HTTP request except i have to use INTERNET_DEFAULT_HTTPS_PORT and INTERNET_FLAG_SECURE flag. So here is what i tried: #include "stdafx.h" #include…
Alexander
  • 881
  • 4
  • 11
  • 26
10
votes
1 answer

Wininet InternetGetCookie gets empty cookie data

I'm currently working on getting cookie data with Csharp. I'm using DLLImport to invoke InternetGetCookie in wininet.dll, but when i try it the functions returns an ERROR_INSUFFICIENT_BUFFER (error code 122). Can any one help me with this ? This is…
Patrick
  • 710
  • 8
  • 26
9
votes
3 answers

Using WinInet to identify total file size before downloading it

I got the source below from a third-party site explaining how to download a file from the internet using WinInet. I'm not too familiar with API, and I took at look at the WinInet unit but did not see any API calls like what I need. What I'm doing is…
Jerry Dodge
  • 25,720
  • 28
  • 139
  • 301
8
votes
2 answers

How i can retrieve the error description for a WinInet error code from delphi

I need to obtain the description of an WinInet function error code, The MSDN documentation about the WinInet functions says which I must use the GetLastError function to retrieve the last error code when a functions fails. Now when I check the…
Salvador
  • 15,053
  • 31
  • 128
  • 232
8
votes
3 answers

Cannot download microsoft symbols when running cdb in a windows service

I have a .NET windows service that is calling cdb.exe to analyze crash dumps. I want to download the symbols from http://msdl.microsoft.com automatically when needed, using the argument: -y…
David Espart
  • 10,698
  • 6
  • 34
  • 49
8
votes
1 answer

How does WinInet determine what and when to cache?

I'm experimenting with caching between my .NET client and server. I'm seeing a seemingly random number of hits to an endpoint before WinInet decides to cache the result. The .NET client makes requests using HttpWebRequest: HttpWebRequest webRequest…
Steve Dunn
  • 18,426
  • 11
  • 59
  • 85
8
votes
2 answers

WinInet vs WinHttp (service or service-like process)

I can not understand the difference between these two concepts "service or service-like process". At msdn WinHTTP vs. WinINet page says: When selecting between the two, you should use WinINet, unless you plan to run within a service or…
Cobaia
  • 1,395
  • 3
  • 20
  • 39
7
votes
2 answers

Delphi soap https authentication failure pops up a dialog box

We have a delphi XE application that uses SOAP (THTTPRIO etc) communications which (in delphi) works over WinInet.dll, by default. We fixed the authentication code so that it works, using https authentication, and when the user name and password…
Warren P
  • 58,696
  • 38
  • 168
  • 301
7
votes
4 answers

Downloading a file from the Internet while being able to abort the download any time

I'd like to download a file from my Delphi program in a separate thread dedicated to the download. The problem is that the main program can be closed any time (thus the download thread can be terminated any time as well). So even if there is no…
Steve
  • 2,438
  • 3
  • 30
  • 50
6
votes
2 answers

Delphi 2010 - Wininet running out of handles

I have an app that makes intensively uses of Wininet functions to get some data from internet. I am getting a very odd handle related error messages sometimes: Internal error in ConnectToHost when trying to create a session…
Rafael Colucci
  • 5,712
  • 4
  • 45
  • 114
6
votes
3 answers

How to Prevent dialog (Basic Authentication prompt) during call of Webservice

In a delphi program (running as a service) i need to call some webservices. The calls works fine if basic Authentications is not requerired. The calls also works fine if Basic Authentication is requerired and username/password is provided (in…
BennyBechDk
  • 934
  • 7
  • 13
5
votes
2 answers

How to tell WinINet to use IE's proxy server credentials

In internet explorer i can set the proxy server. Then, when accessing the internet IE will prompt me for proxy credentials and optionally save them. New instances of IE pick up the credentials. I can also see the credentials are saved in the…
julioA
  • 255
  • 3
  • 4
1
2 3
37 38