Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document that GetUserProfileDirectory sets the size of the path written on success #1810

Open
wants to merge 2 commits into
base: docs
Choose a base branch
from

Conversation

ChrisDenton
Copy link
Contributor

It was discovered that this undocumented behaviour was being relied on by a long deprecated Rust stdlib function.

In confirming this behaviour applied to both GetUserProfileDirectoryW and GetUserProfileDirectoryA, I found that the A function, unlike the W function, was not returning TRUE on success. Instead it also returns the size written to the buffer. I'm not sure if that part should be documented so I just changed the success case to nonzero and failure to zero.

Copy link

@ChrisDenton : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants