Re: [twsocket] TProxyInfo for D2009
Maurizio, I've asked Michel (tested for you in the past). He's very busy right now, but he could setup and test it mid next week. He will be on vacation the following 2 weeks, so it's next week or next year... Paul - Original Message - From: Maurizio Lotauro [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Wednesday, December 10, 2008 1:55 AM Subject: Re: [twsocket] TProxyInfo for D2009 I don't have and environment with W2k and IE5 to check this situation. Anyone? Any other opinion and/or suggestion? -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] TProxyInfo for D2009
Maurizio Lotauro wrote: Scrive Arno Garrels [EMAIL PROTECTED]: Maurizio Lotauro wrote: [...] This is the point. The above remarks is really vague. The Unicode version exists in IE5 but down's work or doesn't exist at all? And even more questions: What about the record INTERNET_PROXY_INFO (http://msdn.microsoft.com/en-us/library/aa385148.aspx)? I completely forget to check the WinINet of D2009! Thank you very much for remind!! Why use wininet.pas at all? Just to save a few declarations. Problem is that LPCTSTR maps to UNICODE in any case, wininet.h does not declare an A-version. You are absolutely right. This mean that more work is needed :-( It's easy. BTW have you a link where get the Windows header files without downloading the whole sdk? I always download the SDK, I can send you the zipped headers for Vista (~ 10 MB) in a PM. So what about declaring a dummy INTERNET_PROXY_INFOA record and use InternetQueryOptionA for everything, requires a few explicit conversions to UnicodeString but that won't hurt since these strings may IMO contain plain ASCII printable only. I must decide first which version use: always the Ansi, the Unicode with D2009 and the Ansi with previous versions, or both Unicode (if available) and Ansi. In the first and last case I'll certainly declare a INTERNET_PROXY_INFOA record. The first is easy and does not need to be tested. -- Arno Garrels Bye, Maurizio. This mail has been sent using Alpikom webmail system http://www.alpikom.it-- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] TProxyInfo for D2009
Maurizio Lotauro wrote: Scrive Arno Garrels [EMAIL PROTECTED]: Arno Garrels wrote: Maurizio Lotauro wrote: [...] I'm in doubt about this. The remarks of INTERNET_PER_CONN_OPTION Structure say: In Internet Explorer 5, only the ANSI versions of InternetQueryOption and InternetSetOption will work with the INTERNET_PER_CONN_OPTION structure. The Unicode versions will support the INTERNET_PER_CONN_OPTION structure in later versions of Internet Explorer. This is not very clear to me. Should I anyway use the Ansi version to keep the compability with IE5? Should I check the availibility of the Wide version, eventually only in D2009? Actually the component works starting Win95. UNICODE is defined in Delphi 2009 and better only and executables built with Delphi 2009 run on Windows 2000 and better only. Windows 2000 was released February 2000, IE 5.0 March 1999, so IMHO no problem. Obviously it was too early in the morning when I wrote this nonsense, :-D I thought that before IE 5 only the ANSI version was supported :) So indeed a little bit more work is required. This is the point. The above remarks is really vague. The Unicode version exists in IE5 but down's work or doesn't exist at all? And even more questions: What about the record INTERNET_PROXY_INFO (http://msdn.microsoft.com/en-us/library/aa385148.aspx)? Problem is that LPCTSTR maps to UNICODE in any case, wininet.h does not declare an A-version. So what about declaring a dummy INTERNET_PROXY_INFOA record and use InternetQueryOptionA for everything, requires a few explicit conversions to UnicodeString but that won't hurt since these strings may IMO contain plain ASCII printable only. -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] TProxyInfo for D2009
Scrive Arno Garrels [EMAIL PROTECTED]: Maurizio Lotauro wrote: [...] This is the point. The above remarks is really vague. The Unicode version exists in IE5 but down's work or doesn't exist at all? And even more questions: What about the record INTERNET_PROXY_INFO (http://msdn.microsoft.com/en-us/library/aa385148.aspx)? I completely forget to check the WinINet of D2009! Thank you very much for remind!! Problem is that LPCTSTR maps to UNICODE in any case, wininet.h does not declare an A-version. You are absolutely right. This mean that more work is needed :-( BTW have you a link where get the Windows header files without downloading the whole sdk? So what about declaring a dummy INTERNET_PROXY_INFOA record and use InternetQueryOptionA for everything, requires a few explicit conversions to UnicodeString but that won't hurt since these strings may IMO contain plain ASCII printable only. I must decide first which version use: always the Ansi, the Unicode with D2009 and the Ansi with previous versions, or both Unicode (if available) and Ansi. In the first and last case I'll certainly declare a INTERNET_PROXY_INFOA record. Bye, Maurizio. This mail has been sent using Alpikom webmail system http://www.alpikom.it -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] TProxyInfo for D2009
Maurizio Lotauro wrote: so it should be enough to add just one line: if @InternetQueryOption = nil then begin {$IFDEF UNICODE} @InternetQueryOption := GetProcAddress(WinInetHandle, 'InternetQueryOptionW'); {$ELSE} @InternetQueryOption := GetProcAddress(WinInetHandle, 'InternetQueryOptionA'); {$ENDIF} I'm in doubt about this. The remarks of INTERNET_PER_CONN_OPTION Structure say: In Internet Explorer 5, only the ANSI versions of InternetQueryOption and InternetSetOption will work with the INTERNET_PER_CONN_OPTION structure. The Unicode versions will support the INTERNET_PER_CONN_OPTION structure in later versions of Internet Explorer. This is not very clear to me. Should I anyway use the Ansi version to keep the compability with IE5? Should I check the availibility of the Wide version, eventually only in D2009? Actually the component works starting Win95. UNICODE is defined in Delphi 2009 and better only and executables built with Delphi 2009 run on Windows 2000 and better only. Windows 2000 was released February 2000, IE 5.0 March 1999, so IMHO no problem. -- Arno Garrels Bye, Maurizio. This mail has been sent using Alpikom webmail system http://www.alpikom.it -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] TProxyInfo for D2009
Arno Garrels wrote: Maurizio Lotauro wrote: so it should be enough to add just one line: if @InternetQueryOption = nil then begin {$IFDEF UNICODE} @InternetQueryOption := GetProcAddress(WinInetHandle, 'InternetQueryOptionW'); {$ELSE} @InternetQueryOption := GetProcAddress(WinInetHandle, 'InternetQueryOptionA'); {$ENDIF} I'm in doubt about this. The remarks of INTERNET_PER_CONN_OPTION Structure say: In Internet Explorer 5, only the ANSI versions of InternetQueryOption and InternetSetOption will work with the INTERNET_PER_CONN_OPTION structure. The Unicode versions will support the INTERNET_PER_CONN_OPTION structure in later versions of Internet Explorer. This is not very clear to me. Should I anyway use the Ansi version to keep the compability with IE5? Should I check the availibility of the Wide version, eventually only in D2009? Actually the component works starting Win95. UNICODE is defined in Delphi 2009 and better only and executables built with Delphi 2009 run on Windows 2000 and better only. Windows 2000 was released February 2000, IE 5.0 March 1999, so IMHO no problem. Obviously it was too early in the morning when I wrote this nonsense, I thought that before IE 5 only the ANSI version was supported :) So indeed a little bit more work is required. -- Arno garrels -- Arno Garrels Bye, Maurizio. This mail has been sent using Alpikom webmail system http://www.alpikom.it -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] TProxyInfo for D2009
Scrive Arno Garrels [EMAIL PROTECTED]: Paul wrote: I'm trying to use TProxyInfo with D2009. Since Wininet is not unicode enabled, It is. Only some parameters like host names etc. are of type LPSTR. All function and structures used by TProxyInfo are LPSTR, one LPCSTR and two LPTSTR. For the last one I'm using the Ansi version of InternetQueryOption so they are mapped to AnsiString. I've changed all Char, PChar and String to Ansi except the variables used by ICS-function ParseUrl. I get about 60 Warnings :-( That is not the correct way to make ProxyInfo working with Delphi 2009. Actually there are just very few changes required. I'll do a deep revision, but I must first solve a big problem with a third party com component (the application exit in the middle of an operation without any message :-( ). Bye, Maurizio. -- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html Anyone used Winhttp instead Wininet for this ? It's unicode enabled and can handle WPAD which is commonly used now. Paul -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be This mail has been sent using Alpikom webmail system http://www.alpikom.it -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] TProxyInfo for D2009
Maurizio Lotauro wrote: Scrive Arno Garrels [EMAIL PROTECTED]: Paul wrote: I'm trying to use TProxyInfo with D2009. Since Wininet is not unicode enabled, It is. Only some parameters like host names etc. are of type LPSTR. All function and structures used by TProxyInfo are LPSTR, one LPCSTR and two LPTSTR. For the last one I'm using the Ansi version of InternetQueryOption so they are mapped to AnsiString. LPTSTR maps depending on the Unicode directive to either Ansi or Unicode, so it should be enough to add just one line: if @InternetQueryOption = nil then begin {$IFDEF UNICODE} @InternetQueryOption := GetProcAddress(WinInetHandle, 'InternetQueryOptionW'); {$ELSE} @InternetQueryOption := GetProcAddress(WinInetHandle, 'InternetQueryOptionA'); {$ENDIF} -- Arno Garrels I've changed all Char, PChar and String to Ansi except the variables used by ICS-function ParseUrl. I get about 60 Warnings :-( That is not the correct way to make ProxyInfo working with Delphi 2009. Actually there are just very few changes required. I'll do a deep revision, but I must first solve a big problem with a third party com component (the application exit in the middle of an operation without any message :-( ). Bye, Maurizio. -- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html Anyone used Winhttp instead Wininet for this ? It's unicode enabled and can handle WPAD which is commonly used now. Paul -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be This mail has been sent using Alpikom webmail system http://www.alpikom.it -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] TProxyInfo for D2009
Scrive Arno Garrels [EMAIL PROTECTED]: [...] LPTSTR maps depending on the Unicode directive to either Ansi or Unicode, Yes I know so it should be enough to add just one line: if @InternetQueryOption = nil then begin {$IFDEF UNICODE} @InternetQueryOption := GetProcAddress(WinInetHandle, 'InternetQueryOptionW'); {$ELSE} @InternetQueryOption := GetProcAddress(WinInetHandle, 'InternetQueryOptionA'); {$ENDIF} I'm in doubt about this. The remarks of INTERNET_PER_CONN_OPTION Structure say: In Internet Explorer 5, only the ANSI versions of InternetQueryOption and InternetSetOption will work with the INTERNET_PER_CONN_OPTION structure. The Unicode versions will support the INTERNET_PER_CONN_OPTION structure in later versions of Internet Explorer. This is not very clear to me. Should I anyway use the Ansi version to keep the compability with IE5? Should I check the availibility of the Wide version, eventually only in D2009? Actually the component works starting Win95. Bye, Maurizio. This mail has been sent using Alpikom webmail system http://www.alpikom.it -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] TProxyInfo for D2009
Scrive Paul [EMAIL PROTECTED]: Hi Maurizio, Since Wininet is not unicode enabled, I've changed all Char, PChar and String to Ansi except the variables used by ICS-function ParseUrl. I get about 60 Warnings :-( I see. I can try to adapt it to D2009. It's working, but the warnings are all about ansistring-string conversion I could add an ansi version of function ParseUrl() This would probably remove the warnings. I'll look into this today or tomorrw. Anyone used Winhttp instead Wininet for this ? It's unicode enabled and can handle WPAD which is commonly used now. Ok for unicode support, but why you are convinced that WPAD is not handled by WinINet? From http://msdn.microsoft.com/en-us/library/aa383993(VS.85).aspx I'm 100% sure: - All user reports I get are those who use WPAD. - We've opened a Microsoft support ticket for this issue and they confirmed that it won't work with WinInet. So WinINet has a function that the only mission is detect the WPAD and it doens't work, and M$ know that? Incredible! What explanation they do? In Vista, there's an updated version on WinInet that can handle WPAD on IPv6 So M$ updated WinINet to support IPv6 but not fixed the DetectAutoProxyUrl function? Oh dear... Bye, Maurizio. This mail has been sent using Alpikom webmail system http://www.alpikom.it -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] TProxyInfo for D2009
- Original Message - From: Maurizio Lotauro [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Wednesday, December 03, 2008 3:57 PM Subject: Re: [twsocket] TProxyInfo for D2009 What explanation they do? deprecated Paul -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
[twsocket] TProxyInfo for D2009
I'm trying to use TProxyInfo with D2009. Since Wininet is not unicode enabled, I've changed all Char, PChar and String to Ansi except the variables used by ICS-function ParseUrl. I get about 60 Warnings :-( Anyone used Winhttp instead Wininet for this ? It's unicode enabled and can handle WPAD which is commonly used now. Paul -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] TProxyInfo for D2009
Scrive Paul [EMAIL PROTECTED]: I'm trying to use TProxyInfo with D2009. Very interesting ;-) Since Wininet is not unicode enabled, I've changed all Char, PChar and String to Ansi except the variables used by ICS-function ParseUrl. I get about 60 Warnings :-( I see. I can try to adapt it to D2009. Anyone used Winhttp instead Wininet for this ? It's unicode enabled and can handle WPAD which is commonly used now. Ok for unicode support, but why you are convinced that WPAD is not handled by WinINet? From http://msdn.microsoft.com/en-us/library/aa383993(VS.85).aspx ---8--- DetectAutoProxyUrl Function Attempts to determine the location of a WPAD autoproxy script. ---8--- If it doesn't get it I don't expect that Winhttp does. Eventually get out that function from TProxyInfo and try with different dwDetectFlags values. Bye, Maurizio. This mail has been sent using Alpikom webmail system http://www.alpikom.it -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be