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
4
votes
0 answers

InternetErrorDlg API does not display credential dialog box for user in IE10 when proxy is set

I have set proxy server in IE. I prompt user for credentials using InternetErrorDlg API. Prompt appears in IE 9 and below. In IE10 and IE11 prompt doesn't appear. Below is the code sample. DWORD dwStatusCode(0); DWORD dwStatusSize =…
4
votes
1 answer

Socket remains in CLOSE_WAIT state

I am using Wininet to perform a check with my server when the application get started. The problem is that after calling CloseInternetHandle the socket state remains CLOSE_WAIT as seen on netstat, and the worst part is that it never changes it…
opc0de
  • 11,557
  • 14
  • 94
  • 187
4
votes
1 answer

HttpSendRequest blocks on SOAP call

I have trouble with Delphi XE2 app. Sometimes WinInet call to ASMX service blocks and never returns - user must terminate process from task manager to close app. To connect to ASMX service app uses service generated by WSDLImp tool. During its work,…
GothAr
  • 503
  • 5
  • 16
4
votes
1 answer

Why does GetErrorMessage return "wrong password", when the user name is wrong?

GetErrorMessage (from CInternetException) gives me the following: With the incorrect ftp server name: "ERROR! The server name or address could not be resolved" With the incorrect password: ERROR! The password was not allowed With the incorrect…
T.T.T.
  • 33,367
  • 47
  • 130
  • 168
4
votes
2 answers

C++/WinInet Change Proxy Settings Windows 7

[Disclaimer: this is a Windows 7 specific issue as far as I can tell] I've got a block of code that changes the proxy settings in the Windows registry, then proceeds to call the WinInet API with the following: InternetSetOption(NULL,…
Michael
  • 3,151
  • 2
  • 22
  • 27
4
votes
3 answers

How do I transfer a file using wininet that is readable by a php script?

I would like to transfer a text file to a webserver using wininet as if the file was being transferred using a web form that posts the file to the server. Based on answers I've received I've tried the following code: static TCHAR hdrs[] =…
Rob
  • 2,332
  • 7
  • 31
  • 35
4
votes
3 answers

How to check for internet availability in c++

I wrote one small function to check internet connection availability void cis() { if(InternetCheckConnection(NULL,FLAG_ICC_FORCE_CONNECTION,0)) { cout << "internet alive"; } } I'm using WinInet.h for InternetCheckConnection().…
darkworks
  • 65
  • 3
  • 12
4
votes
2 answers

Uploading with HTTPSendRequest

I have to send files to a php script with delphi. I finaly chose to use Wininet functions because I have to pass through a NTLM Authentication proxy. When i send the file, I have empty chars (00) between each chars of my content request : POST…
thomaf
  • 325
  • 1
  • 2
  • 12
4
votes
1 answer

how to contruct HttpSendRequest method of WININET

I have dummy web service with URI =http://localhost/IO_100_Service.svc/xml?id={id} which return data in XML format I want to call this service using WINInet APi in VC++.Can anybody help me how to use contruct "HttpSendRequest" method to add header…
sachin
  • 311
  • 2
  • 13
  • 24
4
votes
2 answers

WinInet - can't remove Content-Length from headers to manually chunk an upload

MSDN states that WinInet does not support chunked upload ("Client code must perform the chunking."). To me that meant I could manually chunk the transfer. My intention was to add "Transfer-Encoding: chunked" via HttpAddRequestHeaders, remove…
ribram
  • 2,392
  • 1
  • 18
  • 20
3
votes
4 answers

Browser Cache API for non IE browsers

IE has WinInet API, such as GetUrlCacheEntryInfo, to read and manipulate IE browser cache. Is there a similar API for non IE browsers such as Firefox or Chrome? If so where can I get more info? Thanks Update: According to following (Accessing…
MaxK
  • 3,511
  • 4
  • 20
  • 16
3
votes
1 answer

Document Mode menu functionality in Web Browser Control

I'm writing my own MFC app that uses WebBrowser control (uses IE9). I wonder how can I use the API similar for "the document mode menu" in IE Developer tools :…
Guy
  • 915
  • 2
  • 14
  • 27
3
votes
1 answer

MFC + Wininet + proxy authentication = problems

I have some code (its actually for sending SMS messages via a web interface, but that's not relevant). The code works fine in the absence of a proxy server, but one customer wants to use this configuration. I've been testing with our proxy, but…
Bob Moore
  • 6,788
  • 3
  • 29
  • 42
3
votes
0 answers

How to set proxy settings of a specific Internet Explorer 8 instance in C# .NET?

I would like to set proxy settings of a specific Internet Explorer 8 instance. Here is my code: static Process RunNewIE8Instance(string proxySettings) { ProcessStartInfo IEStartInfo = new ProcessStartInfo(); IEStartInfo.FileName =…
3
votes
2 answers

InternetReadFile reads only 10kb

i'm trying to download file from http server using WinINet library calls. It works perfectly fine on my local web server. but when i'm trying download something from the internet, InternetReadFile reads only ~10kb of any file (text or binary).…
polotenchiko
  • 91
  • 2
  • 9