I am currently trying to write a service in Pascal that allows my installation in Inno Setup to communicate through a proxy server. I was able to do it with a host and port number, but now I need it also to implement recorring to a PAC file. I just can't find it in Pascal, a litle lost, help please. Edit: Ok so, I have done this in order to be able to make calls through a proxy server:
WinHttpReq := CreateOleObject('WinHttp.WinHttpRequest.5.1');
WinHttpReq.Open('POST', 'http://example, false);
WinHttpReq.SetProxy(2, server:port,domain);
WinHttpReq.SetCredentials(username, password,1);
And It works perfectly, but now I want to do it using a PAC file URL instead. I checked the winhttp documentation and for what I understood I have somehow to use the WinHttpGetProxyForUrl function (https://msdn.microsoft.com/en-us/library/windows/desktop/aa384097%28v=vs.85%29.aspx) but because all the examples are in c++ I am not being able to succefully write the request in Pascal. Does anybody have experience in doing it, I would just need a quick example, or info of where to find it. Please Help! Thanks