[python-win32] using a COM interface with [in, out]

Rex Corrovan rex555 at hotmail.com
Thu Jan 25 01:55:40 CET 2007


Nevermind, I am an idiot, figured out my problem. Sorry to bother.


From: "Rex Corrovan" <rex555 at hotmail.com>
To: Python-win32 at python.org
Subject: [python-win32] using a COM interface with [in, out]
Date: Wed, 24 Jan 2007 16:31:30 -0800

So I am using an interface where the .idl looks like this:

        HRESULT getVersion(
                        [in, out] BSTR* Version,
                        [in, out] BSTR* error,
                        [out, retval] VARIANT_BOOL* );
        [id(0x60030002)]

Now, I ran makepy, and tried to use this. The use is supposed to be to call 
with two pointers and the function will populate those two pointers.

I tried calling it as

res, ver, err = o.getVersion(None, None)

that puts empty strings into ver and err and returns false. Trying

res, ver, err = o.getVersion()

results in a traceback complaining about parameters not being optional.

Is it possible to do this with python?

_________________________________________________________________
Valentine’s Day -- Shop for gifts that spell L-O-V-E at MSN Shopping 
http://shopping.msn.com/content/shp/?ctId=8323,ptnrid=37,ptnrdata=24095&tcode=wlmtagline



_______________________________________________
Python-win32 mailing list
Python-win32 at python.org
http://mail.python.org/mailman/listinfo/python-win32

_________________________________________________________________
Get in the mood for Valentine's Day. View photos, recipes and more on your 
Live.com page. 
http://www.live.com/?addTemplate=ValentinesDay&ocid=T001MSN30A0701



More information about the Python-win32 mailing list