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

Support 'Windows Server 2016, Windows 10 LTSB 2016 and Windows 10 version 1607' #251

Merged
merged 1 commit into from
Feb 17, 2023

Conversation

jf-0
Copy link
Contributor

@jf-0 jf-0 commented Feb 17, 2023

Quill cannot be used in any of the windows versions in the title as it uses GetThreadDescription and SetThreadDescription directly.

The limitiation is also mentioned at https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-getthreaddescription: Windows Server 2016, Windows 10 LTSB 2016 and Windows 10 version 1607: GetThreadDescription is only available by [Run Time Dynamic Linking](https://learn.microsoft.com/en-us/windows/win32/dlls/using-run-time-dynamic-linking) in KernelBase.dll.

This merge request fixes that as Set/GetThreadDescription can be used with LoadLibrary.

Github doesn't allow me to upload a screenshot to this issue, but if you run an exe on Windows Server 2016 which is build with quill it will say
"The procedure entry point SetThreadDescription could not be located in the dynamic library" on startup.

Windows Server 2016, Windows 10 LTSB 2016 and Windows 10 version 1607: 
GetThreadDescription and SetThreadDescription are only available by Run Time Dynamic Linking in KernelBase.dll.
see: https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-getthreaddescription
@odygrd
Copy link
Owner

odygrd commented Feb 17, 2023

thanks a lot for the PR and for fixing this : )

@odygrd odygrd merged commit a587b66 into odygrd:master Feb 17, 2023
@jf-0
Copy link
Contributor Author

jf-0 commented Feb 18, 2023

Thanks for merging, but I'm afraid I've added a new bug.
If GetProcAddress failes FreeLibrary should be called. There is currently a memory leak in the new template.

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

Successfully merging this pull request may close these issues.

2 participants