Skip to content

Variable-length path-based string cleanup - #165

Merged
Jon Wiswall (jonwis) merged 4 commits into
masterfrom
user/jonwis/user-path-changes
Dec 29, 2020
Merged

Jon Wiswall (jonwis) merged 4 commits into
masterfrom
user/jonwis/user-path-changes

Conversation

@jonwis

@jonwis Jon Wiswall (jonwis) commented Dec 19, 2020 •

Copy link
Copy Markdown
Member

wil::GetModuleFileName[Ex]W now uses the "adapt fixed buffer to variable length" helper method,
which automatically does the retry-in-a-loop and does the "trim to the first null character" work so
that result.length() matches wcslen(result.c_str()). Fixes #163 .

Also fixes wil::QueryFullProcessImageNameW to default to doubling the buffer rather than increment-by-one
which prevents spinning when paths are > default-stack-buffer-size. Fixes #3 .

And fixes the incorrectly used macro in documentation. Fixes #151

Verified by adding new tests and seeing them work.

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

Labels

None yet

Projects

None yet

2 participants