Skip to content

Commit 91aec65

Browse files
authored
Document that GetUserProfileDirectory sets the size of the path written on success (#1810)
* GetUserProfileDirectory sets the size on success * GetUserProfileDirectoryA returns nonzero success
1 parent e1564a7 commit 91aec65

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

sdk-api-src/content/userenv/nf-userenv-getuserprofiledirectorya.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,15 @@ Specifies the size of the <i>lpProfileDir</i> buffer, in <b>TCHARs</b>.
7878

7979
If the buffer specified by <i>lpProfileDir</i> is not large enough or <i>lpProfileDir</i> is <b>NULL</b>, the function fails and this parameter receives the necessary buffer size, including the terminating null character.
8080

81+
If the function succeeds then this parameter receives the number of <b>TCHARs</b> written to <i>lpProfileDir</i>, including the terminating null character.
82+
8183
## -returns
8284

8385
Type: <b>BOOL</b>
8486

85-
<b>TRUE</b> if successful; otherwise, <b>FALSE</b>. To get extended error information, call <a href="/windows/desktop/api/errhandlingapi/nf-errhandlingapi-getlasterror">GetLastError</a>.
87+
If the function succeeds, the return value is nonzero.
88+
89+
If the function fails, the return value is zero. To get extended error information, call <a href="/windows/desktop/api/errhandlingapi/nf-errhandlingapi-getlasterror">GetLastError</a>.
8690

8791
## -remarks
8892

sdk-api-src/content/userenv/nf-userenv-getuserprofiledirectoryw.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ Specifies the size of the <i>lpProfileDir</i> buffer, in <b>TCHARs</b>.
7878

7979
If the buffer specified by <i>lpProfileDir</i> is not large enough or <i>lpProfileDir</i> is <b>NULL</b>, the function fails and this parameter receives the necessary buffer size, including the terminating null character.
8080

81+
If the function succeeds then this parameter receives the number of <b>TCHARs</b> written to <i>lpProfileDir</i>, including the terminating null character.
82+
8183
## -returns
8284

8385
Type: <b>BOOL</b>

0 commit comments

Comments
 (0)