Skip to content

Commit ee50e2e

Browse files
akon47robmikh
authored andcommitted
Update WindowEnumerationHelper.cs
Fixed overflow problem when running x64 platform target.
1 parent 830f854 commit ee50e2e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

dotnet/WPF/ScreenCapture/ScreenCapture/WindowEnumerationHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public static bool IsWindowValidForCapture(IntPtr hwnd)
148148
return false;
149149
}
150150

151-
var style = (WindowStyles)(uint)GetWindowLongPtr(hwnd, (int)GWL.GWL_STYLE).ToInt32();
151+
var style = (WindowStyles)(uint)GetWindowLongPtr(hwnd, (int)GWL.GWL_STYLE).ToInt64();
152152
if (style.HasFlag(WindowStyles.WS_DISABLED))
153153
{
154154
return false;

0 commit comments

Comments
 (0)