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.

591 questions
5
votes
1 answer

Have WinInet share sessions/cookies with Internet Explorer

What I want is the following: 1) Login at a page using Internet Explorer 2) Have my software which uses WinInet API to crawl a site reuse the same cookies/session (i.e. so the crawler is "logged in") I have tried build login myself using INDY, and…
Tom
  • 3,587
  • 9
  • 69
  • 124
5
votes
4 answers

Wininet cache API hangs in Windows 8

I'm using P/Invoke with C# to clear cache entries as follows. The code seems to work fine up to Windows 7 on 32 and 64 bit. On the Windows 8 Release Candidate, it hangs at the DeleteUrlsFromGroup call. [DllImport(@"wininet", SetLastError =…
jimbojones
  • 682
  • 7
  • 19
5
votes
3 answers

Download URL Contents Directly into String (VB6) WITHOUT Saving to Disk

Basically, I want to download the contents of a particular URL (basically, just HTML codes in the form of a String) into my VB6 String variable. However, there are some conditions. I know about the URLDownloadToFile Function - however, this requires…
Erx_VB.NExT.Coder
  • 4,838
  • 10
  • 56
  • 92
5
votes
1 answer

WinInet POST via SSL (HTTPS) with pure C?

I'm stuck trying to get a WinInet HTTP POST via SSL using ONLY C. I know it's possible. Any good sample code? Thanks so much! EDIT: the following code seems to be working OK under C++ using WinHTTP but I need WinInet: TCHAR szTemp[512] = {0}; BOOL…
wonderer
  • 3,487
  • 11
  • 49
  • 59
5
votes
3 answers

What is the maximum URL length you can pass to the Wininet function, HttpOpenRequest?

What is the maximum URL length you can pass to the Wininet function, HttpOpenRequest?
Jason
  • 16,739
  • 23
  • 87
  • 137
4
votes
2 answers

Posting Data and Getting Response for SOAP Client

Almost all of my development experience has been in desktop applications. I am currently using Delphi 2010 and I need to write a SOAP client to access the web service that the California EDD maintains for electronically handling payroll data. I…
jrodenhi
  • 2,237
  • 1
  • 21
  • 31
4
votes
4 answers

How to clear MSIE/WinInet cache programmatically?

I'm trying to clear out the WinInet cache using Win32 API - by invalidating the cache entries, or deleting them (doesn't matter). I can't find any way to do this for the whole cache (other than iterating over each entry - example in C#, another in…
Piskvor left the building
  • 91,498
  • 46
  • 177
  • 222
4
votes
3 answers

WinInet HttpQuery Info returning Invalid Status Codes

I am working on a program that needs to check the existence of a page before it loads (so nothing too exotic). Everything is working OK, but I cannot get HttpQueryInfo to return a valid status code for a page. The status code returned is:…
dymk
  • 887
  • 2
  • 10
  • 21
4
votes
4 answers

Is it safe to assume InternetCloseHandle() won't fail, thereby allowing cleaner code?

Here's a routine to do an HTTP request using WinINet and either return the fetched string or raise an exception: function Request(const pConnection: HINTERNET; const localpath: string): string; var Buffer: packed Array[1..5000] of Char; BytesRead:…
4
votes
1 answer

Why would WinInet fail to authenticate automatically via Negotiate when connecting by FQDN, but succeed if connecting by IP?

Having a strange issue where WinInet is failing to authenticate using users current credentials if I connect to an internal service by name, but not if I connect by IP. In one of our environments, which sits in its own domain, DOM1, our client can…
bpeikes
  • 3,495
  • 9
  • 42
  • 80
4
votes
1 answer

WinInet undefined identifier

Im pretty new to c++ programming so bear with me . I'm trying to create a ftp client for educational purposes, Did some research and decided to give Wininet a try and came across some online tutorials : Take this as an example: #include…
4
votes
1 answer

Simple function to read file from an URL to a string buffer ( C++ / MQL{4|5} using WinInet.dll )

I am looking for a simple function which is able to read a text or binary file from the internet into a string variable. It´s unbelievable that I could not find anything in the web, just low level descriptions of all the WinInet functions and…
Doerk
  • 71
  • 8
4
votes
5 answers

Why would InternetOpenURL report error 2 (the system cannot find the file specified)?

The internet access code in our product works perfectly for 99.99% of people. However, for a few of them, it just doesn't work at all. We've been adding some trace code to try and figure out what the problem is, and it it turns out that…
Colen
  • 13,428
  • 21
  • 78
  • 107
4
votes
1 answer

Can WinInet return which TLS is being used

We use WinInet and Delphi to communicate using HTTPS. Is there a function in WinInet that will return to me which protocol has been negotiated in the session, i.e. TLS1.1, TLS 1.2 etc.
4
votes
3 answers

How to send a HTTP Post Request in Delphi 2010 using WinInet

I want to send a HTTP Post Request in Delphi 2010 using WinInet, but my script doesn't work ;/ It's my Delphi script: uses WinInet; procedure TForm1.Button1Click(Sender: TObject); var hNet,hURL,hRequest: HINTERNET; begin hNet :=…
noxwow
  • 113
  • 2
  • 2
  • 5
1 2
3
39 40