Check for GetWindowPlacement success#26122
Conversation
|
|
||
| if (!GetWindowPlacement(hwnd, ref placement)) | ||
| { | ||
| throw new Win32Exception(); |
There was a problem hiding this comment.
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.
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.
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