34 #include "wine/unicode.h" 43 #define _O_ACCMODE (_O_RDONLY|_O_WRONLY|_O_RDWR) 44 #define _O_APPEND 0x0008 45 #define _O_RANDOM 0x0010 46 #define _O_SEQUENTIAL 0x0020 47 #define _O_TEMPORARY 0x0040 48 #define _O_NOINHERIT 0x0080 49 #define _O_CREAT 0x0100 50 #define _O_TRUNC 0x0200 51 #define _O_EXCL 0x0400 52 #define _O_SHORT_LIVED 0x1000 53 #define _O_TEXT 0x4000 54 #define _O_BINARY 0x8000 109 if (cab->
disk_id == disk_id)
return cab;
127 DWORD dwShareMode = 0;
152 dwCreateDisposition, 0,
NULL);
205 WARN(
"failed to get cabinet stream\n");
213 WARN(
"failed to get stream %u\n",
r);
224 WARN(
"failed to encode stream name\n");
231 WARN(
"failed to open stream 0x%08x\n",
hr);
244 hr = IStream_Read( stm, pv,
cb, &
read );
254 IStream_Release( stm );
266 hr = IStream_Seek( stm, move, seektype, &newpos );
280 'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
281 '`',
'M',
'e',
'd',
'i',
'a',
'`',
' ',
'W',
'H',
'E',
'R',
'E',
' ',
282 '`',
'D',
'i',
's',
'k',
'I',
'd',
'`',
' ',
'=',
' ',
'%',
'i',0};
287 TRACE(
"Unable to query row\n");
341 ERR(
"Failed to get next cabinet information: %d\n", rc);
350 WARN(
"Continuous cabinet %s does not match the next cabinet %s in the media table => use latter one\n",
debugstr_w(cab),
debugstr_w(
mi->cabinet));
358 WARN(
"Cannot update next cabinet filename with a string size %u > 256\n",
length);
410 ERR(
"Failed to get next cabinet information: %u\n", rc);
465 WCHAR *tmpfileW, *tmppathW, *
p;
468 TRACE(
"file in use, scheduling rename operation\n");
487 data->package->need_reboot_at_end = 1;
575 ERR(
"Unexpected notification %d\n", fdint);
593 ERR(
"FDICreate failed\n");
607 ERR(
"FDICopy failed\n");
622 static char filename[] = {
'<',
'S',
'T',
'R',
'E',
'A',
'M',
'>',0};
633 ERR(
"FDICreate failed\n");
641 if (!
ret)
ERR(
"FDICopy failed\n");
655 if (
mi->cabinet[0] ==
'#')
684 'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
'`',
'M',
'e',
'd',
'i',
'a',
'`',
' ',
685 'W',
'H',
'E',
'R',
'E',
' ',
'`',
'L',
'a',
's',
't',
'S',
'e',
'q',
'u',
'e',
'n',
'c',
'e',
'`',
' ',
686 '>',
'=',
' ',
'%',
'i',
' ',
'O',
'R',
'D',
'E',
'R',
' ',
'B',
'Y',
' ',
'`',
'D',
'i',
's',
'k',
'I',
'd',
'`',0};
691 if (Sequence <= mi->last_sequence)
697 TRACE(
"Unable to query row\n");
737 mi->volume_label,
mi->disk_prompt);
743 TRACE(
"sequence %u -> cabinet %s disk id %u\n", Sequence,
debugstr_w(
mi->cabinet),
mi->disk_id);
753 DWORD volumesz, promptsz;
772 if (last_type[0] ==
'n')
867 ERR(
"failed to download %s (%u)\n",
debugstr_w(cabinet_file), rc);
881 if (
mi->volume_label &&
mi->disk_id > 1)
920 if (
item->disk_id == disk_id)
922 TRACE(
"duplicate disk id %u\n", disk_id);
935 IStorage_AddRef( storage );
BOOL WINAPI SetFileAttributesW(LPCWSTR lpFileName, DWORD dwFileAttributes)
#define ERROR_USER_MAPPED_FILE
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
BOOL __cdecl FDIDestroy(HFDI hfdi)
UINT msi_get_stream(MSIDATABASE *, const WCHAR *, IStream **) DECLSPEC_HIDDEN
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
UINT WINAPI MsiSourceListGetInfoW(LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, LPCWSTR szProperty, LPWSTR szValue, LPDWORD pcchValue)
char * strcat(char *DstString, const char *SrcString)
#define STGM_SHARE_EXCLUSIVE
ACPI_SIZE strlen(const char *String)
static WCHAR * strdupW(const WCHAR *src)
#define FILE_ATTRIBUTE_SYSTEM
GLdouble GLdouble GLdouble r
UINT msi_set_sourcedir_props(MSIPACKAGE *package, BOOL replace)
static LPSTR strdupWtoA(LPCWSTR str)
#define INVALID_HANDLE_VALUE
DWORD WINAPI GetLastError(VOID)
#define strncmpiW(s1, s2, n)
UINT WINAPI MsiSourceListEnumMediaDisksW(LPCWSTR szProductCodeOrPatchCode, LPCWSTR szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwIndex, LPDWORD pdwDiskId, LPWSTR szVolumeLabel, LPDWORD pcchVolumeLabel, LPWSTR szDiskPrompt, LPDWORD pcchDiskPrompt)
UINT msi_package_add_info(MSIPACKAGE *, DWORD, DWORD, LPCWSTR, LPWSTR) DECLSPEC_HIDDEN
static const WCHAR INSTALLPROPERTY_LASTUSEDSOURCEW[]
BOOL WINAPI SetFileTime(IN HANDLE hFile, CONST FILETIME *lpCreationTime OPTIONAL, CONST FILETIME *lpLastAccessTime OPTIONAL, CONST FILETIME *lpLastWriteTime OPTIONAL)
BOOL WINAPI LocalFileTimeToFileTime(IN CONST FILETIME *lpLocalFileTime, OUT LPFILETIME lpFileTime)
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
UINT MSI_RecordSetInteger(MSIRECORD *, UINT, int) DECLSPEC_HIDDEN
namespace GUID const ADDRINFOEXW ADDRINFOEXW struct timeval OVERLAPPED LPLOOKUPSERVICE_COMPLETION_ROUTINE HANDLE * handle
#define ERROR_FUNCTION_FAILED
#define ERROR_ACCESS_DENIED
BOOL WINAPI PathStripToRootW(LPWSTR lpszPath)
LPWSTR WINAPI PathAddBackslashW(LPWSTR lpszPath)
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
UINT msi_download_file(LPCWSTR szUrl, LPWSTR filename) DECLSPEC_HIDDEN
BOOL __cdecl FDICopy(HFDI hfdi, char *pszCabinet, char *pszCabPath, int flags, PFNFDINOTIFY pfnfdin, PFNFDIDECRYPT pfnfdid, void *pvUser)
INT MSI_ProcessMessage(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
GLenum GLuint GLenum GLsizei length
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
#define MOVEFILE_DELAY_UNTIL_REBOOT
HFDI __cdecl FDICreate(PFNALLOC pfnalloc, PFNFREE pfnfree, PFNOPEN pfnopen, PFNREAD pfnread, PFNWRITE pfnwrite, PFNCLOSE pfnclose, PFNSEEK pfnseek, int cpuType, PERF perf)
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
UINT WINAPI MsiSourceListEnumSourcesW(LPCWSTR szProductCodeOrPatch, LPCWSTR szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwIndex, LPWSTR szSource, LPDWORD pcchSource)
#define MSICABEXTRACT_FILEEXTRACTED
MSIRECORD * MSI_QueryGetRecord(MSIDATABASE *db, LPCWSTR query,...) DECLSPEC_HIDDEN
BOOL WINAPI DosDateTimeToFileTime(IN WORD wFatDate, IN WORD wFatTime, OUT LPFILETIME lpFileTime)
double __cdecl erf(double)
LPWSTR encode_streamname(BOOL bTable, LPCWSTR in) DECLSPEC_HIDDEN
#define ERROR_INSTALL_FAILURE
UINT WINAPI GetTempFileNameW(IN LPCWSTR lpPathName, IN LPCWSTR lpPrefixString, IN UINT uUnique, OUT LPWSTR lpTempFileName)
#define FILE_ATTRIBUTE_READONLY
#define INVALID_FILE_ATTRIBUTES
static const WCHAR szMsi[]
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
int msiobj_release(MSIOBJECTHDR *info)
static const WCHAR szSourceDir[]
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
#define FILE_ATTRIBUTE_NORMAL
#define FILE_SHARE_DELETE
static const WCHAR INSTALLPROPERTY_LASTUSEDTYPEW[]
#define ERROR_SHARING_VIOLATION
UINT msi_package_add_media_disk(MSIPACKAGE *, DWORD, DWORD, DWORD, LPWSTR, LPWSTR) DECLSPEC_HIDDEN
BOOL WINAPI UrlIsW(LPCWSTR pszUrl, URLIS Urlis)
UINT WINAPI GetDriveTypeW(IN LPCWSTR lpRootPathName)
WINE_UNICODE_INLINE WCHAR * strrchrW(const WCHAR *str, WCHAR ch)
struct list cabinet_streams
int MSI_RecordGetInteger(MSIRECORD *, UINT) DECLSPEC_HIDDEN
BOOL WINAPI GetVolumeInformationW(IN LPCWSTR lpRootPathName, IN LPWSTR lpVolumeNameBuffer, IN DWORD nVolumeNameSize, OUT LPDWORD lpVolumeSerialNumber OPTIONAL, OUT LPDWORD lpMaximumComponentLength OPTIONAL, OUT LPDWORD lpFileSystemFlags OPTIONAL, OUT LPWSTR lpFileSystemNameBuffer OPTIONAL, IN DWORD nFileSystemNameSize)
static char volume_name[]
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
GLsizei GLsizei GLchar * source
WINE_UNICODE_INLINE WCHAR * strcatW(WCHAR *dst, const WCHAR *src)
#define ReadFile(a, b, c, d, e)
#define MSICABEXTRACT_BEGINEXTRACT
#define FILE_ATTRIBUTE_HIDDEN
static HMODULE MODULEINFO DWORD cb
static BOOL msi_free(void *mem)
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
BOOL WINAPI MoveFileExW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName OPTIONAL, IN DWORD dwFlags)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
#define CreateFileA(a, b, c, d, e, f, g)
#define MSIERR_CABNOTFOUND
static WCHAR * strdupAtoW(const char *str)
_CRTIMP int __cdecl read(_In_ int _FileHandle, _Out_writes_bytes_(_MaxCharCount) void *_DstBuf, _In_ unsigned int _MaxCharCount)
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
LPWSTR msi_dup_property(MSIDATABASE *db, LPCWSTR prop) DECLSPEC_HIDDEN