Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Delay load call SetThreadDescription to restore WPF renderer on Win7 (#…
…10582) Delay load call SetThreadDescription to restore WPF renderer on Win7 ## PR Checklist * [x] Closes something @DHowett asked me to do. * [x] I work here * [x] I F5'd it on a version with this function and it still works ## Detailed Description of the Pull Request / Additional comments I keep forgetting that anything in the WPF control needs to keep working on Win7. Or more specifically... I remember this fact for the DX renderer, but not for the render thread base. Oops. Turns out this particular convenience method to set thread descriptions for visibility inside the debugger (to make my life easier) only works down to 1607 (see https://docs.microsoft.com/windows/win32/api/processthreadsapi/nf-processthreadsapi-setthreaddescription). Since it's just a debugging convenience... skipping it entirely when the procedure is not found should be fine. Also I don't try to load `kernel32.dll` and just get the handle of the existing module (which per the remarks at https://docs.microsoft.com/windows/win32/api/libloaderapi/nf-libloaderapi-getmodulehandlew will not increment the module reference count) because `kernel32.dll` pretty much has to be there or we're already in hot water.
- Loading branch information