updspapi: Add a stub implementation of UpdSpSetDynamicStringA.

Hans Leidekker hans at codeweavers.com
Tue Jan 20 07:23:11 CST 2009


UpdSpSetDynamicStringA is another undocumented API called by the IE7
installer. Luckily the installer log provides some useful information.

Before stubbing:

4.676: ProcessDynamicStrings:  CustomStringTable for DownloadedProgramFiles returned D
4.676: ProcessDynamicStrings:  UpdSpSetDynamicString failed on DownloadedProgramFiles to D:  0x0
4.677: DoInstallation:  ProcessDynamicStrings failed:  0x0

Which suggests at least two string arguments. A first draft stub and a +relay
log reveals that the first argument is not a string but a pointer to an inf
structure (ie. an HINF), since this value is also passed as the first argument
to a function documented to take an HINF in that position.

The second two parameters do appear to be strings; dumping them yields
"DownloadedProgramFiles" and "D". Finally, returning 1 instead of 0 causes
this message to appear in the log instead:

4.393: ProcessDynamicStrings:  CustomStringTable for DownloadedProgramFiles returned D
4.393: ProcessDynamicStrings:  all %DownloadedProgramFiles% replaced with D.

 -Hans

diff --git a/dlls/updspapi/Makefile.in b/dlls/updspapi/Makefile.in
index 8917f49..ad7c6f1 100644
--- a/dlls/updspapi/Makefile.in
+++ b/dlls/updspapi/Makefile.in
@@ -5,6 +5,9 @@ VPATH     = @srcdir@
 MODULE    = updspapi.dll
 IMPORTS   = setupapi kernel32
 
+C_SRCS = \
+    main.c
+
 @MAKE_DLL_RULES@
 
 @DEPENDENCIES@  # everything below this line is overwritten by make depend
diff --git a/dlls/updspapi/main.c b/dlls/updspapi/main.c
new file mode 100644
index 0000000..73af32f
--- /dev/null
+++ b/dlls/updspapi/main.c
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2009 Hans Leidekker for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "config.h"
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "winreg.h"
+#include "setupapi.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(updspapi);
+
+DWORD WINAPI UpdSpSetDynamicStringA(HINF hinf, LPSTR str1, LPSTR str2)
+{
+    FIXME("%p %s %s\n", hinf, debugstr_a(str1), debugstr_a(str2));
+    return 1;
+}
diff --git a/dlls/updspapi/updspapi.spec b/dlls/updspapi/updspapi.spec
index eb47bc4..ca4ef7c 100644
--- a/dlls/updspapi/updspapi.spec
+++ b/dlls/updspapi/updspapi.spec
@@ -63,7 +63,7 @@
 @ stdcall UpdSpScanFileQueueW(long long long ptr ptr ptr) setupapi.SetupScanFileQueueW
 @ stdcall UpdSpSetDirectoryIdA(long long str) setupapi.SetupSetDirectoryIdA
 @ stdcall UpdSpSetDirectoryIdW(long long wstr) setupapi.SetupSetDirectoryIdW
-@ stub UpdSpSetDynamicStringA
+@ stdcall UpdSpSetDynamicStringA(ptr str str)
 @ stub UpdSpSetDynamicStringExA
 @ stub UpdSpSetDynamicStringExW
 @ stub UpdSpSetDynamicStringW



More information about the wine-patches mailing list