mirror of
https://github.com/reactos/reactos.git
synced 2024-09-29 05:54:05 +00:00
[0.4.11][PROGMAN][USER32] Do not use LoadLibraryEx() NT6+ flags (#3152) CORE-12004
LOAD_LIBRARY_AS_IMAGE_RESOURCE and LOAD_LIBRARY_SEARCH_SYSTEM32 are Vista+ This fixes some blurry icons in systray when 2k3sp2 kernel32.dll is used in ros CORE-12004 That part in user32 was a regression of SVN r71609 == gita44dfe6c76
While we are at it we do fix some other modules as well, that used those NT6+flags. The fix was picked from 0.4.15-dev-788-ga04831677e
This commit is contained in:
parent
eb15d1c221
commit
5842a525ee
|
@ -586,7 +586,7 @@ DIALOG_SYMBOL_DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
SetDlgItemTextW(hDlg, PM_ICON_FILE, pIconContext->szName);
|
SetDlgItemTextW(hDlg, PM_ICON_FILE, pIconContext->szName);
|
||||||
SendMessageA(pIconContext->hDlgCtrl, LB_SETITEMHEIGHT, 0, 32);
|
SendMessageA(pIconContext->hDlgCtrl, LB_SETITEMHEIGHT, 0, 32);
|
||||||
|
|
||||||
pIconContext->hLibrary = LoadLibraryExW(pIconContext->szName, NULL, LOAD_LIBRARY_AS_IMAGE_RESOURCE | LOAD_LIBRARY_AS_DATAFILE);
|
pIconContext->hLibrary = LoadLibraryExW(pIconContext->szName, NULL, /* NT6+: LOAD_LIBRARY_AS_IMAGE_RESOURCE | */ LOAD_LIBRARY_AS_DATAFILE);
|
||||||
if (pIconContext->hLibrary)
|
if (pIconContext->hLibrary)
|
||||||
{
|
{
|
||||||
EnumResourceNamesW(pIconContext->hLibrary,
|
EnumResourceNamesW(pIconContext->hLibrary,
|
||||||
|
@ -635,7 +635,7 @@ DIALOG_SYMBOL_DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
SetDlgItemTextW(hDlg, PM_ICON_FILE, filename);
|
SetDlgItemTextW(hDlg, PM_ICON_FILE, filename);
|
||||||
DestroyIconList(pIconContext->hDlgCtrl);
|
DestroyIconList(pIconContext->hDlgCtrl);
|
||||||
pIconContext->hLibrary = LoadLibraryExW(filename, NULL, LOAD_LIBRARY_AS_IMAGE_RESOURCE | LOAD_LIBRARY_AS_DATAFILE);
|
pIconContext->hLibrary = LoadLibraryExW(filename, NULL, /* NT6+: LOAD_LIBRARY_AS_IMAGE_RESOURCE | */ LOAD_LIBRARY_AS_DATAFILE);
|
||||||
if (pIconContext->hLibrary)
|
if (pIconContext->hLibrary)
|
||||||
{
|
{
|
||||||
EnumResourceNamesW(pIconContext->hLibrary,
|
EnumResourceNamesW(pIconContext->hLibrary,
|
||||||
|
|
|
@ -1866,7 +1866,7 @@ CURSORICON_CopyImage(
|
||||||
ustrRsrc.Buffer, IS_INTRESOURCE(ustrRsrc.Buffer) ? L"" : ustrRsrc.Buffer);
|
ustrRsrc.Buffer, IS_INTRESOURCE(ustrRsrc.Buffer) ? L"" : ustrRsrc.Buffer);
|
||||||
|
|
||||||
/* Get the module handle or load the module */
|
/* Get the module handle or load the module */
|
||||||
hModule = LoadLibraryExW(ustrModule.Buffer, NULL, LOAD_LIBRARY_AS_IMAGE_RESOURCE | LOAD_LIBRARY_AS_DATAFILE);
|
hModule = LoadLibraryExW(ustrModule.Buffer, NULL, /* NT6+: LOAD_LIBRARY_AS_IMAGE_RESOURCE | */ LOAD_LIBRARY_AS_DATAFILE);
|
||||||
if (!hModule)
|
if (!hModule)
|
||||||
{
|
{
|
||||||
DWORD err = GetLastError();
|
DWORD err = GetLastError();
|
||||||
|
|
Loading…
Reference in a new issue