[python-win32] COM server and function parameters

ricercar at infinito.it ricercar at infinito.it
Wed Oct 15 18:34:29 CEST 2008


Hi all,
I still have some problems with my server.

I have a function that should return three parameters defined as:

 HRESULT GetInfo([out] BSTR *name, [out] BSTR *version, [out] BSTR
*description);

If I return a tuple with three string I get an error saying that the number
of returned parameters is wrong (3 in place of 4). I read this post
http://markmail.org/message/rjpdosrliyne65fd
and added a fourth parameter as first one with a 0 value (OK). 
I'm not sure this is a right solution and I'd like to ask if something has
changed from that post. 

Unfortunately I cannot test if the values returned are good since after that
call I get another call to another function that raise an exception.
The other function is defined as

 HRESULT func2([out] IEnumString ** param1);

I can creat an object that implement IEnumString and return it but after
that I get a QueryInterface on it with iid set to IID_NULL (a list of 0s).
Of course the answer is that the interface is not implemented.
Since I haven't the code that is calling my server I cannot debug that side.
The developer of the client assure that he is not emitting that call and
that a server he wrote in C++ has no problem. So perhaps the problem is from
my side. Is there any reason for a QueryInterface with a null id other that
a client calling it explicitly? Have anybody seen this before?

Thanks and regards, Enrico






More information about the python-win32 mailing list