-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Update documentation for GetModuleFileName functions #2091
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
Conversation
|
@Or-Fadlon : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. |
|
Revised. Please make the same update to https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-getmodulefilenamea. Thanks! |
@microsoft-github-policy-service agree |
Summary
Fix documentation ambiguity in GetModuleFileNameW regarding buffer size behavior when buffer size equals module path length.
Problem
The original documentation stated truncation occurs when path length "exceeds" buffer size, but didn't clearly specify the behavior when they are equal. Testing revealed that even when buffer size exactly equals the path length, truncation still occurs.
Solution
Updated the documentation to specify that truncation occurs when path length "exceeds or equals" the buffer size.
Test Evidence
Test showed: