advpack: Forward ExecuteCabA to its Unicode counterpart.

This commit is contained in:
James Hawkins 2006-03-30 12:26:59 -06:00 committed by Alexandre Julliard
parent fb5ec209cd
commit 017d1b0b56
2 changed files with 48 additions and 2 deletions

View File

@ -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)

View File

@ -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"
@ -87,6 +88,51 @@ HRESULT WINAPI DoInfInstall(const SETUPCOMMAND_PARAMS *setup)
/***********************************************************************
* 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(&section, 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(&section);
return hr;
}
/***********************************************************************
* ExecuteCabW (ADVPACK.@)
*
* Installs the INF file extracted from a specified cabinet file.
*
* PARAMS
@ -101,7 +147,7 @@ HRESULT WINAPI DoInfInstall(const SETUPCOMMAND_PARAMS *setup)
* 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;