Author: akhaldi Date: Mon Dec 10 14:28:25 2012 New Revision: 57861
URL: http://svn.reactos.org/svn/reactos?rev=57861&view=rev Log: [ADVPACK]: Sync with Wine 1.5.19.
Modified: trunk/reactos/dll/win32/advpack/CMakeLists.txt trunk/reactos/dll/win32/advpack/advpack_private.h trunk/reactos/dll/win32/advpack/files.c trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/advpack/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advpack/CMakeList... ============================================================================== --- trunk/reactos/dll/win32/advpack/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advpack/CMakeLists.txt [iso-8859-1] Mon Dec 10 14:28:25 2012 @@ -3,7 +3,7 @@
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
Modified: trunk/reactos/dll/win32/advpack/advpack_private.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advpack/advpack_p... ============================================================================== --- trunk/reactos/dll/win32/advpack/advpack_private.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advpack/advpack_private.h [iso-8859-1] Mon Dec 10 14:28:25 2012 @@ -27,4 +27,28 @@
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 */
Modified: trunk/reactos/dll/win32/advpack/files.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advpack/files.c?r... ============================================================================== --- trunk/reactos/dll/win32/advpack/files.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advpack/files.c [iso-8859-1] Mon Dec 10 14:28:25 2012 @@ -779,11 +779,39 @@ HRESULT WINAPI ExtractFilesW(LPCWSTR CabName, LPCWSTR ExpandDir, DWORD Flags, LPCWSTR FileList, LPVOID LReserved, DWORD Reserved) { - - FIXME("(%s, %s, %d, %s, %p, %d) stub!\n", debugstr_w(CabName), debugstr_w(ExpandDir), + char *cab_name = NULL, *expand_dir = NULL, *file_list = NULL; + HRESULT hres = S_OK; + + 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; }
/***********************************************************************
Modified: trunk/reactos/media/doc/README.WINE URL: http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=5... ============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Mon Dec 10 14:28:25 2012 @@ -39,7 +39,7 @@ 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