0

Im trying to write an IronPython app that uses a COM object interface. I manage to import it using clr.AddReference, and manage also to call some of the functions, create objects, etc.

However at a certain point when trying to call a function I get :

StandardError: Error while invoking GetK300RZ.

(GetK300RZ being the function name.)

Why is this happening to me? What does this error mean exactly? could this be related to the 'embed interop types' option?

I would greatly appriciate any insight as to how to get around this problem...

Thanks

4

1 回答 1

0

这仅适用于遇到类似问题的任何人 - 问题是函数的参数是 typeoutrefin C#。无法调用该函数,因为没有相应的函数签名。我不得不使用clr.Reference[]显式创建函数参数的引用。

我想当使用外部 COM 对象时,应该停止思考 python 并开始思考 .net 或 C#...

于 2013-04-29T06:41:13.967 回答