https://git.reactos.org/?p=reactos.git;a=commitdiff;h=218b8eda92bc84be24a61…
commit 218b8eda92bc84be24a61c055e567f95b5e5a16b
Author: Giannis Adamopoulos <gadamopoulos(a)reactos.org>
AuthorDate: Wed Feb 7 01:15:49 2018 +0200
Commit: Giannis Adamopoulos <gadamopoulos(a)reactos.org>
CommitDate: Wed Feb 7 01:15:49 2018 +0200
[SYSSETUP] Don't load ISOLATIONAWARE_MANIFEST_RESOURCE_ID manually
Such a manifest is meant to be activated by the caller of the exports of the dll.
This means that the user of syssetup which is setup.exe is the one that should do the
proper handling of the manifests.
Since setup.exe is the one that needs to do the right thing, add a
CREATEPROCESS_MANIFEST_RESOURCE_ID to it and avoid
dealing with ISOLATIONAWARE_MANIFEST_RESOURCE_ID altogether (which is supposed to be
used by activating the activation context
before calling the exports of the dll that has it). We don't really use
ISOLATIONAWARE_MANIFEST_RESOURCE_ID correctly in any
place in the tree so let's rely on CREATEPROCESS_MANIFEST_RESOURCE_ID for now.
This fixes one part of CORE-14228 where no image was shown in the theme selector
buttons. This happened because comctl32 was
statically linked and calling ImageList_LoadImage ended up creating an image list with
comctl32 v5. Then we passed this image
list to a button created with comctl32 v6 and as a result the image list was unusable.
This is yet another issue that needs
to be addressed in the future. Namely, it seems that in windows comctl32 v6 can use
image lists created by comctl32 v5 whereas
we cannot.
This fix is not a hack but cleverly works around these two bugs that need to be
addressed some time in the future.
CORE-14228
---
base/setup/setup/setup.rc | 3 +++
dll/win32/syssetup/syssetup.rc | 2 --
dll/win32/syssetup/wizard.c | 33 ---------------------------------
3 files changed, 3 insertions(+), 35 deletions(-)
diff --git a/base/setup/setup/setup.rc b/base/setup/setup/setup.rc
index b95b0681c6..f36359966c 100644
--- a/base/setup/setup/setup.rc
+++ b/base/setup/setup/setup.rc
@@ -1,4 +1,7 @@
+#include <winuser.h>
+
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Setup"
#define REACTOS_STR_INTERNAL_NAME "setup"
#define REACTOS_STR_ORIGINAL_FILENAME "setup.exe"
+#include <reactos/manifest_exe.rc>
#include <reactos/version.rc>
diff --git a/dll/win32/syssetup/syssetup.rc b/dll/win32/syssetup/syssetup.rc
index bac2e57df0..041295dc4c 100644
--- a/dll/win32/syssetup/syssetup.rc
+++ b/dll/win32/syssetup/syssetup.rc
@@ -24,8 +24,6 @@ IDI_ICON3 ICON "resources/3.ico"
IDI_ICON4 ICON "resources/4.ico"
IDI_ICON5 ICON "resources/5.ico"
-#include <reactos/manifest_dll.rc>
-
STRINGTABLE
BEGIN
IDS_ACKPROJECTS "Wine -
http://www.winehq.org\nFreeType -
http://www.freetype.org\nSYSLINUX -
http://syslinux.zytor.com\nMinGW -
http://www.mingw.org\nBochs -
http://bochs.sourceforge.net\nQEMU -
http://fabrice.bellard.free.fr/qemu\nMesa3D -
http://www.mesa3d.org\nadns -
http://www.gnu.org/software/adns\nICU -
http://www.icu-project.org/\nGraphApp -
http://enchantia.com/software/graphapp/\nExt2 -
http://www.ext2fsd.com/\nGNU FreeFont -
http://savannah.gnu.org/projects/freefont/\nDeja [...]
diff --git a/dll/win32/syssetup/wizard.c b/dll/win32/syssetup/wizard.c
index 796476838f..b61347f8ec 100644
--- a/dll/win32/syssetup/wizard.c
+++ b/dll/win32/syssetup/wizard.c
@@ -2491,25 +2491,6 @@ ProcessUnattendSetup(
typedef DWORD(WINAPI *PFNREQUESTWIZARDPAGES)(PDWORD, HPROPSHEETPAGE *, PSETUPDATA);
-BOOL ActivateComctl32v6ActCtx(ULONG_PTR *cookie, HANDLE* hActCtx)
-{
- ACTCTXW ActCtx = {sizeof(ACTCTX), ACTCTX_FLAG_RESOURCE_NAME_VALID};
- WCHAR fileBuffer[MAX_PATH];
-
- *hActCtx = INVALID_HANDLE_VALUE;
-
- if (!GetModuleFileName(hDllInstance, fileBuffer, MAX_PATH))
- return FALSE;
-
- ActCtx.lpSource = fileBuffer;
- ActCtx.lpResourceName = ISOLATIONAWARE_MANIFEST_RESOURCE_ID;
- *hActCtx = CreateActCtx(&ActCtx);
- if (*hActCtx == INVALID_HANDLE_VALUE)
- return FALSE;
-
- return ActivateActCtx(*hActCtx, cookie);
-}
-
VOID
InstallWizard(VOID)
{
@@ -2523,9 +2504,6 @@ InstallWizard(VOID)
HMODULE hNetShell = NULL;
PFNREQUESTWIZARDPAGES pfn = NULL;
DWORD dwPageCount = 8, dwNetworkPageCount = 0;
- BOOL bActCtxActivated;
- ULONG_PTR cookie;
- HANDLE hActCtx;
LogItem(L"BEGIN_SECTION", L"InstallWizard");
@@ -2543,11 +2521,6 @@ InstallWizard(VOID)
goto done;
}
- /* Load and activate the act ctx for comctl32v6 now manually.
- * Even if the exe of the process had a manifest, at the point of its launch
- * the manifest of comctl32 wouldn't be installed so it wouldn't be loaded
at all */
- bActCtxActivated = ActivateComctl32v6ActCtx(&cookie, &hActCtx);
-
hNetShell = LoadLibraryW(L"netshell.dll");
if (hNetShell != NULL)
{
@@ -2701,12 +2674,6 @@ done:
if (hNetShell != NULL)
FreeLibrary(hNetShell);
- if (bActCtxActivated)
- {
- DeactivateActCtx(0, cookie);
- ReleaseActCtx(hActCtx);
- }
-
if (pSetupData != NULL)
{
DeleteObject(pSetupData->hBoldFont);