[ADVPACK]: Sync with Wine 1.5.19.

svn path=/trunk/; revision=57861
This commit is contained in:
Amine Khaldi 2012-12-10 14:28:25 +00:00
parent 61fdf0a380
commit 368132c7ca
4 changed files with 56 additions and 4 deletions

View file

@ -3,7 +3,7 @@ add_definitions(-D__WINESRC__)
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
spec2def(advpack.dll advpack.spec)
spec2def(advpack.dll advpack.spec ADD_IMPORTLIB)
list(APPEND SOURCE
advpack.c

View file

@ -27,4 +27,28 @@ void set_ldids(HINF hInf, LPCWSTR pszInstallSection, LPCWSTR pszWorkingDir) DECL
HRESULT launch_exe(LPCWSTR cmd, LPCWSTR dir, HANDLE *phEXE) DECLSPEC_HIDDEN;
static inline void *heap_alloc(size_t len)
{
return HeapAlloc(GetProcessHeap(), 0, len);
}
static inline BOOL heap_free(void *mem)
{
return HeapFree(GetProcessHeap(), 0, mem);
}
static inline char *heap_strdupWtoA(const WCHAR *str)
{
char *ret = NULL;
if(str) {
size_t size = WideCharToMultiByte(CP_ACP, 0, str, -1, NULL, 0, NULL, NULL);
ret = heap_alloc(size);
if(ret)
WideCharToMultiByte(CP_ACP, 0, str, -1, ret, size, NULL, NULL);
}
return ret;
}
#endif /* __ADVPACK_PRIVATE_H */

View file

@ -779,11 +779,39 @@ done:
HRESULT WINAPI ExtractFilesW(LPCWSTR CabName, LPCWSTR ExpandDir, DWORD Flags,
LPCWSTR FileList, LPVOID LReserved, DWORD Reserved)
{
char *cab_name = NULL, *expand_dir = NULL, *file_list = NULL;
HRESULT hres = S_OK;
FIXME("(%s, %s, %d, %s, %p, %d) stub!\n", debugstr_w(CabName), debugstr_w(ExpandDir),
TRACE("(%s, %s, %d, %s, %p, %d)\n", debugstr_w(CabName), debugstr_w(ExpandDir),
Flags, debugstr_w(FileList), LReserved, Reserved);
return E_FAIL;
if(CabName) {
cab_name = heap_strdupWtoA(CabName);
if(!cab_name)
return E_OUTOFMEMORY;
}
if(ExpandDir) {
expand_dir = heap_strdupWtoA(ExpandDir);
if(!expand_dir)
hres = E_OUTOFMEMORY;
}
if(SUCCEEDED(hres) && FileList) {
file_list = heap_strdupWtoA(FileList);
if(!file_list)
hres = E_OUTOFMEMORY;
}
/* cabinet.dll, which does the real job of extracting files, doesn't have UNICODE API,
so we need W->A conversion at some point anyway. */
if(SUCCEEDED(hres))
hres = ExtractFilesA(cab_name, expand_dir, Flags, file_list, LReserved, Reserved);
heap_free(cab_name);
heap_free(expand_dir);
heap_free(file_list);
return hres;
}
/***********************************************************************

View file

@ -39,7 +39,7 @@ reactos/dll/directx/qedit # Autosync
reactos/dll/directx/quartz # Autosync
reactos/dll/win32/activeds # Synced to Wine-1.1.43?
reactos/dll/win32/actxprxy # Synced to Wine-1.3.29?
reactos/dll/win32/advpack # Synced to Wine-1.5.4
reactos/dll/win32/advpack # Synced to Wine-1.5.19
reactos/dll/win32/atl # Synced to Wine-1.3.37
reactos/dll/win32/avifil32 # Synced to Wine-1.3.37
reactos/dll/win32/bcrypt # Synced to Wine-1.5.4