>>872
System.IntPtr p;
// ...
bool b1 = p != System.IntPtr.Zero ? true : false;
bool b2 = System.Convert.ToBoolean(p.ToInt64());