[IronPython] Process.GetProcessById error
cephire
id804097 at gmail.com
Thu Aug 21 18:21:20 CEST 2008
Hi,
Using ironpython I'm trying to get the active window details. Refering
to voidspace (http://www.voidspace.org.uk/ironpython/winforms/
part10.shtml), I've created a user32 dll. I'm using the below code.
if User32.GetWindowText(hd, txt, WndTitleChars):
pid = clr.Reference[Int32](0)
User32.GetWindowThreadProcessId(hd, pid)
Process.GetProcessById(pid)
However the process.getprocessbyid line is generating an error: Cannot
convert Reference[int](Reference(2872)) to Int32.
Can someone please help me to fix this?
Thank you,
Joseph
More information about the Ironpython-users
mailing list