[IronPython] GetRunningObjectTable
Sébastien de Menten
sdementen at gmail.com
Wed Apr 27 21:40:08 CEST 2011
Hi,
I am trying to use the GetRunningObjectTable function to retrieve a list of
all running objects (to later use them in COM automation).
I do the following :
>>> import System
>>>
System.Runtime.InteropServices.ComTypes.IBindCtx.GetRunningObjectTable(0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: expected IBindCtx, got int
I am puzzled by the error as, if i understood properly the way ipy works, I
would expect to give an Int as input parameter and get back a tuple with the
restult of the function and the out parameter.
If i replace the 0 with a refernce to a IBindCtx type:
>>> import clr
>>> rot=clr.Reference[System.Runtime.InteropServices.ComTypes.IBindCtx]()
>>>
System.Runtime.InteropServices.ComTypes.IBindCtx.GetRunningObjectTable(rot)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: expected IBindCtx, got StrongBox[IBindCtx]
My knowledge of .net is quite reduced ... any help would be greatly
appreciated
sebastien
ps: sorry if this message appears as reposted but I do not see it in the
mailing list after more than 24 hours ...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20110427/a863aacb/attachment.html>
More information about the Ironpython-users
mailing list