I'm trying to use a feature of the Microsoft WinHttp library that has
been exposed by the developers of Win32com. 

Unfortunately most of the library does not seem to be documented and
there are no examples of the correct way to use the win32inet features
via the win32com library.

This is what I have so far:

import win32inet
hinternet = win32inet.InternetOpen("foo 1.0", 0, "", "", 0)
# Does not work!!!
proxy = win32inet.WinHttpGetProxyForUrl( hinternet,
u"http://www.foo.com";, 0  )


As you can see, all I am trying to do is use the win32inet feature to
find out which proxy is the appropriate one to use for a given URL, int
his case foo.com.

Can you help me correct the syntax of the last line? MSN has some good
documentation for the function being wrapped (
http://msdn.microsoft.com/en-us/library/aa384097%28VS.85%29.aspx ) but:

* the args do not seem to map the to those of the python library
perfectly.
* and the python win32inet library seems to be missing the constants
which are required in order to call the functions properly. 

Can somebody point me to the correct way to use these objects? Thanks!

I'm using Python2.4.4 with Win32Com on Windows XP. 

Disclaimer CALYON UK:
This email does not create a legal relationship between any member of the 
Cr=E9dit Agricole group and the recipient or constitute investment advice. 
The content of this email should not be copied or disclosed (in whole or 
part) to any other person. It may contain information which is 
confidential, privileged or otherwise protected from disclosure. If you 
are not the intended recipient, you should notify us and delete it from 
your system. Emails may be monitored, are not secure and may be amended, 
destroyed or contain viruses and in communicating with us such conditions 
are accepted. Any content which does not relate to business matters is not 
endorsed by us.

Calyon is authorised by the Comit=e9 des Etablissements de Cr=e9dit et des
Entreprises d'Investissement (CECEI) and supervised by the Commission Bancaire
in France and subject to limited regulation by the Financial Services Authority.
Details about the extent of our regulation by the Financial Services Authority
are available from us on request. Calyon is incorporated in France with limited
liability and registered in England & Wales. Registration number: FC008194.
Registered office: Broadwalk House, 5 Appold Street, London, EC2A 2DA.
Disclaimer CALYON France:
This message and/or any attachments is intended for the sole use of its 
addressee.
If you are not the addressee, please immediately notify the sender and then 
destroy the message.
As this message and/or any attachments may have been altered without our 
knowledge, its content is not legally binding on CALYON Crédit Agricole CIB.
All rights reserved.

Ce message et ses pièces jointes est destiné à l'usage exclusif de son 
destinataire.
Si vous recevez ce message par erreur, merci d'en aviser immédiatement 
l'expéditeur et de le détruire ensuite.
Le présent message pouvant être altéré à notre insu, CALYON Crédit Agricole CIB 
ne peut pas être engagé par son contenu.
Tous droits réservés.
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to