[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, INTERNET_OPTION_SETTINGS_CHANGED, NULL, 0);
InternetSetOption(NULL, INTERNET_OPTION_REFRESH , NULL, 0);...
Hello, 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 INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0);
if Assigned(hNet) then
begin
try
hURL := I...
I need some code here. I need to delete these blasted cookies once and for all.
WebBrowser wb = new WebBrowser();
wb.Navigate("www.cookieparadise.info");
//load
string cookie = wb.Document.Cookie;
//cookie = "this=cookie1;that=cookie2;etc=more;";
I need to delete Document.Cookie.
Please dont suggest any javascript because it doesnt wo...
I'm making a program which downloads a simple file from internet on Windows, using
Wininet family API because I want to utilize its IE-compatible proxy behavior. As you all know, current IE has several proxy settings: auto-detect (WPAD), auto-configure (PAC), manually single URL, proxy servers per protocol, socks, direct, ... For most us...
Hi,
Am doing a GET(REST) and using InternetReadFile API to read response which is an xml, it works fine when the response is small but when the response is more then 10kb InternetReadFile returns data with junk characters in between or it chops some portion of data. When i try to reconstruct the response due to presence of junk charac...
Hi all,
I've been trying to use the wininet.dll api to search an ftp site for matching files but it's not working for some reason.
Here's the method i've been using.
Private Sub DoStuff()
Dim hConnection As Long, hOpen As Long, sOrgPath As String, lRes As Long
Dim scUserAgent$
scUserAgent$ = "vb wininet"
hOpen = Inte...
I am trying to login to Google maps data API (get MyMaps) with wininet and delphi but always recevied response: Invalid Token.
I have gotten auth toke with wininet HTTPS call.
What's the problem ?
Please help.Here a example code :
ServerURL='maps.google.com';
pathURL='/maps/feeds/maps/default/full';
headers='Authorization: Googl...
Here is a way to do an HTTP post using Indy, in one line, more or less:
Response := FIdHttp.Post(URL, StringStream);
Is there a function out there (function, not library) that allows the equivalent to be done using WinInet?
Preferably, a function that resembles this:
function PostUsingWinInet(const URL, Data :string; SSL :boolean) :...
Our program calls InternetCheckConnection every 2 seconds to test whether the program is connected to our server.
We have around 4000 clients running our program.
Now the server response is slow, despite its processor is almost idle and the free memory is high enough.
Is it possible that InternetCheckConnection puts a load on our server...
For my newest windows-application I want to create an interface that is web-based using the web-browser control, and I want to make Ajax work on it. Since all the content will be loaded by the web-browser control itself I want to create a web-server that would work on a localhost port and serve my content to the web-browser when it acces...
I have already used wininet to send some synchronous HTTP requests. Now, I want to go one step further and want to request some content asynchronously.
The goal is to get something "reverse proxy"-like. I send an HTTP request which gets answered delayed - as soon as someone wants to contact me. My thread should continue as if there was...
I want to upload "C:\test.txt" to webserver, when I am running program, file is not uploading and I am not getting any error.
the complete C++ code can be find here
and php code on webserver can be find here: "http://student114.110mb.com/upload.txt"
or
"http://student114.110mb.com/upload.php"
kindly help me where I am doing wrong
...
Hoi,
I tried to create a soap request using the WinInet API, however adding headers with SOAP etc seems to fail. Is this a known issue or can WinInet not be used for SOAP?
Any help or sample is highly appreciated.
Jasper
...
Looking for a way to issue an HTTPwebrequest, or use the browser control, or winhttp to make a request to a URL, but override the IP address it connects to from the DNS lookup to a specific one.
Trying to do something similar to the HOSTS file, but programatically without having to modify this file. It can be C# or C+
Why I need it, t...
Hi,
Currently I use the CURL open transport library to genereate http requests with a soap header. This all is implemented in C/C++. I was able to port this to Windows mobile howver I wonder whether I can use WinInet to do the SOAP request? Just to use less memory on the mobile device.
Are there samples on how to do this?
Thanks in ad...
Hi,
I'm transferring a file using ftp in Delphi.
I am able to connect to the ftp account ok but when I try and upload a file the
FtpOpenFile function returns nil instead of a handle the file to be uploaded.
hintfile := FtpOpenFile(hintconnect,PChar(tgtfn),GENERIC_WRITE,FTP_TRANSFER_TYPE_BINARY,0);
If I log into the ftp site using a...
Starting from scratch, would like to create an ftp application using WinInet.
Looking for a real basic example in C++ that will compile and get me started.
Thanks.
...
Trying to wrap this short example in C++. (and its been a while since I did this).
int main(int argc, char* argv[])
{
//Objects
CFtpConnection* pConnect = NULL; //A pointer to a CFtpConnection object
ftpClient UploadExe; //ftpClient object
pConnect = UploadExe.Connect();
UploadExe.GetFiles(pConnect);
...
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 returns lpMsgBuf contains NULL... I was expecting something like ERROR_INTERNET_DISCONNECTED....
Is there any windows API to register a callback for when the WinInet proxy settings have changed?
...