Skip to content

Commit

Permalink
Update WindowEnumerationHelper.cs
Browse files Browse the repository at this point in the history
Fixed overflow problem when running x64 platform target.
  • Loading branch information
akon47 authored and robmikh committed Jan 10, 2023
1 parent 830f854 commit ee50e2e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public static bool IsWindowValidForCapture(IntPtr hwnd)
return false;
}

var style = (WindowStyles)(uint)GetWindowLongPtr(hwnd, (int)GWL.GWL_STYLE).ToInt32();
var style = (WindowStyles)(uint)GetWindowLongPtr(hwnd, (int)GWL.GWL_STYLE).ToInt64();
if (style.HasFlag(WindowStyles.WS_DISABLED))
{
return false;
Expand Down

0 comments on commit ee50e2e

Please sign in to comment.