Hallo,
for a long time looking for an answer or advice on the Internet, and now I decided to ask here :eusa_boohoo:
Why function InitCommonControlsEx is not executed successfully in dll, but it succeeds in exe, as a consequence, Invoke CreateDialogParam, hInstance, IDD_DIALOG, 0, Addr WndProc, 0 returns an error, the resources are not found.
There is a good description of InitCommonControlsEx - https://blogs.msdn.microsoft.com/oldnewthing/20050718-16/?p=34913
Log.exe works fine. Why don't you call InitCommonControlsEx before LoadLibrary?
Quote from: jj2007 on August 26, 2016, 10:05:12 PM
Log.exe works fine. Why don't you call InitCommonControlsEx before LoadLibrary?
Log.dll with the same code does not work, even if I do separately to initialize the dll as it should be. InitCommonControlsEx returns zero... WinMainCRTStartup runs as the first order, LoadLibrary not used, because it is one and the same code that in dll and executable file.
dll use instance of calling process? GetModuleHandle ?
but resources are in dll.
Quote from: TWell on August 26, 2016, 10:51:10 PM
dll use instance of calling process? GetModuleHandle ?
but resources are in dll.
Hallo TWell,
This is critical in this case? I tried with a zero option. But the whole situation is not affected.
P.S.
Thank you! Indeed, it was necessary to obtain GetModuleHandle from log.dll, then everything works fine! Although InitCommonControlsEx returns zero, but it works.
invoke GetModuleHandle,addr logdll