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
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to