aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLyubomir Marinov <lyubomir.marinov@jitsi.org>2011-03-31 17:58:54 +0000
committerLyubomir Marinov <lyubomir.marinov@jitsi.org>2011-03-31 17:58:54 +0000
commitc561ad2277ef351066a4318fc3856dd9fde14de9 (patch)
tree9b64596ddd944f16063fdf740d2bacc189762943
parent0e4a1fb72738c0e89dbeda2f1738504eb9dd9b44 (diff)
downloadjitsi-c561ad2277ef351066a4318fc3856dd9fde14de9.zip
jitsi-c561ad2277ef351066a4318fc3856dd9fde14de9.tar.gz
jitsi-c561ad2277ef351066a4318fc3856dd9fde14de9.tar.bz2
Fixes a 'Class does not exist' error in setup.exe which bootstraps the MSI setup on Windows.
-rw-r--r--src/native/windows/setup/setup.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/native/windows/setup/setup.c b/src/native/windows/setup/setup.c
index d21c5b8..e013d2f 100644
--- a/src/native/windows/setup/setup.c
+++ b/src/native/windows/setup/setup.c
@@ -24,6 +24,17 @@
#include <tlhelp32.h> /* CreateToolhelp32Snapshot */
static LPWSTR Setup_commandLine = NULL;
+
+/*
+ * When <tt>FALSE</tt> is returned from <tt>Setup_enumResNameProc</tt> to stop
+ * <tt>EnumResourceNames</tt>, <tt>GetLastError</tt> on Windows XP seems to
+ * return an error code which is in contrast with the MSDN documentation. If
+ * <tt>Setup_enumResNameProc</tt> has managed to
+ * <tt>Setup_extractAndExecuteMsi</tt>, <tt>Setup_enumResNameProcUserStop</tt>
+ * indicates that the error code returned by <tt>GetLastError</tt> is to be
+ * ignored.
+ */
+static BOOL Setup_enumResNameProcUserStop = FALSE;
static LPTSTR Setup_fileName = NULL;
static LPTSTR Setup_productName = NULL;
static BOOL Setup_waitForParentProcess_ = FALSE;
@@ -73,6 +84,7 @@ Setup_enumResNameProc(
if (ptr)
{
proceed = FALSE;
+ Setup_enumResNameProcUserStop = TRUE;
error = Setup_extractAndExecuteMsi(ptr, size);
}
else
@@ -989,7 +1001,8 @@ WinMain(
RT_RCDATA,
Setup_enumResNameProc,
(LONG_PTR) &error))
- && (ERROR_SUCCESS == error))
+ && (ERROR_SUCCESS == error)
+ && (FALSE == Setup_enumResNameProcUserStop))
{
DWORD enumResourceNamesError = GetLastError();