From 31ba4134477764f51cfcc980c67177931f3c0380 Mon Sep 17 00:00:00 2001 From: Nikita Leontiev Date: Sun, 30 Nov 2025 09:20:50 +0300 Subject: [PATCH] Info about last error information reset --- sdk-api-src/content/winuser/nf-winuser-getnextwindow.md | 1 + sdk-api-src/content/winuser/nf-winuser-gettopwindow.md | 1 + sdk-api-src/content/winuser/nf-winuser-getwindow.md | 1 + 3 files changed, 3 insertions(+) diff --git a/sdk-api-src/content/winuser/nf-winuser-getnextwindow.md b/sdk-api-src/content/winuser/nf-winuser-getnextwindow.md index 51f3ed0d454..41fd640c866 100644 --- a/sdk-api-src/content/winuser/nf-winuser-getnextwindow.md +++ b/sdk-api-src/content/winuser/nf-winuser-getnextwindow.md @@ -102,6 +102,7 @@ Returns a handle to the window above the given window. Type: HWND If the function succeeds, the return value is a window handle. If no window exists with the specified relationship to the specified window, the return value is NULL. To get extended error information, call GetLastError. +The function does not clear the last error information. To determine success or failure in case of NULL return value, clear the last error information by calling SetLastError function with 0 value, then call GetNextWindow. Function failure will be indicated by a return value of NULL and a GetLastError function result that is nonzero. ## -remarks diff --git a/sdk-api-src/content/winuser/nf-winuser-gettopwindow.md b/sdk-api-src/content/winuser/nf-winuser-gettopwindow.md index 55c95720f68..780703b9f09 100644 --- a/sdk-api-src/content/winuser/nf-winuser-gettopwindow.md +++ b/sdk-api-src/content/winuser/nf-winuser-gettopwindow.md @@ -74,6 +74,7 @@ A handle to the parent window whose child windows are to be examined. If this pa Type: HWND If the function succeeds, the return value is a handle to the child window at the top of the Z order. If the specified window has no child windows, the return value is NULL. To get extended error information, use the GetLastError function. +The function does not clear the last error information. To determine success or failure in case of NULL return value, clear the last error information by calling SetLastError function with 0 value, then call GetTopWindow. Function failure will be indicated by a return value of NULL and a GetLastError function result that is nonzero. ## -see-also diff --git a/sdk-api-src/content/winuser/nf-winuser-getwindow.md b/sdk-api-src/content/winuser/nf-winuser-getwindow.md index 4a74727cc6a..47d39a8af22 100644 --- a/sdk-api-src/content/winuser/nf-winuser-getwindow.md +++ b/sdk-api-src/content/winuser/nf-winuser-getwindow.md @@ -177,6 +177,7 @@ The retrieved handle identifies the specified window's owner window, if any. For Type: HWND If the function succeeds, the return value is a window handle. If no window exists with the specified relationship to the specified window, the return value is NULL. To get extended error information, call GetLastError. +The function does not clear the last error information. To determine success or failure in case of NULL return value, clear the last error information by calling SetLastError function with 0 value, then call GetWindow. Function failure will be indicated by a return value of NULL and a GetLastError function result that is nonzero. ## -remarks