advpack: Forward ExecuteCabA to its Unicode counterpart.
diff --git a/dlls/advpack/advpack.spec b/dlls/advpack/advpack.spec
index 252b779..2d3731c 100644
--- a/dlls/advpack/advpack.spec
+++ b/dlls/advpack/advpack.spec
@@ -14,7 +14,7 @@
@ stdcall -private DllMain(long long ptr)
@ stdcall DoInfInstall(ptr)
@ stdcall ExecuteCabA(ptr ptr ptr)
-# stdcall ExecuteCabW(ptr ptr ptr)
+@ stdcall ExecuteCabW(ptr ptr ptr)
@ stdcall ExecuteCab(ptr ptr ptr) ExecuteCabA
@ stdcall ExtractFilesA(str str long ptr ptr long)
# stdcall ExtractFilesW(wstr wstr long ptr ptr long)
diff --git a/dlls/advpack/install.c b/dlls/advpack/install.c
index 042f761..80ed36e 100644
--- a/dlls/advpack/install.c
+++ b/dlls/advpack/install.c
@@ -27,6 +27,7 @@
#include "winreg.h"
#include "winver.h"
#include "winternl.h"
+#include "winnls.h"
#include "setupapi.h"
#include "advpub.h"
#include "wine/debug.h"
@@ -86,6 +87,51 @@
/***********************************************************************
* ExecuteCabA (ADVPACK.@)
+ *
+ * See ExecuteCabW.
+ */
+HRESULT WINAPI ExecuteCabA(HWND hwnd, CABINFOA* pCab, LPVOID pReserved)
+{
+ UNICODE_STRING cab, inf, section;
+ CABINFOW cabinfo;
+ HRESULT hr;
+
+ TRACE("(%p, %p, %p)\n", hwnd, pCab, pReserved);
+
+ if (!pCab)
+ return E_INVALIDARG;
+
+ if (pCab->pszCab)
+ {
+ RtlCreateUnicodeStringFromAsciiz(&cab, pCab->pszCab);
+ cabinfo.pszCab = cab.Buffer;
+ }
+ else
+ cabinfo.pszCab = NULL;
+
+ RtlCreateUnicodeStringFromAsciiz(&inf, pCab->pszInf);
+ RtlCreateUnicodeStringFromAsciiz(§ion, pCab->pszSection);
+
+ MultiByteToWideChar(CP_ACP, 0, pCab->szSrcPath, -1, cabinfo.szSrcPath,
+ sizeof(cabinfo.szSrcPath) / sizeof(WCHAR));
+
+ cabinfo.pszInf = inf.Buffer;
+ cabinfo.pszSection = section.Buffer;
+ cabinfo.dwFlags = pCab->dwFlags;
+
+ hr = ExecuteCabW(hwnd, &cabinfo, pReserved);
+
+ if (pCab->pszCab)
+ RtlFreeUnicodeString(&cab);
+
+ RtlFreeUnicodeString(&inf);
+ RtlFreeUnicodeString(§ion);
+
+ return hr;
+}
+
+/***********************************************************************
+ * ExecuteCabW (ADVPACK.@)
*
* Installs the INF file extracted from a specified cabinet file.
*
@@ -101,7 +147,7 @@
* BUGS
* Unimplemented
*/
-HRESULT WINAPI ExecuteCabA( HWND hwnd, CABINFOA* pCab, LPVOID pReserved )
+HRESULT WINAPI ExecuteCabW(HWND hwnd, CABINFOW* pCab, LPVOID pReserved)
{
FIXME("(%p %p %p): stub\n", hwnd, pCab, pReserved);
return E_FAIL;