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

2013-07-24 Thread Aishwarya Sivakumar
This is what i got from the OleView: HRESULT myFunc(string cmd, params object[] arg) [id(0x6002003a), vararg] HRESULT myFunc( [in] BSTR cmd, [in] SAFEARRAY(VARIANT) arg, [out, retval] VARIANT_BOOL* pRetVal); HRESULT

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

2013-07-23 Thread Aishwarya Sivakumar
Hi, Thanks, I could verify the same with IronPython. I was just curious if there was a solution using win32com. Also when i modified the function bool myFunc(string cmd, params object[] arg) I could give server.myFunc(“ABCD”, [“true”]) and the function is called properly. On Fri, Jul 19, 2013

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

2013-07-23 Thread Bill Tutt
What does myFunc (both the params string[] and params object[] version) look like in the generated .tlb (from regasm.exe /tlb) when viewed using OleView.exe? That ought to provide us with the biggest hint I would think. Bill On Tue, Jul 23, 2013 at 9:44 AM, Aishwarya Sivakumar

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

2013-07-19 Thread Vernon D. Cole
Reaching to a .NET assembly from traditional (non managed) code such as CPython is not easy. Have you looked at IronPython? It is true Python, but is an implementation written in .NET, so it interacts with .NET assemblies much more easily. (Unfortunately, it has no ability to talk to Pywin32

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

2013-07-19 Thread Tim Roberts
Vernon D. Cole wrote: Reaching to a .NET assembly from traditional (non managed) code such as CPython is not easy. Well, based on the partial solution that he has so far, I'm assuming he has exported a COM object from his .NET code. At that point, it shouldn't be any different from any other

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

2013-07-18 Thread Tim Roberts
Aishwarya Sivakumar wrote: I tried [true], [[true]], and some more combinations of tuples but everything gave type mismatch error. Unfortunately, in COM there are several ways to declare an array of strings, and not all of those ways are easy to generate in Python. Are you able to run makepy

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

2013-07-17 Thread Aishwarya Sivakumar
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) Am I missing something? What is the

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

2013-07-17 Thread Tim Roberts
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

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

2013-07-17 Thread Aishwarya Sivakumar
I tried [true], [[true]], and some more combinations of tuples but everything gave type mismatch error. ___ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32