wininet

Is there any special setting of proxy server for WinInet API?

I am using the WinInet API to get to internet files using HTTP. Everything works unless the user goes through a proxy server. I'm using InternetOpen with INTERNET_OPEN_TYPE_PRECONFIG which is supposed to get and use the proxy info from the registry (according to the docs). Do I need to use INTERNET_OPEN_TYPE_PRECONFIG and specify the pr...

VB6 Inet control: possible to not use IE cookies?

Hello I'm using the standard VB6 internet transfer control (Inet). A great feature of it is that it uses IE cookies, so it is possible to authenticate into a website using IE. I can then use my app to download authenticated pages. However, is it possible to do the opposite, to get the control to ignore any IE cookies? ...

How can I get response information from IE programatically?

I want to know what are different ways to get the response code information when we visit any page in IE by using Windows API or some interfaces using C++? I think some ways include 1)Using BHO: But I think that will give HTML information.Can we get information related to HTTP here like response codes? 2)Using Async Pluggable Prot...

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 (http://stackoverflow.com/questions/61453/accessing-firefox-cache-from-an-xpcom-component) the WinInet...

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? ...

If FindNextUrlCacheEntry() fails, how can I retrieve info of the failed entry again?

I got a ERROR_INSUFFICIENT_BUFFER error when invoking FindNextUrlCacheEntry(). Then I want to retrieve the failed entry again, using a enlarged buffer. But I found that when I invoke FindNextUrlCacheEntry(), it seems I was retrieving the one next to the failed entry. Is there any approach I can go back to retrieve the information of the ...

Why does calling the InternetReadFileEx function with IRF_NO_WAIT flag still wait?

I'm using a synchronous wininet request and calling InternetReadFileEx() with the IRF_NO_WAIT flag, but the function still blocks waiting for data. Why is that? ...

WinInet POST via SSL (HTTPS) with pure C?

Hi, 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 bRet = FALSE; HINTERNET hRequest = NULL; HINTERNET hSession = NULL; HINTERNET hConn...

InternetAttemptConnect causing crash C++

I have an app that uses the wininet libraries to do some server posting/requesting. 99.9% of the time it works perfectly, but once in a blue moon the app will crash on an invalid memory reference while attempting to do ::InternetAttemptConnect(NULL). Sorry that the description is rather vague, but does anyone have any ideas on what might...

Application hangs or crashes when unloading WinInet

I have a VC++ application that uses WinInet. It does the following: calls LoadLibrary() to load WinInet.dll calls InternetAttemptConnect() calls InternetOpen() calls InternetConnect() providing INTERNET_SERVICE_FTP as dwService If the last call fails (usually because of wrong password passed) InternetConnect() returns 0 and this shou...

How do I filter FindFirstUrlCacheEntry()?

I have studied the documentation on MSDN, but it doesn't work for me, I am wondering what I'm doing wrong? My code is as follows, I am trying to filter my IE cache, for example, to get only the cookies: #include <stdio.h> #include <stdlib.h> #include <windows.h> #include <wininet.h> int main(void) { DWORD dwEntrySize; DWORD dw...

"Is there a better way?" Error 12029 with wininet on Windows Vista

I kept recieving error 12029 (ERROR INTERNET CANNOT CONNECT, The attempt to connect to the server failed.) when using the the MFC wininet classes on Windows Vista. The cause of the error was due to Windows Defender. Is there a better way to get around this than completely turning off Windows Defender? I tried turning off "real time pr...

Why isn't 2008 server R2 x64 accepting cookies.

I have http connection code that does the typical InternetOpen -> InternetConnect -> HttpOpenRequest -> HttpSendRequest using wininet, which worked just fine on all the prior versions of windows , but win server r2 x64 what is happening is that everything else works just fine but the cookies aren't being accepted and returned on subse...

why is my program not uploading file on remote ftp server?

i coded this program to upload a file on server using ftpput api it is not working it runs but file is not delevered! here's the code: unit ftp3; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,wininet; type TForm1 = class(TForm) Button1: TButton; procedure Bu...

MSXML uses wininet when loads a xml file from a \\share

We know we should not use MSXML from Classic ASP to load remote xml files, because the WinInet is not designed for server use. Do you know if loading a xml file from \\server\sharefolder also loads wininet? Should we use ServerXmlHTTP instead? Thx rido ...

Delete IE Cache Programatically in 64 bit OS

How can I delete the IE cache in a 64 bit environment? ...

WinInet: Why does first ever HttpSendRequest take longer?

I promise this isn't as simple as it sounds. I'm wondering why the the first ever call to HttpSendRequest takes much longer than subsequent calls, even when the later requests are for a different URL. For example: InternetConnect(... "foo.com" ...) // returns immediately HttpOpenRequest(...) // returns immediately HttpSendRequest(...) /...

compile errors w/wininet & winhttp in MFC application

Strangely I had this working before but I reinstalled my system, upgraded to w7 and now I can't seem to get this code to compile. The problem is that I'm using winhttp.h in most of my application, but I have a simple FTP client object that I wrote using wininet.h functionality. I can't seem to get the application to compile now, no matt...

HttpSendRequest blocking when more than two downloads are already in progress

In our program, a new thread is created each time an HTTP request needs to be made, and there can be several running simultaneously. The problem I am having is that if I've got two threads already running, where they are looping on reading from InternetReadFile() after having called HttpSendRequest(), any subsequent attempts to call Htt...

Passive FTP problem using WinINet

I'm trying to ftp a file using passive ftp but I get a timeout (12002) when the "put" command is called. I'm able to use passive ftp with other ftp sites but not this new one. I've tried this using three different ways on the same server: * FileZilla Client in passive mode - this works * WinINet libarary in passive mode - I get a ti...