From c8980fd1af87b3e60406774b41753c50becc3b09 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Wed, 20 Jun 2012 19:17:29 +0200 Subject: [PATCH] Fixed issue #1219: Recent update to ResText failed Signed-off-by: Sven Strickroth --- src/ResText/ResModule.cpp | 6 +++++- src/ResText/ResText.vcproj | 8 ++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/ResText/ResModule.cpp b/src/ResText/ResModule.cpp index 1add16624..94c195142 100644 --- a/src/ResText/ResModule.cpp +++ b/src/ResText/ResModule.cpp @@ -19,6 +19,7 @@ #include "Utils.h" #include ".\resmodule.h" #include +#include "..\Utils\SysInfo.h" #define MYERROR {CUtils::Error(); return FALSE;} @@ -155,7 +156,10 @@ BOOL CResModule::CreateTranslatedResources(LPCTSTR lpszSrcLangDllPath, LPCTSTR l int count = 0; do { - m_hResDll = LoadLibraryEx (lpszSrcLangDllPath, NULL, LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE|LOAD_LIBRARY_AS_IMAGE_RESOURCE|LOAD_IGNORE_CODE_AUTHZ_LEVEL); + if (SysInfo::Instance().IsVistaOrLater()) + m_hResDll = LoadLibraryEx (lpszSrcLangDllPath, NULL, LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE|LOAD_LIBRARY_AS_IMAGE_RESOURCE|LOAD_IGNORE_CODE_AUTHZ_LEVEL); + else + m_hResDll = LoadLibraryEx (lpszSrcLangDllPath, NULL, LOAD_LIBRARY_AS_IMAGE_RESOURCE|LOAD_IGNORE_CODE_AUTHZ_LEVEL); if (m_hResDll == NULL) Sleep(100); count++; diff --git a/src/ResText/ResText.vcproj b/src/ResText/ResText.vcproj index 54a429d21..044c88ca8 100644 --- a/src/ResText/ResText.vcproj +++ b/src/ResText/ResText.vcproj @@ -816,6 +816,10 @@ + + @@ -842,6 +846,10 @@ > + + -- 2.11.4.GIT