I don't know what Watin is, but evidently handle
and hwnd
have different types (string
and IntPtr
), and there is no point to comparing them with Equals
.
Whichever one is a string, you can try converting it to an IntPtr
:
static IntPtr ParseIntPtr (string s)
{
s = s.Replace ("0x", "");
return (IntPtr) int.Parse(s, System.Globalization.NumberStyles.AllowHexSpecifier);
}
(I took the method from here).