diff --git a/sdk-api-src/content/shlwapi/nf-shlwapi-pathfileexistsa.md b/sdk-api-src/content/shlwapi/nf-shlwapi-pathfileexistsa.md index f1135f85b32..1385066fbf8 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 9b42b9bc4a3..52a6a40b003 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