[python-win32] Input-only vs. In/Out Function Parameters
Smith, Brian (CR)
smithbk at aecl.ca
Tue Oct 3 15:44:03 CEST 2006
Hi Tim,
Thanks for the response.
> Tell the VBA programmer "Don't do that". Or, rearrange the parameters
> so that the inout arguments are always first.
Okay, I was afraid that would be the answer. I don't particularly like the
first option because simply telling someone not to do something is no
guarantee that they won't do it anyway. I was trying to avoid the second
option since I am replacing an existing API and had hoped to be consistent
with that. However, it seems to be the safer choice.
> This very same question came up on this list in June, and I actually
> spent quite a bit of time trying to chase down documentation of this
> restriction. Surprisingly enough, the "fault" here is not actually in
> Python: it's in the late binding handler in VBA. If you do this same
> thing from a VB app and look at the generated IL code, it is
> the IL that is assigning the outputs to the wrong place.
After doing some searching on the web, I had (naively?) thought perhaps
the answer might be creating a type library that defines the interface.
I had gone as far as installing the Windows Platform SDK so I could use
midl to compile the library, but ran into a problem because it was
looking for a C-preprocessor (cl.exe) that I don't have. Am I going down
the wrong path with this or would it actually help?
Thanks,
Brian
CONFIDENTIAL AND PRIVILEGED INFORMATION NOTICE
This e-mail, and any attachments, may contain information that
is confidential, subject to copyright, or exempt from disclosure.
Any unauthorized review, disclosure, retransmission,
dissemination or other use of or reliance on this information
may be unlawful and is strictly prohibited.
AVIS D'INFORMATION CONFIDENTIELLE ET PRIVILÉGIÉE
Le présent courriel, et toute pièce jointe, peut contenir de
l'information qui est confidentielle, régie par les droits
d'auteur, ou interdite de divulgation. Tout examen,
divulgation, retransmission, diffusion ou autres utilisations
non autorisées de l'information ou dépendance non autorisée
envers celle-ci peut être illégale et est strictement interdite.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20061003/264277a5/attachment.htm
More information about the Python-win32
mailing list