[python-win32] Passing string[] parameters to c# .NET function

Tim Roberts timr at probo.com
Wed Jul 17 20:22:12 CEST 2013


Aishwarya Sivakumar wrote:
>
> I have a C# .NET function bool myFunc(string cmd, params string[]
> arg); I’m trying to access this using win32com as given below:
>
> server.myFunc(“ABCD”, [[“true”]]), but always get Type mismatch error
>
> com_error: (-2147352571, 'Type mismatch.', None, 2)
>

You're passing a list containing a list containing a string --
essentially string[][].   Have you tried it with only one set of brackets?

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the python-win32 mailing list