From eaff561f19e80c1fac7f43933b12f55c39908ce6 Mon Sep 17 00:00:00 2001 From: Chris Denton Date: Wed, 24 Apr 2024 13:29:57 +0000 Subject: [PATCH 1/2] GetUserProfileDirectory sets the size on success --- .../content/userenv/nf-userenv-getuserprofiledirectorya.md | 2 ++ .../content/userenv/nf-userenv-getuserprofiledirectoryw.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sdk-api-src/content/userenv/nf-userenv-getuserprofiledirectorya.md b/sdk-api-src/content/userenv/nf-userenv-getuserprofiledirectorya.md index cd79c8ab74f0..f0b87705c91f 100644 --- a/sdk-api-src/content/userenv/nf-userenv-getuserprofiledirectorya.md +++ b/sdk-api-src/content/userenv/nf-userenv-getuserprofiledirectorya.md @@ -78,6 +78,8 @@ Specifies the size of the lpProfileDir buffer, in TCHARs. If the buffer specified by lpProfileDir is not large enough or lpProfileDir is NULL, the function fails and this parameter receives the necessary buffer size, including the terminating null character. +If the function succeeds then this parameter receives the number of TCHARs written to lpProfileDir, including the terminating null character. + ## -returns Type: BOOL diff --git a/sdk-api-src/content/userenv/nf-userenv-getuserprofiledirectoryw.md b/sdk-api-src/content/userenv/nf-userenv-getuserprofiledirectoryw.md index feafc09d3947..2191dd6f98ba 100644 --- a/sdk-api-src/content/userenv/nf-userenv-getuserprofiledirectoryw.md +++ b/sdk-api-src/content/userenv/nf-userenv-getuserprofiledirectoryw.md @@ -78,6 +78,8 @@ Specifies the size of the lpProfileDir buffer, in TCHARs. If the buffer specified by lpProfileDir is not large enough or lpProfileDir is NULL, the function fails and this parameter receives the necessary buffer size, including the terminating null character. +If the function succeeds then this parameter receives the number of TCHARs written to lpProfileDir, including the terminating null character. + ## -returns Type: BOOL From e775fab712ff457db1f6ad04eef9f7e88e35b5f1 Mon Sep 17 00:00:00 2001 From: Chris Denton Date: Wed, 24 Apr 2024 13:48:40 +0000 Subject: [PATCH 2/2] GetUserProfileDirectoryA returns nonzero success --- .../content/userenv/nf-userenv-getuserprofiledirectorya.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdk-api-src/content/userenv/nf-userenv-getuserprofiledirectorya.md b/sdk-api-src/content/userenv/nf-userenv-getuserprofiledirectorya.md index f0b87705c91f..02fe93f92294 100644 --- a/sdk-api-src/content/userenv/nf-userenv-getuserprofiledirectorya.md +++ b/sdk-api-src/content/userenv/nf-userenv-getuserprofiledirectorya.md @@ -84,7 +84,9 @@ If the function succeeds then this parameter receives the number of TCHARsBOOL -TRUE if successful; otherwise, FALSE. To get extended error information, call GetLastError. +If the function succeeds, the return value is nonzero. + +If the function fails, the return value is zero. To get extended error information, call GetLastError. ## -remarks