Skip to content

Variable-length path-based string cleanup#165

Merged
jonwis merged 4 commits intomasterfrom
user/jonwis/user-path-changes
Dec 29, 2020
Merged

Variable-length path-based string cleanup#165
jonwis merged 4 commits intomasterfrom
user/jonwis/user-path-changes

Conversation

@jonwis
Copy link
Member

@jonwis jonwis commented Dec 19, 2020

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.

@jonwis jonwis requested review from ChrisGuzak and dunhor December 19, 2020 22:57
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