123 static const WCHAR szBackupEntry[] = {
124 '-',
'1',
',',
'0',
',',
'0',
',',
'0',
',',
'0',
',',
'0',
',',
'-',
'1',0
127 static const WCHAR backslash[] = {
'\\',0};
128 static const WCHAR ini[] = {
'.',
'i',
'n',
'i',0};
129 static const WCHAR backup[] = {
'b',
'a',
'c',
'k',
'u',
'p',0};
134 if (!lpcszFileList || !*lpcszFileList)
138 lstrcpyW(szIniPath, lpcszBackupDir);
149 szString = szBackupEntry;
154 while (*lpcszFileList)
157 lpcszFileList +=
lstrlenW(lpcszFileList) + 1;
208 if (!lpszSourceDir || !lpszSourceFile || !lpszDestDir)
257 DWORD dwLen, dwLastError;
265 if (!lpszSourceDir || !lpszSourceFile || !lpszDestDir)
283 lstrcpyW(szDestFilename, lpszDestFile);
289 lstrcpyW(szDestFilename, lpszSourceFile);
335 static const WCHAR asterisk[] = {
'*',0};
336 static const WCHAR dot[] = {
'.',0};
337 static const WCHAR dotdot[] = {
'.',
'.',0};
347 goto deleteinitialdirectory;
351 if (fname_len && fname[fname_len-1] !=
'\\') fname[fname_len++] =
'\\';
352 lstrcpyW(fname + fname_len, asterisk);
360 if (
lstrcmpW(dot, w32fd.cFileName) != 0 &&
361 lstrcmpW(dotdot, w32fd.cFileName) != 0)
363 lstrcpyW(fname + fname_len, w32fd.cFileName);
374 *(fname + fname_len) =
'\0';
379deleteinitialdirectory:
461 FIXME(
"Flags ignored!\n");
464 if (pszFileOrDirName && *pszFileOrDirName)
514 LPWSTR szFilename, szFlags;
515 LPWSTR cmdline_copy, cmdline_ptr;
522 cmdline_ptr = cmdline_copy;
542#define EXTRACT_FILLFILELIST 0x00000001
543#define EXTRACT_EXTRACTFILES 0x00000002
589 szConvertedList[dwLen - 1] =
'\0';
592 if (!szConvertedList[0])
601 temp = szConvertedList;
613 return szConvertedList;
632 if (dwTestLen == dwLen)
638 szFileList += dwTestLen + 1;
648 DWORD dwNumFound = 0;
654 session->Operation &= ~EXTRACT_FILLFILELIST;
669 session->Operation &= ~EXTRACT_FILLFILELIST;
716 DWORD dwFileCount = 0;
717 DWORD dwFilesFound = 0;
723 if (!CabName || !ExpandDir)
747 if (!szConvertedList)
754 if (dwFilesFound != dwFileCount)
1047 pdwMSVer, pdwLSVer, bVersion);
1081 DWORD dwHandle, dwInfoSize;
1088 static const WCHAR backslash[] = {
'\\',0};
1089 static const WCHAR translation[] = {
1090 '\\',
'V',
'a',
'r',
'F',
'i',
'l',
'e',
'I',
'n',
'f',
'o',
1091 '\\',
'T',
'r',
'a',
'n',
's',
'l',
'a',
't',
'i',
'o',
'n',0
1095 pdwMSVer, pdwLSVer, bVersion);
1132 (
LPVOID *)&pFixedVersionInfo, &uValueLen))
1138 *pdwMSVer = pFixedVersionInfo->dwFileVersionMS;
1139 *pdwLSVer = pFixedVersionInfo->dwFileVersionLS;
1144 (
LPVOID *)&pLangAndCodePage, &uValueLen))
1150 *pdwMSVer = pLangAndCodePage->wLanguage;
1151 *pdwLSVer = pLangAndCodePage->wCodePage;
vector< FileInfo > FileList
ACPI_SIZE strlen(const char *String)
LPWSTR get_parameter(LPWSTR *params, WCHAR separator, BOOL quoted) DECLSPEC_HIDDEN
static char * heap_strdupWtoA(const WCHAR *str)
static BOOL heap_free(void *mem)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
HRESULT WINAPI GetVersionFromFileExA(LPCSTR lpszFilename, LPDWORD pdwMSVer, LPDWORD pdwLSVer, BOOL bVersion)
HRESULT WINAPI FileSaveRestoreA(HWND hDlg, LPSTR pszFileList, LPSTR pszDir, LPSTR pszBaseName, DWORD dwFlags)
static UINT CALLBACK pQuietQueueCallback(PVOID Context, UINT Notification, UINT_PTR Param1, UINT_PTR Param2)
HRESULT WINAPI FileSaveMarkNotExistA(LPSTR pszFileList, LPSTR pszDir, LPSTR pszBaseName)
HRESULT WINAPI GetVersionFromFileExW(LPCWSTR lpszFilename, LPDWORD pdwMSVer, LPDWORD pdwLSVer, BOOL bVersion)
HRESULT WINAPI GetVersionFromFileA(LPCSTR Filename, LPDWORD MajorVer, LPDWORD MinorVer, BOOL Version)
HRESULT WINAPI ExtractFilesA(LPCSTR CabName, LPCSTR ExpandDir, DWORD Flags, LPCSTR FileList, LPVOID LReserved, DWORD Reserved)
static LPSTR convert_file_list(LPCSTR FileList, DWORD *dwNumFiles)
HRESULT WINAPI DelNodeA(LPCSTR pszFileOrDirName, DWORD dwFlags)
struct tagLANGANDCODEPAGE LANGANDCODEPAGE
HRESULT WINAPI AddDelBackupEntryA(LPCSTR lpcszFileList, LPCSTR lpcszBackupDir, LPCSTR lpcszBaseName, DWORD dwFlags)
#define EXTRACT_EXTRACTFILES
HRESULT WINAPI FileSaveRestoreOnINFA(HWND hWnd, LPCSTR pszTitle, LPCSTR pszINF, LPCSTR pszSection, LPCSTR pszBackupDir, LPCSTR pszBaseBackupFile, DWORD dwFlags)
static UINT CALLBACK pQueueCallback(PVOID Context, UINT Notification, UINT_PTR Param1, UINT_PTR Param2)
static HRESULT DELNODE_recurse_dirtree(LPWSTR fname, DWORD flags)
HRESULT WINAPI AdvInstallFileW(HWND hwnd, LPCWSTR lpszSourceDir, LPCWSTR lpszSourceFile, LPCWSTR lpszDestDir, LPCWSTR lpszDestFile, DWORD dwFlags, DWORD dwReserved)
static void free_file_list(SESSION *session)
HRESULT WINAPI FileSaveRestoreW(HWND hDlg, LPWSTR pszFileList, LPWSTR pszDir, LPWSTR pszBaseName, DWORD dwFlags)
HRESULT WINAPI FileSaveRestoreOnINFW(HWND hWnd, LPCWSTR pszTitle, LPCWSTR pszINF, LPCWSTR pszSection, LPCWSTR pszBackupDir, LPCWSTR pszBaseBackupFile, DWORD dwFlags)
static DWORD fill_file_list(SESSION *session, LPCSTR szCabName, LPCSTR szFileList)
HRESULT WINAPI DelNodeW(LPCWSTR pszFileOrDirName, DWORD dwFlags)
static void free_file_node(struct FILELIST *pNode)
HRESULT WINAPI AdvInstallFileA(HWND hwnd, LPCSTR lpszSourceDir, LPCSTR lpszSourceFile, LPCSTR lpszDestDir, LPCSTR lpszDestFile, DWORD dwFlags, DWORD dwReserved)
static BOOL file_in_list(LPCSTR szFile, LPCSTR szFileList)
HRESULT WINAPI DelNodeRunDLL32A(HWND hWnd, HINSTANCE hInst, LPSTR cmdline, INT show)
HRESULT WINAPI FileSaveMarkNotExistW(LPWSTR pszFileList, LPWSTR pszDir, LPWSTR pszBaseName)
static LPWSTR ansi_to_unicode_list(LPCSTR ansi_list)
#define EXTRACT_FILLFILELIST
HRESULT WINAPI DelNodeRunDLL32W(HWND hWnd, HINSTANCE hInst, LPWSTR cmdline, INT show)
HRESULT WINAPI AddDelBackupEntryW(LPCWSTR lpcszFileList, LPCWSTR lpcszBackupDir, LPCWSTR lpcszBaseName, DWORD dwFlags)
HRESULT WINAPI ExtractFilesW(LPCWSTR CabName, LPCWSTR ExpandDir, DWORD Flags, LPCWSTR FileList, LPVOID LReserved, DWORD Reserved)
HRESULT WINAPI GetVersionFromFileW(LPCWSTR Filename, LPDWORD MajorVer, LPDWORD MinorVer, BOOL Version)
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
#define HeapFree(x, y, z)
#define FILE_ATTRIBUTE_NORMAL
#define MultiByteToWideChar
BOOL WINAPI CopyFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName, IN BOOL bFailIfExists)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
BOOL WINAPI SetFileAttributesW(LPCWSTR lpFileName, DWORD dwFileAttributes)
DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName)
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
BOOL WINAPI FindClose(HANDLE hFindFile)
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
BOOL WINAPI WritePrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR string, LPCWSTR filename)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpiA(LPCSTR str1, LPCSTR str2)
static void basename(LPCWSTR path, LPWSTR name)
PVOID WINAPI SetupInitDefaultQueueCallbackEx(HWND owner, HWND progress, UINT msg, DWORD reserved1, PVOID reserved2)
UINT WINAPI SetupDefaultQueueCallbackW(PVOID context, UINT notification, UINT_PTR param1, UINT_PTR param2)
void WINAPI SetupTermDefaultQueueCallback(PVOID context)
BOOL WINAPI SetupQueueCopyW(HSPFILEQ queue, PCWSTR src_root, PCWSTR src_path, PCWSTR src_file, PCWSTR src_descr, PCWSTR src_tag, PCWSTR dst_dir, PCWSTR dst_file, DWORD style)
BOOL WINAPI GetFileVersionInfoW(LPCWSTR filename, DWORD handle, DWORD datasize, LPVOID data)
BOOL WINAPI VerQueryValueW(LPCVOID pBlock, LPCWSTR lpSubBlock, LPVOID *lplpBuffer, PUINT puLen)
DWORD WINAPI GetFileVersionInfoSizeW(LPCWSTR filename, LPDWORD handle)
IN PVCB IN PBCB OUT PDIRENT IN USHORT IN POEM_STRING Filename
UINT WINAPI GetTempFileNameW(IN LPCWSTR lpPathName, IN LPCWSTR lpPrefixString, IN UINT uUnique, OUT LPWSTR lpTempFileName)
#define SPFILENOTIFY_RENAMEERROR
UINT(CALLBACK * PSP_FILE_CALLBACK_W)(IN PVOID Context, IN UINT Notification, IN UINT_PTR Param1, IN UINT_PTR Param2)
#define SPFILENOTIFY_DELETEERROR
#define SPFILENOTIFY_COPYERROR
GLenum const GLfloat * params
_Check_return_ long __cdecl wcstol(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
int WINAPI lstrlenA(LPCSTR lpString)
unsigned __int3264 UINT_PTR
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
#define FILE_ATTRIBUTE_READONLY
#define FILE_ATTRIBUTE_HIDDEN
#define FILE_ATTRIBUTE_DIRECTORY
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
static unsigned __int64 next
#define SetupOpenFileQueue
#define SetupCommitFileQueueW
#define SetupCloseFileQueue
struct FILELIST * FilterList
struct FILELIST * FileList
#define INVALID_FILE_ATTRIBUTES
_In_ PWDFDEVICE_INIT _In_ PFN_WDF_DEVICE_SHUTDOWN_NOTIFICATION Notification
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
DWORD WINAPI GetLastError(void)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
_Reserved_ PVOID Reserved
#define ERROR_PATH_NOT_FOUND
#define HRESULT_FROM_WIN32(x)
_Must_inspect_result_ _In_ ULONG Flags