Author: hbelusca Date: Sun Mar 8 14:28:19 2015 New Revision: 66610 URL: http://svn.reactos.org/svn/reactos?rev=66610&view=rev Log: [CONSRV]: Hackfix the icons retrieval in the same way as what was done in r65683, because we have a bug in PrivateExtractIconExW.
Modified: trunk/reactos/win32ss/user/winsrv/consrv/console.c Modified: trunk/reactos/win32ss/user/winsrv/consrv/console.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/winsrv/consrv/console.c?rev=66610&r1=66609&r2=66610&view=diff ============================================================================== --- trunk/reactos/win32ss/user/winsrv/consrv/console.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/winsrv/consrv/console.c [iso-8859-1] Sun Mar 8 14:28:19 2015 @@ -476,11 +476,27 @@ if (IconPath && *IconPath) { HICON hIcon = NULL, hIconSm = NULL; + /* + * FIXME!! Because of a strange bug we have in PrivateExtractIconExW + * (see r65683 for more details), we cannot use this API to extract + * at the same time the large and small icons from the app. + * Instead we just use PrivateExtractIconsW. + * PrivateExtractIconExW(IconPath, ConsoleInitInfo->ConsoleStartInfo->IconIndex, &hIcon, &hIconSm, 1); + */ + PrivateExtractIconsW(IconPath, + ConsoleInitInfo->ConsoleStartInfo->IconIndex, + 32, 32, + &hIcon, NULL, 1, LR_COPYFROMRESOURCE); + PrivateExtractIconsW(IconPath, + ConsoleInitInfo->ConsoleStartInfo->IconIndex, + 16, 16, + &hIconSm, NULL, 1, LR_COPYFROMRESOURCE); + DPRINT("hIcon = 0x%p ; hIconSm = 0x%p\n", hIcon, hIconSm); if (hIcon != NULL) ConsoleInitInfo->ConsoleStartInfo->hIcon = hIcon; if (hIconSm != NULL) ConsoleInitInfo->ConsoleStartInfo->hIconSm = hIconSm;