A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-list/2001-April/106246.html below:

COM server with [in,out] args how?

COM server with [in,out] args how?Mark Hammond MarkH at ActiveState.com
Thu Apr 26 09:19:08 EDT 2001
Niki Spahiev wrote:

> Hello,
> 
> is it possible to implement in python COM server interface like this:
> 
> spam( [in] short a, [in,out] short * b, [out,retval] BSTR * c )
> 
> all except [in,out] arg works ok.


    Yes.  If you want to implement a true interface (and it sounds like 
you do), you will need a typelib, and use the "win32com.universal" 
module.  Python can't help you create the typelib.

You would implement a method:

def spam(self, a, b):
   return "retval for c", b*a

Only "in" params are presented to Python, and the result is a tuple of 
(retval, out_args, ...)

Mark.


More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4