public static Process GetProcess(this IntPtr windowHandle)
 {
     try
     {
         uint lpdwProcessId;
         int  windowThreadProcessId = (int)SEBWindowHandler.GetWindowThreadProcessId(windowHandle, out lpdwProcessId);
         return(Process.GetProcessById((int)lpdwProcessId));
     }
     catch (Exception ex)
     {
         Logger.AddError("Unable to get Process", (object)null, ex, (string)null);
         return((Process)null);
     }
 }