-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Check for GetWindowPlacement success
#26122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| if (!GetWindowPlacement(hwnd, ref placement)) | ||
| { | ||
| throw new Win32Exception(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not fix. It should be temporary code for debugging to find a root of the issue. So please use GetLastWin32Error to get real error code (and maybe the error message string).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ctor of Win32Exception implements this functionality, see https://learn.microsoft.com/dotnet/api/system.componentmodel.win32exception.-ctor#system-componentmodel-win32exception-ctor
|
@xtqqczze Please look CI error. |
iSazonov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests don't fail now and we don't see the exception but it will be useful if this issue appears again. Now we can re-enable the tests.
/cc @daxian-dbw
|
/azp run PowerShell-Windows-Packaging-CI, PowerShell-CI-linux-packaging |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
|
📣 Hey @@xtqqczze, how did we do? We would love to hear your feedback with the link below! 🗣️ 🔗 https://aka.ms/PSRepoFeedback |
The tests are still failing: #26123 (comment) I don't understand how this is possible when they are marked pending. |
Fix #6871