[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr GetParent(IntPtr hWnd);
None.
Please add some!
IntPtr GetParentSafe( IntPtr handle )
{
IntPtr result = GetParent( handle );
if( result == IntPtr.Zero )
{
// An error occured
throw new Win32Exception( Marshal.GetLastWin32Error() );
}
return result;
}
Do you know one? Please contribute it!