24 Dec
2025
24 Dec
'25
3:15 a.m.
On Tue Dec 23 18:06:52 2025 +0000, Nikolay Sivov wrote:
Is it a problem to do DestroyIcon() in DllMain? DestroyIcon() doesn't hold the loader lock, so it should be fine.
Calling user32 functions, for example, UnregisterClassW(), in DllMain() is against best practices. However, due to the lack of an UnregisterClassNameW(), we need to unregister those window classes in DllMain(). Such an issue is mentioned on Raymond Chen's blog [Don’t forget to unregister your window classes when your DLL shuts down dynamically](https://devblogs.microsoft.com/oldnewthing/20060920-07/?p=29663). -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9822#note_126107