Replace call to ExtractIconExW (shell32.dll) by a call to PrivateExtractIconExw (user32.dll) and remove shell32.dll from the list of linked libraries because shell32.dll requires a valid user account upon initialization.

Please remember: Don't use high-level DLLs in low-level components (dll or exe)!!!!

svn path=/trunk/; revision=37891
This commit is contained in:
Eric Kohl 2008-12-06 11:13:50 +00:00
parent fa01d268d4
commit b7903f6d19
2 changed files with 5 additions and 3 deletions

View file

@ -26,6 +26,9 @@ static DWORD NumOfWindows = 0;
static HWND hAppWindowDlg = NULL;
static HHOOK hhk = NULL;
UINT WINAPI PrivateExtractIconExW(LPCWSTR,int,HICON*,HICON*,UINT);
BOOL
CALLBACK
EnumWindowEnumProc(
@ -55,7 +58,7 @@ EnumWindowEnumProc(
if (GetModuleFileNameExW(hProcess, NULL, szFileName, MAX_PATH))
{
szFileName[MAX_PATH-1] = L'\0';
ExtractIconExW(szFileName, 0, &hIcon, NULL, 1);
PrivateExtractIconExW(szFileName, 0, &hIcon, NULL, 1);
}
}
}

View file

@ -13,9 +13,8 @@
<library>user32</library>
<library>gdi32</library>
<library>advapi32</library>
<library>win32ksys</library>
<library>win32ksys</library>
<library>psapi</library>
<library>shell32</library>
<pch>w32csr.h</pch>
<file>alias.c</file>
<file>conio.c</file>