From cb2773fd4c572275eaf42d91b6ed1f903013bc10 Mon Sep 17 00:00:00 2001 From: Nikita Leontiev Date: Wed, 27 Aug 2025 03:12:11 +0300 Subject: [PATCH] PathFileExists description update. --- .../content/shlwapi/nf-shlwapi-pathfileexistsa.md | 9 +++++++-- .../content/shlwapi/nf-shlwapi-pathfileexistsw.md | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/sdk-api-src/content/shlwapi/nf-shlwapi-pathfileexistsa.md b/sdk-api-src/content/shlwapi/nf-shlwapi-pathfileexistsa.md index f1135f85b32d..1385066fbf88 100644 --- a/sdk-api-src/content/shlwapi/nf-shlwapi-pathfileexistsa.md +++ b/sdk-api-src/content/shlwapi/nf-shlwapi-pathfileexistsa.md @@ -64,13 +64,18 @@ Determines whether a path to a file system object such as a file or folder is va Type: LPCTSTR -A pointer to a null-terminated string of maximum length MAX_PATH that contains the full path of the object to verify. +A pointer to a null-terminated string that contains the full path of the object to verify. + +By default, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, prepend "\\\\?\\" to the path. For more information, see [Naming Files, Paths, and Namespaces](/windows/win32/fileio/naming-a-file). + +> [!TIP] +> Starting with Windows 10, Version 1607, you can opt-in to remove the MAX_PATH limitation without prepending "\\\\?\\". See the "Maximum Path Length Limitation" section of [Naming Files, Paths, and Namespaces](/windows/win32/fileio/naming-a-file) for details. ## -returns Type: BOOL -TRUE if the file exists; otherwise, FALSE. Call GetLastError for extended error information. +TRUE if the file exists; otherwise, FALSE. Call GetLastError for extended error information. If the file does not exist, GetLastError will return ERROR_FILE_NOT_FOUND. If the path does not exist, GetLastError will return ERROR_PATH_NOT_FOUND. ## -remarks diff --git a/sdk-api-src/content/shlwapi/nf-shlwapi-pathfileexistsw.md b/sdk-api-src/content/shlwapi/nf-shlwapi-pathfileexistsw.md index 9b42b9bc4a30..52a6a40b0031 100644 --- a/sdk-api-src/content/shlwapi/nf-shlwapi-pathfileexistsw.md +++ b/sdk-api-src/content/shlwapi/nf-shlwapi-pathfileexistsw.md @@ -64,13 +64,18 @@ Determines whether a path to a file system object such as a file or folder is va Type: LPCTSTR -A pointer to a null-terminated string of maximum length MAX_PATH that contains the full path of the object to verify. +A pointer to a null-terminated string that contains the full path of the object to verify. + +By default, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, prepend "\\\\?\\" to the path. For more information, see [Naming Files, Paths, and Namespaces](/windows/win32/fileio/naming-a-file). + +> [!TIP] +> Starting with Windows 10, Version 1607, you can opt-in to remove the MAX_PATH limitation without prepending "\\\\?\\". See the "Maximum Path Length Limitation" section of [Naming Files, Paths, and Namespaces](/windows/win32/fileio/naming-a-file) for details. ## -returns Type: BOOL -TRUE if the file exists; otherwise, FALSE. Call GetLastError for extended error information. If the file does not exist, GetLastError will return ERROR_FILE_NOT_FOUND. +TRUE if the file exists; otherwise, FALSE. Call GetLastError for extended error information. If the file does not exist, GetLastError will return ERROR_FILE_NOT_FOUND. If the path does not exist, GetLastError will return ERROR_PATH_NOT_FOUND. ## -remarks