[python-win32] C# ref argument in pywin32 COM server

Francisco Leskovar francisco.leskovar at gmail.com
Wed Feb 12 03:50:19 EST 2020


Hi there!

I am using win32com.server to make a COM server with Python that is used by
a C# app. I want to implement a C# function in a Python COM server that
looks like this:

public void GetArgs(ref string[] connArgs){
    connArgs= new string[3] { "a", "b", "c" };}

I have tried different approaches with Python but none seem to work. Tried
looking for the documentation but cannot find how to handle arguments that
are passed as reference to Python in the server side. Returning a list or
tuple of utf-8 encoded strings causes the error "All dimensions must be a
sequence of the same size".

Any suggestions on how to approach this?

Thanks in advance for the help.

Kind regards,

Francisco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20200212/2b749ffb/attachment.html>


More information about the python-win32 mailing list