[pywin32-bugs] [ pywin32-Bugs-2817896 ] Cannot open a win32inet session
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2009-07-10 05:34:42
|
Bugs item #2817896, was opened at 2009-07-07 04:35 Message generated for change (Comment added) made by rupole You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=2817896&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Rejected Priority: 5 Private: No Submitted By: Salim Fadhley (salimf) Assigned to: Nobody/Anonymous (nobody) Summary: Cannot open a win32inet session Initial Comment: Can somebody confirm if the win32inet code is stable enough to use? I'm having trouble with very simple examples - and the functions do not seem to work as documented (either according to Microsoft or ActiveState). In this example I'm trying to call a WInHttp function to get the proxy for a particular URL: import win32inet hSession = win32inet.InternetOpen("foo 1.0", 0, "", "", 0) proxy = win32inet.WinHttpGetProxyForUrl( hSession, "http://www.foo.com", (0,0,u"",None,0,1) ) Traceback (most recent call last): File "D:\workspace\pythonscripts\excelpy_egg\src\calyon\excelpy\winhttp2.py", line 3, in ? proxy = win32inet.WinHttpGetProxyForUrl( hSession, "http://www.foo.com", (0,0,u"",None,0,1) ) pywintypes.error: (6, 'WinHttpGetProxyForUrl', 'The handle is invalid.') Any ideas what might be going wrong here? Thanks ---------------------------------------------------------------------- >Comment By: Roger Upole (rupole) Date: 2009-07-10 00:34 Message: As discussed on the python-win32 mailing list, this was due to using InternetOpen instead of WinHttpOpen. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=2817896&group_id=78018 |