2006-02-17 00:04:10 +00:00
|
|
|
/*
|
|
|
|
* Implementation of the Microsoft Installer (msi.dll)
|
|
|
|
*
|
|
|
|
* Copyright 2002-2005 Mike McCormack for CodeWeavers
|
2006-10-22 20:23:59 +00:00
|
|
|
* Copyright 2005 Aric Stewart for CodeWeavers
|
2006-02-17 00:04:10 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-08-01 23:12:11 +00:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2006-02-17 00:04:10 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __WINE_MSI_PRIVATE__
|
|
|
|
#define __WINE_MSI_PRIVATE__
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
2008-05-17 19:46:01 +00:00
|
|
|
#include "fdi.h"
|
2006-02-17 00:04:10 +00:00
|
|
|
#include "msi.h"
|
|
|
|
#include "msiquery.h"
|
|
|
|
#include "objbase.h"
|
|
|
|
#include "objidl.h"
|
|
|
|
#include "winnls.h"
|
Sync aclui, advapi32, atl, authz, kernel32, msi, oledlg, powrprof, qmgr, riched20, samlib to Wine 1.2rc5
Update some psdk Headers to get some more synched winetests build
svn path=/trunk/; revision=47930
2010-07-03 12:42:55 +00:00
|
|
|
#include "winver.h"
|
2006-02-17 00:04:10 +00:00
|
|
|
#include "wine/list.h"
|
2008-12-27 15:10:14 +00:00
|
|
|
#include "wine/debug.h"
|
2006-02-17 00:04:10 +00:00
|
|
|
|
|
|
|
#define MSI_DATASIZEMASK 0x00ff
|
|
|
|
#define MSITYPE_VALID 0x0100
|
|
|
|
#define MSITYPE_LOCALIZABLE 0x200
|
|
|
|
#define MSITYPE_STRING 0x0800
|
|
|
|
#define MSITYPE_NULLABLE 0x1000
|
|
|
|
#define MSITYPE_KEY 0x2000
|
2008-01-16 10:11:22 +00:00
|
|
|
#define MSITYPE_TEMPORARY 0x4000
|
2006-02-17 00:04:10 +00:00
|
|
|
|
Finish the Wine sync. These components are not just rc file changes
atl, comctl32, comdlg32, dwmapi, fusion, gdiplus, jscript, mpr, mshtml, msi, msimtf, msxml3, ole32, oleaut32, riched20, shdocvw, shlwapi, urlmon, usp10, version and windowscodecs
Seems to build and boot. /me hides
svn path=/trunk/; revision=48273
2010-07-26 02:26:04 +00:00
|
|
|
#define MAX_STREAM_NAME_LEN 62
|
2006-08-30 19:24:26 +00:00
|
|
|
|
2008-01-16 10:11:22 +00:00
|
|
|
/* Install UI level mask for AND operation to exclude flags */
|
|
|
|
#define INSTALLUILEVEL_MASK 0x0007
|
|
|
|
|
2006-02-17 00:04:10 +00:00
|
|
|
#define MSITYPE_IS_BINARY(type) (((type) & ~MSITYPE_NULLABLE) == (MSITYPE_STRING|MSITYPE_VALID))
|
|
|
|
|
|
|
|
struct tagMSITABLE;
|
|
|
|
typedef struct tagMSITABLE MSITABLE;
|
|
|
|
|
|
|
|
struct string_table;
|
|
|
|
typedef struct string_table string_table;
|
|
|
|
|
|
|
|
struct tagMSIOBJECTHDR;
|
|
|
|
typedef struct tagMSIOBJECTHDR MSIOBJECTHDR;
|
|
|
|
|
|
|
|
typedef VOID (*msihandledestructor)( MSIOBJECTHDR * );
|
|
|
|
|
|
|
|
struct tagMSIOBJECTHDR
|
|
|
|
{
|
|
|
|
UINT magic;
|
|
|
|
UINT type;
|
|
|
|
LONG refcount;
|
|
|
|
msihandledestructor destructor;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct tagMSIDATABASE
|
|
|
|
{
|
|
|
|
MSIOBJECTHDR hdr;
|
|
|
|
IStorage *storage;
|
|
|
|
string_table *strings;
|
2008-01-16 10:11:22 +00:00
|
|
|
UINT bytes_per_strref;
|
2006-10-22 20:23:59 +00:00
|
|
|
LPWSTR path;
|
2006-09-18 16:45:21 +00:00
|
|
|
LPWSTR deletefile;
|
2009-10-25 11:06:09 +00:00
|
|
|
LPWSTR localfile;
|
2006-02-17 00:04:10 +00:00
|
|
|
LPCWSTR mode;
|
|
|
|
struct list tables;
|
|
|
|
struct list transforms;
|
2009-12-22 09:28:03 +00:00
|
|
|
struct list streams;
|
2006-02-17 00:04:10 +00:00
|
|
|
} MSIDATABASE;
|
|
|
|
|
|
|
|
typedef struct tagMSIVIEW MSIVIEW;
|
|
|
|
|
|
|
|
typedef struct tagMSIQUERY
|
|
|
|
{
|
|
|
|
MSIOBJECTHDR hdr;
|
|
|
|
MSIVIEW *view;
|
|
|
|
UINT row;
|
|
|
|
MSIDATABASE *db;
|
|
|
|
struct list mem;
|
|
|
|
} MSIQUERY;
|
|
|
|
|
|
|
|
/* maybe we can use a Variant instead of doing it ourselves? */
|
|
|
|
typedef struct tagMSIFIELD
|
|
|
|
{
|
|
|
|
UINT type;
|
|
|
|
union
|
|
|
|
{
|
|
|
|
INT iVal;
|
|
|
|
LPWSTR szwVal;
|
|
|
|
IStream *stream;
|
|
|
|
} u;
|
|
|
|
} MSIFIELD;
|
|
|
|
|
|
|
|
typedef struct tagMSIRECORD
|
|
|
|
{
|
|
|
|
MSIOBJECTHDR hdr;
|
|
|
|
UINT count; /* as passed to MsiCreateRecord */
|
|
|
|
MSIFIELD fields[1]; /* nb. array size is count+1 */
|
|
|
|
} MSIRECORD;
|
|
|
|
|
2008-01-16 10:11:22 +00:00
|
|
|
typedef struct tagMSISOURCELISTINFO
|
|
|
|
{
|
|
|
|
struct list entry;
|
|
|
|
DWORD context;
|
|
|
|
DWORD options;
|
|
|
|
LPCWSTR property;
|
|
|
|
LPWSTR value;
|
|
|
|
} MSISOURCELISTINFO;
|
|
|
|
|
|
|
|
typedef struct tagMSIMEDIADISK
|
|
|
|
{
|
|
|
|
struct list entry;
|
|
|
|
DWORD context;
|
|
|
|
DWORD options;
|
|
|
|
DWORD disk_id;
|
|
|
|
LPWSTR volume_label;
|
|
|
|
LPWSTR disk_prompt;
|
|
|
|
} MSIMEDIADISK;
|
|
|
|
|
2008-05-17 19:46:01 +00:00
|
|
|
typedef struct tagMSIMEDIAINFO
|
|
|
|
{
|
|
|
|
UINT disk_id;
|
|
|
|
UINT type;
|
|
|
|
UINT last_sequence;
|
|
|
|
LPWSTR disk_prompt;
|
|
|
|
LPWSTR cabinet;
|
|
|
|
LPWSTR first_volume;
|
|
|
|
LPWSTR volume_label;
|
|
|
|
BOOL is_continuous;
|
|
|
|
BOOL is_extracted;
|
2010-05-29 08:55:43 +00:00
|
|
|
WCHAR sourcedir[MAX_PATH];
|
2008-05-17 19:46:01 +00:00
|
|
|
} MSIMEDIAINFO;
|
|
|
|
|
2008-12-27 15:10:14 +00:00
|
|
|
typedef struct tagMSIPATCHINFO
|
|
|
|
{
|
2010-05-29 08:55:43 +00:00
|
|
|
struct list entry;
|
2008-12-27 15:10:14 +00:00
|
|
|
LPWSTR patchcode;
|
|
|
|
LPWSTR transforms;
|
2010-05-29 08:55:43 +00:00
|
|
|
LPWSTR localfile;
|
Finish the Wine sync. These components are not just rc file changes
atl, comctl32, comdlg32, dwmapi, fusion, gdiplus, jscript, mpr, mshtml, msi, msimtf, msxml3, ole32, oleaut32, riched20, shdocvw, shlwapi, urlmon, usp10, version and windowscodecs
Seems to build and boot. /me hides
svn path=/trunk/; revision=48273
2010-07-26 02:26:04 +00:00
|
|
|
MSIPATCHSTATE state;
|
2008-12-27 15:10:14 +00:00
|
|
|
} MSIPATCHINFO;
|
|
|
|
|
2008-01-16 10:11:22 +00:00
|
|
|
typedef struct _column_info
|
|
|
|
{
|
|
|
|
LPCWSTR table;
|
|
|
|
LPCWSTR column;
|
|
|
|
INT type;
|
|
|
|
BOOL temporary;
|
|
|
|
struct expr *val;
|
|
|
|
struct _column_info *next;
|
|
|
|
} column_info;
|
|
|
|
|
2006-11-28 11:21:39 +00:00
|
|
|
typedef const struct tagMSICOLUMNHASHENTRY *MSIITERHANDLE;
|
2006-08-01 23:12:11 +00:00
|
|
|
|
2006-02-17 00:04:10 +00:00
|
|
|
typedef struct tagMSIVIEWOPS
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* fetch_int - reads one integer from {row,col} in the table
|
|
|
|
*
|
|
|
|
* This function should be called after the execute method.
|
2006-10-22 20:23:59 +00:00
|
|
|
* Data returned by the function should not change until
|
2006-02-17 00:04:10 +00:00
|
|
|
* close or delete is called.
|
|
|
|
* To get a string value, query the database's string table with
|
|
|
|
* the integer value returned from this function.
|
|
|
|
*/
|
2008-01-16 10:11:22 +00:00
|
|
|
UINT (*fetch_int)( struct tagMSIVIEW *view, UINT row, UINT col, UINT *val );
|
2006-02-17 00:04:10 +00:00
|
|
|
|
|
|
|
/*
|
2006-08-01 23:12:11 +00:00
|
|
|
* fetch_stream - gets a stream from {row,col} in the table
|
2006-02-17 00:04:10 +00:00
|
|
|
*
|
|
|
|
* This function is similar to fetch_int, except fetches a
|
|
|
|
* stream instead of an integer.
|
|
|
|
*/
|
2008-01-16 10:11:22 +00:00
|
|
|
UINT (*fetch_stream)( struct tagMSIVIEW *view, UINT row, UINT col, IStream **stm );
|
|
|
|
|
|
|
|
/*
|
|
|
|
* get_row - gets values from a row
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
UINT (*get_row)( struct tagMSIVIEW *view, UINT row, MSIRECORD **rec );
|
2006-02-17 00:04:10 +00:00
|
|
|
|
|
|
|
/*
|
2006-11-28 11:21:39 +00:00
|
|
|
* set_row - sets values in a row as specified by mask
|
2006-02-17 00:04:10 +00:00
|
|
|
*
|
|
|
|
* Similar semantics to fetch_int
|
|
|
|
*/
|
2008-01-16 10:11:22 +00:00
|
|
|
UINT (*set_row)( struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, UINT mask );
|
2006-02-17 00:04:10 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Inserts a new row into the database from the records contents
|
|
|
|
*/
|
2009-05-20 12:59:23 +00:00
|
|
|
UINT (*insert_row)( struct tagMSIVIEW *view, MSIRECORD *record, UINT row, BOOL temporary );
|
2008-01-16 10:11:22 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Deletes a row from the database
|
|
|
|
*/
|
|
|
|
UINT (*delete_row)( struct tagMSIVIEW *view, UINT row );
|
2006-02-17 00:04:10 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* execute - loads the underlying data into memory so it can be read
|
|
|
|
*/
|
2008-01-16 10:11:22 +00:00
|
|
|
UINT (*execute)( struct tagMSIVIEW *view, MSIRECORD *record );
|
2006-02-17 00:04:10 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* close - clears the data read by execute from memory
|
|
|
|
*/
|
2008-01-16 10:11:22 +00:00
|
|
|
UINT (*close)( struct tagMSIVIEW *view );
|
2006-02-17 00:04:10 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* get_dimensions - returns the number of rows or columns in a table.
|
|
|
|
*
|
|
|
|
* The number of rows can only be queried after the execute method
|
|
|
|
* is called. The number of columns can be queried at any time.
|
|
|
|
*/
|
2008-01-16 10:11:22 +00:00
|
|
|
UINT (*get_dimensions)( struct tagMSIVIEW *view, UINT *rows, UINT *cols );
|
2006-02-17 00:04:10 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* get_column_info - returns the name and type of a specific column
|
|
|
|
*
|
2009-11-16 01:13:42 +00:00
|
|
|
* The name and tablename is HeapAlloc'ed by this function and should be
|
|
|
|
* freed by the caller.
|
2006-02-17 00:04:10 +00:00
|
|
|
* The column information can be queried at any time.
|
|
|
|
*/
|
2009-11-16 01:13:42 +00:00
|
|
|
UINT (*get_column_info)( struct tagMSIVIEW *view, UINT n, LPWSTR *name, UINT *type, BOOL *temporary, LPWSTR *tableName);
|
2006-02-17 00:04:10 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* modify - not yet implemented properly
|
|
|
|
*/
|
2008-01-16 10:11:22 +00:00
|
|
|
UINT (*modify)( struct tagMSIVIEW *view, MSIMODIFY eModifyMode, MSIRECORD *record, UINT row );
|
2006-02-17 00:04:10 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* delete - destroys the structure completely
|
|
|
|
*/
|
|
|
|
UINT (*delete)( struct tagMSIVIEW * );
|
|
|
|
|
2006-08-01 23:12:11 +00:00
|
|
|
/*
|
|
|
|
* find_matching_rows - iterates through rows that match a value
|
|
|
|
*
|
2006-10-22 20:23:59 +00:00
|
|
|
* If the column type is a string then a string ID should be passed in.
|
2006-08-01 23:12:11 +00:00
|
|
|
* If the value to be looked up is an integer then no transformation of
|
|
|
|
* the input value is required, except if the column is a string, in which
|
|
|
|
* case a string ID should be passed in.
|
|
|
|
* The handle is an input/output parameter that keeps track of the current
|
|
|
|
* position in the iteration. It must be initialised to zero before the
|
|
|
|
* first call and continued to be passed in to subsequent calls.
|
|
|
|
*/
|
2008-01-16 10:11:22 +00:00
|
|
|
UINT (*find_matching_rows)( struct tagMSIVIEW *view, UINT col, UINT val, UINT *row, MSIITERHANDLE *handle );
|
|
|
|
|
|
|
|
/*
|
|
|
|
* add_ref - increases the reference count of the table
|
|
|
|
*/
|
|
|
|
UINT (*add_ref)( struct tagMSIVIEW *view );
|
|
|
|
|
|
|
|
/*
|
|
|
|
* release - decreases the reference count of the table
|
|
|
|
*/
|
|
|
|
UINT (*release)( struct tagMSIVIEW *view );
|
|
|
|
|
|
|
|
/*
|
|
|
|
* add_column - adds a column to the table
|
|
|
|
*/
|
|
|
|
UINT (*add_column)( struct tagMSIVIEW *view, LPCWSTR table, UINT number, LPCWSTR column, UINT type, BOOL hold );
|
|
|
|
|
|
|
|
/*
|
|
|
|
* remove_column - removes the column represented by table name and column number from the table
|
|
|
|
*/
|
|
|
|
UINT (*remove_column)( struct tagMSIVIEW *view, LPCWSTR table, UINT number );
|
|
|
|
|
|
|
|
/*
|
|
|
|
* sort - orders the table by columns
|
|
|
|
*/
|
|
|
|
UINT (*sort)( struct tagMSIVIEW *view, column_info *columns );
|
2008-12-27 15:10:14 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* drop - drops the table from the database
|
|
|
|
*/
|
|
|
|
UINT (*drop)( struct tagMSIVIEW *view );
|
2006-02-17 00:04:10 +00:00
|
|
|
} MSIVIEWOPS;
|
|
|
|
|
|
|
|
struct tagMSIVIEW
|
|
|
|
{
|
|
|
|
MSIOBJECTHDR hdr;
|
2006-08-01 23:12:11 +00:00
|
|
|
const MSIVIEWOPS *ops;
|
2006-02-17 00:04:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct msi_dialog_tag;
|
|
|
|
typedef struct msi_dialog_tag msi_dialog;
|
|
|
|
|
|
|
|
typedef struct tagMSIPACKAGE
|
|
|
|
{
|
|
|
|
MSIOBJECTHDR hdr;
|
|
|
|
MSIDATABASE *db;
|
2010-05-29 08:55:43 +00:00
|
|
|
struct list patches;
|
2006-02-17 00:04:10 +00:00
|
|
|
struct list components;
|
|
|
|
struct list features;
|
|
|
|
struct list files;
|
|
|
|
struct list tempfiles;
|
|
|
|
struct list folders;
|
|
|
|
LPWSTR ActionFormat;
|
|
|
|
LPWSTR LastAction;
|
|
|
|
|
|
|
|
struct list classes;
|
|
|
|
struct list extensions;
|
|
|
|
struct list progids;
|
|
|
|
struct list mimes;
|
|
|
|
struct list appids;
|
2006-08-30 19:24:26 +00:00
|
|
|
|
2006-02-17 00:04:10 +00:00
|
|
|
struct tagMSISCRIPT *script;
|
|
|
|
|
|
|
|
struct list RunningActions;
|
|
|
|
|
2006-11-28 11:21:39 +00:00
|
|
|
LPWSTR BaseURL;
|
2006-02-17 00:04:10 +00:00
|
|
|
LPWSTR PackagePath;
|
|
|
|
LPWSTR ProductCode;
|
|
|
|
|
|
|
|
UINT CurrentInstallState;
|
|
|
|
msi_dialog *dialog;
|
|
|
|
LPWSTR next_dialog;
|
2006-09-09 17:48:42 +00:00
|
|
|
float center_x;
|
|
|
|
float center_y;
|
2006-08-30 19:24:26 +00:00
|
|
|
|
|
|
|
UINT WordCount;
|
2008-05-17 19:46:01 +00:00
|
|
|
UINT Context;
|
2006-08-30 19:24:26 +00:00
|
|
|
|
2006-02-17 00:04:10 +00:00
|
|
|
struct list subscriptions;
|
2008-01-16 10:11:22 +00:00
|
|
|
|
|
|
|
struct list sourcelist_info;
|
|
|
|
struct list sourcelist_media;
|
|
|
|
|
|
|
|
unsigned char scheduled_action_running : 1;
|
|
|
|
unsigned char commit_action_running : 1;
|
|
|
|
unsigned char rollback_action_running : 1;
|
2009-10-17 21:16:57 +00:00
|
|
|
unsigned char need_reboot : 1;
|
2006-02-17 00:04:10 +00:00
|
|
|
} MSIPACKAGE;
|
|
|
|
|
|
|
|
typedef struct tagMSIPREVIEW
|
|
|
|
{
|
|
|
|
MSIOBJECTHDR hdr;
|
|
|
|
MSIPACKAGE *package;
|
|
|
|
msi_dialog *dialog;
|
|
|
|
} MSIPREVIEW;
|
|
|
|
|
|
|
|
#define MSI_MAX_PROPS 20
|
|
|
|
|
|
|
|
typedef struct tagMSISUMMARYINFO
|
|
|
|
{
|
|
|
|
MSIOBJECTHDR hdr;
|
2006-11-28 11:21:39 +00:00
|
|
|
IStorage *storage;
|
2006-02-17 00:04:10 +00:00
|
|
|
DWORD update_count;
|
|
|
|
PROPVARIANT property[MSI_MAX_PROPS];
|
|
|
|
} MSISUMMARYINFO;
|
|
|
|
|
2006-10-22 20:23:59 +00:00
|
|
|
typedef struct tagMSIFEATURE
|
|
|
|
{
|
|
|
|
struct list entry;
|
|
|
|
LPWSTR Feature;
|
|
|
|
LPWSTR Feature_Parent;
|
|
|
|
LPWSTR Title;
|
|
|
|
LPWSTR Description;
|
|
|
|
INT Display;
|
|
|
|
INT Level;
|
|
|
|
LPWSTR Directory;
|
|
|
|
INT Attributes;
|
|
|
|
INSTALLSTATE Installed;
|
|
|
|
INSTALLSTATE ActionRequest;
|
|
|
|
INSTALLSTATE Action;
|
|
|
|
struct list Children;
|
|
|
|
struct list Components;
|
|
|
|
} MSIFEATURE;
|
|
|
|
|
|
|
|
typedef struct tagMSICOMPONENT
|
|
|
|
{
|
|
|
|
struct list entry;
|
|
|
|
DWORD magic;
|
|
|
|
LPWSTR Component;
|
|
|
|
LPWSTR ComponentId;
|
|
|
|
LPWSTR Directory;
|
|
|
|
INT Attributes;
|
|
|
|
LPWSTR Condition;
|
|
|
|
LPWSTR KeyPath;
|
|
|
|
INSTALLSTATE Installed;
|
|
|
|
INSTALLSTATE ActionRequest;
|
|
|
|
INSTALLSTATE Action;
|
|
|
|
BOOL ForceLocalState;
|
|
|
|
BOOL Enabled;
|
|
|
|
INT Cost;
|
|
|
|
INT RefCount;
|
|
|
|
LPWSTR FullKeypath;
|
|
|
|
LPWSTR AdvertiseString;
|
2008-01-16 10:11:22 +00:00
|
|
|
|
|
|
|
unsigned int anyAbsent:1;
|
|
|
|
unsigned int hasAdvertiseFeature:1;
|
|
|
|
unsigned int hasLocalFeature:1;
|
|
|
|
unsigned int hasSourceFeature:1;
|
2006-10-22 20:23:59 +00:00
|
|
|
} MSICOMPONENT;
|
|
|
|
|
|
|
|
typedef struct tagComponentList
|
|
|
|
{
|
|
|
|
struct list entry;
|
|
|
|
MSICOMPONENT *component;
|
|
|
|
} ComponentList;
|
|
|
|
|
|
|
|
typedef struct tagFeatureList
|
|
|
|
{
|
|
|
|
struct list entry;
|
|
|
|
MSIFEATURE *feature;
|
|
|
|
} FeatureList;
|
|
|
|
|
|
|
|
typedef struct tagMSIFOLDER
|
|
|
|
{
|
|
|
|
struct list entry;
|
|
|
|
LPWSTR Directory;
|
2008-01-16 10:11:22 +00:00
|
|
|
LPWSTR Parent;
|
2006-10-22 20:23:59 +00:00
|
|
|
LPWSTR TargetDefault;
|
|
|
|
LPWSTR SourceLongPath;
|
|
|
|
LPWSTR SourceShortPath;
|
|
|
|
|
|
|
|
LPWSTR ResolvedTarget;
|
|
|
|
LPWSTR ResolvedSource;
|
|
|
|
LPWSTR Property; /* initially set property */
|
|
|
|
INT State;
|
|
|
|
/* 0 = uninitialized */
|
|
|
|
/* 1 = existing */
|
|
|
|
/* 2 = created remove if empty */
|
|
|
|
/* 3 = created persist if empty */
|
|
|
|
INT Cost;
|
|
|
|
INT Space;
|
|
|
|
} MSIFOLDER;
|
|
|
|
|
|
|
|
typedef enum _msi_file_state {
|
|
|
|
msifs_invalid,
|
|
|
|
msifs_missing,
|
|
|
|
msifs_overwrite,
|
|
|
|
msifs_present,
|
|
|
|
msifs_installed,
|
|
|
|
msifs_skipped,
|
|
|
|
} msi_file_state;
|
|
|
|
|
|
|
|
typedef struct tagMSIFILE
|
|
|
|
{
|
|
|
|
struct list entry;
|
|
|
|
LPWSTR File;
|
|
|
|
MSICOMPONENT *Component;
|
|
|
|
LPWSTR FileName;
|
|
|
|
LPWSTR ShortName;
|
|
|
|
LPWSTR LongName;
|
|
|
|
INT FileSize;
|
|
|
|
LPWSTR Version;
|
|
|
|
LPWSTR Language;
|
|
|
|
INT Attributes;
|
|
|
|
INT Sequence;
|
|
|
|
msi_file_state state;
|
|
|
|
LPWSTR TargetPath;
|
|
|
|
BOOL IsCompressed;
|
2008-01-16 10:11:22 +00:00
|
|
|
MSIFILEHASHINFO hash;
|
2010-05-29 08:55:43 +00:00
|
|
|
UINT disk_id;
|
2006-10-22 20:23:59 +00:00
|
|
|
} MSIFILE;
|
|
|
|
|
|
|
|
typedef struct tagMSITEMPFILE
|
|
|
|
{
|
|
|
|
struct list entry;
|
|
|
|
LPWSTR Path;
|
|
|
|
} MSITEMPFILE;
|
|
|
|
|
|
|
|
typedef struct tagMSIAPPID
|
|
|
|
{
|
|
|
|
struct list entry;
|
|
|
|
LPWSTR AppID; /* Primary key */
|
|
|
|
LPWSTR RemoteServerName;
|
|
|
|
LPWSTR LocalServer;
|
|
|
|
LPWSTR ServiceParameters;
|
|
|
|
LPWSTR DllSurrogate;
|
|
|
|
BOOL ActivateAtStorage;
|
|
|
|
BOOL RunAsInteractiveUser;
|
|
|
|
} MSIAPPID;
|
|
|
|
|
|
|
|
typedef struct tagMSIPROGID MSIPROGID;
|
|
|
|
|
|
|
|
typedef struct tagMSICLASS
|
|
|
|
{
|
|
|
|
struct list entry;
|
|
|
|
LPWSTR clsid; /* Primary Key */
|
|
|
|
LPWSTR Context; /* Primary Key */
|
|
|
|
MSICOMPONENT *Component;
|
|
|
|
MSIPROGID *ProgID;
|
|
|
|
LPWSTR ProgIDText;
|
|
|
|
LPWSTR Description;
|
|
|
|
MSIAPPID *AppID;
|
|
|
|
LPWSTR FileTypeMask;
|
|
|
|
LPWSTR IconPath;
|
|
|
|
LPWSTR DefInprocHandler;
|
|
|
|
LPWSTR DefInprocHandler32;
|
|
|
|
LPWSTR Argument;
|
|
|
|
MSIFEATURE *Feature;
|
|
|
|
INT Attributes;
|
|
|
|
/* not in the table, set during installation */
|
|
|
|
BOOL Installed;
|
|
|
|
} MSICLASS;
|
|
|
|
|
|
|
|
typedef struct tagMSIMIME MSIMIME;
|
|
|
|
|
|
|
|
typedef struct tagMSIEXTENSION
|
|
|
|
{
|
|
|
|
struct list entry;
|
|
|
|
LPWSTR Extension; /* Primary Key */
|
|
|
|
MSICOMPONENT *Component;
|
|
|
|
MSIPROGID *ProgID;
|
|
|
|
LPWSTR ProgIDText;
|
|
|
|
MSIMIME *Mime;
|
|
|
|
MSIFEATURE *Feature;
|
|
|
|
/* not in the table, set during installation */
|
|
|
|
BOOL Installed;
|
|
|
|
struct list verbs;
|
|
|
|
} MSIEXTENSION;
|
|
|
|
|
|
|
|
struct tagMSIPROGID
|
|
|
|
{
|
|
|
|
struct list entry;
|
|
|
|
LPWSTR ProgID; /* Primary Key */
|
|
|
|
MSIPROGID *Parent;
|
|
|
|
MSICLASS *Class;
|
|
|
|
LPWSTR Description;
|
|
|
|
LPWSTR IconPath;
|
|
|
|
/* not in the table, set during installation */
|
|
|
|
BOOL InstallMe;
|
|
|
|
MSIPROGID *CurVer;
|
|
|
|
MSIPROGID *VersionInd;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct tagMSIVERB
|
|
|
|
{
|
|
|
|
struct list entry;
|
|
|
|
LPWSTR Verb;
|
|
|
|
INT Sequence;
|
|
|
|
LPWSTR Command;
|
|
|
|
LPWSTR Argument;
|
|
|
|
} MSIVERB;
|
|
|
|
|
|
|
|
struct tagMSIMIME
|
|
|
|
{
|
|
|
|
struct list entry;
|
|
|
|
LPWSTR ContentType; /* Primary Key */
|
|
|
|
MSIEXTENSION *Extension;
|
2010-05-29 08:55:43 +00:00
|
|
|
LPWSTR suffix;
|
2006-10-22 20:23:59 +00:00
|
|
|
LPWSTR clsid;
|
|
|
|
MSICLASS *Class;
|
|
|
|
/* not in the table, set during installation */
|
|
|
|
BOOL InstallMe;
|
|
|
|
};
|
|
|
|
|
|
|
|
enum SCRIPTS {
|
|
|
|
INSTALL_SCRIPT = 0,
|
|
|
|
COMMIT_SCRIPT = 1,
|
|
|
|
ROLLBACK_SCRIPT = 2,
|
|
|
|
TOTAL_SCRIPTS = 3
|
|
|
|
};
|
|
|
|
|
|
|
|
#define SEQUENCE_UI 0x1
|
|
|
|
#define SEQUENCE_EXEC 0x2
|
|
|
|
#define SEQUENCE_INSTALL 0x10
|
|
|
|
|
|
|
|
typedef struct tagMSISCRIPT
|
|
|
|
{
|
|
|
|
LPWSTR *Actions[TOTAL_SCRIPTS];
|
|
|
|
UINT ActionCount[TOTAL_SCRIPTS];
|
|
|
|
BOOL ExecuteSequenceRun;
|
|
|
|
BOOL CurrentlyScripting;
|
|
|
|
UINT InWhatSequence;
|
|
|
|
LPWSTR *UniqueActions;
|
|
|
|
UINT UniqueActionsCount;
|
|
|
|
} MSISCRIPT;
|
|
|
|
|
2006-02-17 00:04:10 +00:00
|
|
|
#define MSIHANDLETYPE_ANY 0
|
|
|
|
#define MSIHANDLETYPE_DATABASE 1
|
|
|
|
#define MSIHANDLETYPE_SUMMARYINFO 2
|
|
|
|
#define MSIHANDLETYPE_VIEW 3
|
|
|
|
#define MSIHANDLETYPE_RECORD 4
|
|
|
|
#define MSIHANDLETYPE_PACKAGE 5
|
|
|
|
#define MSIHANDLETYPE_PREVIEW 6
|
|
|
|
|
2006-08-30 19:24:26 +00:00
|
|
|
#define MSI_MAJORVERSION 3
|
|
|
|
#define MSI_MINORVERSION 1
|
|
|
|
#define MSI_BUILDNUMBER 4000
|
2006-02-17 00:04:10 +00:00
|
|
|
|
|
|
|
#define GUID_SIZE 39
|
2008-04-04 13:43:40 +00:00
|
|
|
#define SQUISH_GUID_SIZE 33
|
2006-02-17 00:04:10 +00:00
|
|
|
|
|
|
|
#define MSIHANDLE_MAGIC 0x4d434923
|
|
|
|
|
|
|
|
DEFINE_GUID(CLSID_IMsiServer, 0x000C101C,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);
|
|
|
|
DEFINE_GUID(CLSID_IMsiServerX1, 0x000C103E,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);
|
|
|
|
DEFINE_GUID(CLSID_IMsiServerX2, 0x000C1090,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);
|
|
|
|
DEFINE_GUID(CLSID_IMsiServerX3, 0x000C1094,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);
|
|
|
|
|
|
|
|
DEFINE_GUID(CLSID_IMsiServerMessage, 0x000C101D,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);
|
|
|
|
|
2008-01-16 10:11:22 +00:00
|
|
|
DEFINE_GUID(CLSID_IWineMsiRemoteCustomAction,0xBA26E6FA,0x4F27,0x4f56,0x95,0x3A,0x3F,0x90,0x27,0x20,0x18,0xAA);
|
|
|
|
DEFINE_GUID(CLSID_IWineMsiRemotePackage,0x902b3592,0x9d08,0x4dfd,0xa5,0x93,0xd0,0x7c,0x52,0x54,0x64,0x21);
|
|
|
|
|
2009-08-08 11:55:51 +00:00
|
|
|
DEFINE_GUID(CLSID_MsiTransform, 0x000c1082,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);
|
|
|
|
DEFINE_GUID(CLSID_MsiDatabase, 0x000c1084,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);
|
|
|
|
DEFINE_GUID(CLSID_MsiPatch, 0x000c1086,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);
|
|
|
|
|
2006-02-17 00:04:10 +00:00
|
|
|
/* handle unicode/ascii output in the Msi* API functions */
|
|
|
|
typedef struct {
|
|
|
|
BOOL unicode;
|
|
|
|
union {
|
|
|
|
LPSTR a;
|
|
|
|
LPWSTR w;
|
|
|
|
} str;
|
|
|
|
} awstring;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
BOOL unicode;
|
|
|
|
union {
|
|
|
|
LPCSTR a;
|
|
|
|
LPCWSTR w;
|
|
|
|
} str;
|
|
|
|
} awcstring;
|
|
|
|
|
|
|
|
UINT msi_strcpy_to_awstring( LPCWSTR str, awstring *awbuf, DWORD *sz );
|
|
|
|
|
2008-01-16 10:11:22 +00:00
|
|
|
/* msi server interface */
|
|
|
|
extern ITypeLib *get_msi_typelib( LPWSTR *path );
|
|
|
|
extern HRESULT create_msi_custom_remote( IUnknown *pOuter, LPVOID *ppObj );
|
|
|
|
extern HRESULT create_msi_remote_package( IUnknown *pOuter, LPVOID *ppObj );
|
|
|
|
extern HRESULT create_msi_remote_database( IUnknown *pOuter, LPVOID *ppObj );
|
|
|
|
extern IUnknown *msi_get_remote(MSIHANDLE handle);
|
|
|
|
|
2006-02-17 00:04:10 +00:00
|
|
|
/* handle functions */
|
|
|
|
extern void *msihandle2msiinfo(MSIHANDLE handle, UINT type);
|
|
|
|
extern MSIHANDLE alloc_msihandle( MSIOBJECTHDR * );
|
2008-01-16 10:11:22 +00:00
|
|
|
extern MSIHANDLE alloc_msi_remote_handle( IUnknown *unk );
|
2006-02-17 00:04:10 +00:00
|
|
|
extern void *alloc_msiobject(UINT type, UINT size, msihandledestructor destroy );
|
|
|
|
extern void msiobj_addref(MSIOBJECTHDR *);
|
|
|
|
extern int msiobj_release(MSIOBJECTHDR *);
|
|
|
|
extern void msiobj_lock(MSIOBJECTHDR *);
|
|
|
|
extern void msiobj_unlock(MSIOBJECTHDR *);
|
2006-08-30 19:24:26 +00:00
|
|
|
extern void msi_free_handle_table(void);
|
2006-02-17 00:04:10 +00:00
|
|
|
|
|
|
|
extern void free_cached_tables( MSIDATABASE *db );
|
|
|
|
extern UINT MSI_CommitTables( MSIDATABASE *db );
|
|
|
|
|
|
|
|
|
|
|
|
/* string table functions */
|
2008-01-16 10:11:22 +00:00
|
|
|
enum StringPersistence
|
|
|
|
{
|
|
|
|
StringPersistent = 0,
|
|
|
|
StringNonPersistent = 1
|
|
|
|
};
|
|
|
|
|
2010-05-29 08:55:43 +00:00
|
|
|
extern BOOL msi_addstringW( string_table *st, const WCHAR *data, int len, USHORT refcount, enum StringPersistence persistence );
|
2008-01-16 10:11:22 +00:00
|
|
|
extern UINT msi_string2idW( const string_table *st, LPCWSTR buffer, UINT *id );
|
2006-02-17 00:04:10 +00:00
|
|
|
extern VOID msi_destroy_stringtable( string_table *st );
|
2008-01-16 10:11:22 +00:00
|
|
|
extern const WCHAR *msi_string_lookup_id( const string_table *st, UINT id );
|
|
|
|
extern HRESULT msi_init_string_table( IStorage *stg );
|
|
|
|
extern string_table *msi_load_string_table( IStorage *stg, UINT *bytes_per_strref );
|
|
|
|
extern UINT msi_save_string_table( const string_table *st, IStorage *storage );
|
2006-02-17 00:04:10 +00:00
|
|
|
|
2008-01-16 10:11:22 +00:00
|
|
|
extern BOOL TABLE_Exists( MSIDATABASE *db, LPCWSTR name );
|
2006-09-18 16:45:21 +00:00
|
|
|
extern MSICONDITION MSI_DatabaseIsTablePersistent( MSIDATABASE *db, LPCWSTR table );
|
2006-02-17 00:04:10 +00:00
|
|
|
|
2008-01-16 10:11:22 +00:00
|
|
|
extern UINT read_stream_data( IStorage *stg, LPCWSTR stname, BOOL table,
|
|
|
|
BYTE **pdata, UINT *psz );
|
|
|
|
extern UINT write_stream_data( IStorage *stg, LPCWSTR stname,
|
|
|
|
LPCVOID data, UINT sz, BOOL bTable );
|
2006-02-17 00:04:10 +00:00
|
|
|
|
|
|
|
/* transform functions */
|
|
|
|
extern UINT msi_table_apply_transform( MSIDATABASE *db, IStorage *stg );
|
2006-10-22 20:23:59 +00:00
|
|
|
extern UINT MSI_DatabaseApplyTransformW( MSIDATABASE *db,
|
2006-02-17 00:04:10 +00:00
|
|
|
LPCWSTR szTransformFile, int iErrorCond );
|
2006-11-28 11:21:39 +00:00
|
|
|
extern void append_storage_to_db( MSIDATABASE *db, IStorage *stg );
|
2006-02-17 00:04:10 +00:00
|
|
|
|
2010-05-29 08:55:43 +00:00
|
|
|
/* patch functions */
|
2009-10-17 21:16:57 +00:00
|
|
|
extern UINT msi_check_patch_applicable( MSIPACKAGE *package, MSISUMMARYINFO *si );
|
2010-05-29 08:55:43 +00:00
|
|
|
extern UINT msi_parse_patch_summary( MSISUMMARYINFO *si, MSIPATCHINFO **patch );
|
|
|
|
extern UINT msi_apply_patch_db( MSIPACKAGE *package, MSIDATABASE *patch_db, MSIPATCHINFO *patch );
|
2009-10-17 21:16:57 +00:00
|
|
|
|
2006-02-17 00:04:10 +00:00
|
|
|
/* action internals */
|
|
|
|
extern UINT MSI_InstallPackage( MSIPACKAGE *, LPCWSTR, LPCWSTR );
|
|
|
|
extern UINT ACTION_DialogBox( MSIPACKAGE*, LPCWSTR);
|
2008-01-16 10:11:22 +00:00
|
|
|
extern UINT ACTION_ForceReboot(MSIPACKAGE *package);
|
2006-02-17 00:04:10 +00:00
|
|
|
extern UINT MSI_Sequence( MSIPACKAGE *package, LPCWSTR szTable, INT iSequenceMode );
|
2006-08-01 23:12:11 +00:00
|
|
|
extern UINT MSI_SetFeatureStates( MSIPACKAGE *package );
|
2008-12-27 15:10:14 +00:00
|
|
|
extern UINT msi_parse_command_line( MSIPACKAGE *package, LPCWSTR szCommandLine,
|
|
|
|
BOOL preserve_case );
|
2006-02-17 00:04:10 +00:00
|
|
|
|
|
|
|
/* record internals */
|
2009-12-22 09:28:03 +00:00
|
|
|
extern void MSI_CloseRecord( MSIOBJECTHDR * );
|
2008-01-16 10:11:22 +00:00
|
|
|
extern UINT MSI_RecordSetIStream( MSIRECORD *, UINT, IStream *);
|
|
|
|
extern UINT MSI_RecordGetIStream( MSIRECORD *, UINT, IStream **);
|
|
|
|
extern const WCHAR *MSI_RecordGetString( const MSIRECORD *, UINT );
|
|
|
|
extern MSIRECORD *MSI_CreateRecord( UINT );
|
|
|
|
extern UINT MSI_RecordSetInteger( MSIRECORD *, UINT, int );
|
|
|
|
extern UINT MSI_RecordSetStringW( MSIRECORD *, UINT, LPCWSTR );
|
|
|
|
extern BOOL MSI_RecordIsNull( MSIRECORD *, UINT );
|
|
|
|
extern UINT MSI_RecordGetStringW( MSIRECORD * , UINT, LPWSTR, LPDWORD);
|
|
|
|
extern UINT MSI_RecordGetStringA( MSIRECORD *, UINT, LPSTR, LPDWORD);
|
|
|
|
extern int MSI_RecordGetInteger( MSIRECORD *, UINT );
|
|
|
|
extern UINT MSI_RecordReadStream( MSIRECORD *, UINT, char *, LPDWORD);
|
2009-06-06 15:59:47 +00:00
|
|
|
extern UINT MSI_RecordSetStream(MSIRECORD *, UINT, IStream *);
|
2008-01-16 10:11:22 +00:00
|
|
|
extern UINT MSI_RecordGetFieldCount( const MSIRECORD *rec );
|
|
|
|
extern UINT MSI_RecordStreamToFile( MSIRECORD *, UINT, LPCWSTR );
|
2009-06-06 15:59:47 +00:00
|
|
|
extern UINT MSI_RecordSetStreamFromFileW( MSIRECORD *, UINT, LPCWSTR );
|
2008-01-16 10:11:22 +00:00
|
|
|
extern UINT MSI_RecordCopyField( MSIRECORD *, UINT, MSIRECORD *, UINT );
|
2008-12-27 15:10:14 +00:00
|
|
|
extern MSIRECORD *MSI_CloneRecord( MSIRECORD * );
|
|
|
|
extern BOOL MSI_RecordsAreEqual( MSIRECORD *, MSIRECORD * );
|
2006-02-17 00:04:10 +00:00
|
|
|
|
|
|
|
/* stream internals */
|
|
|
|
extern void enum_stream_names( IStorage *stg );
|
2009-12-22 09:28:03 +00:00
|
|
|
extern LPWSTR encode_streamname(BOOL bTable, LPCWSTR in);
|
2008-01-16 10:11:22 +00:00
|
|
|
extern BOOL decode_streamname(LPCWSTR in, LPWSTR out);
|
2006-02-17 00:04:10 +00:00
|
|
|
|
|
|
|
/* database internals */
|
2009-12-22 09:28:03 +00:00
|
|
|
extern UINT db_get_raw_stream( MSIDATABASE *, LPCWSTR, IStream ** );
|
2010-05-29 08:55:43 +00:00
|
|
|
void db_destroy_stream( MSIDATABASE *, LPCWSTR );
|
2006-02-17 00:04:10 +00:00
|
|
|
extern UINT MSI_OpenDatabaseW( LPCWSTR, LPCWSTR, MSIDATABASE ** );
|
|
|
|
extern UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY ** );
|
|
|
|
extern UINT MSI_OpenQuery( MSIDATABASE *, MSIQUERY **, LPCWSTR, ... );
|
|
|
|
typedef UINT (*record_func)( MSIRECORD *, LPVOID );
|
2008-01-16 10:11:22 +00:00
|
|
|
extern UINT MSI_IterateRecords( MSIQUERY *, LPDWORD, record_func, LPVOID );
|
2006-02-17 00:04:10 +00:00
|
|
|
extern MSIRECORD *MSI_QueryGetRecord( MSIDATABASE *db, LPCWSTR query, ... );
|
|
|
|
extern UINT MSI_DatabaseGetPrimaryKeys( MSIDATABASE *, LPCWSTR, MSIRECORD ** );
|
|
|
|
|
|
|
|
/* view internals */
|
|
|
|
extern UINT MSI_ViewExecute( MSIQUERY*, MSIRECORD * );
|
|
|
|
extern UINT MSI_ViewFetch( MSIQUERY*, MSIRECORD ** );
|
|
|
|
extern UINT MSI_ViewClose( MSIQUERY* );
|
2006-09-09 17:48:42 +00:00
|
|
|
extern UINT MSI_ViewGetColumnInfo(MSIQUERY *, MSICOLINFO, MSIRECORD **);
|
2008-01-16 10:11:22 +00:00
|
|
|
extern UINT MSI_ViewModify( MSIQUERY *, MSIMODIFY, MSIRECORD * );
|
2009-11-16 01:13:42 +00:00
|
|
|
extern UINT VIEW_find_column( MSIVIEW *, LPCWSTR, LPCWSTR, UINT * );
|
2008-01-16 10:11:22 +00:00
|
|
|
extern UINT msi_view_get_row(MSIDATABASE *, MSIVIEW *, UINT, MSIRECORD **);
|
2006-02-17 00:04:10 +00:00
|
|
|
|
2006-08-01 23:12:11 +00:00
|
|
|
/* install internals */
|
|
|
|
extern UINT MSI_SetInstallLevel( MSIPACKAGE *package, int iInstallLevel );
|
|
|
|
|
2006-02-17 00:04:10 +00:00
|
|
|
/* package internals */
|
2008-01-16 10:11:22 +00:00
|
|
|
extern MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *, LPCWSTR );
|
|
|
|
extern UINT MSI_OpenPackageW( LPCWSTR szPackage, MSIPACKAGE **pPackage );
|
2006-02-17 00:04:10 +00:00
|
|
|
extern UINT MSI_SetTargetPathW( MSIPACKAGE *, LPCWSTR, LPCWSTR );
|
|
|
|
extern INT MSI_ProcessMessage( MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD * );
|
|
|
|
extern MSICONDITION MSI_EvaluateConditionW( MSIPACKAGE *, LPCWSTR );
|
2006-08-30 18:08:21 +00:00
|
|
|
extern UINT MSI_GetComponentStateW( MSIPACKAGE *, LPCWSTR, INSTALLSTATE *, INSTALLSTATE * );
|
|
|
|
extern UINT MSI_GetFeatureStateW( MSIPACKAGE *, LPCWSTR, INSTALLSTATE *, INSTALLSTATE * );
|
2006-02-17 00:04:10 +00:00
|
|
|
extern UINT WINAPI MSI_SetFeatureStateW(MSIPACKAGE*, LPCWSTR, INSTALLSTATE );
|
2009-12-22 09:28:03 +00:00
|
|
|
extern UINT msi_download_file( LPCWSTR szUrl, LPWSTR filename );
|
2008-01-16 10:11:22 +00:00
|
|
|
extern UINT msi_package_add_info(MSIPACKAGE *, DWORD, DWORD, LPCWSTR, LPWSTR);
|
|
|
|
extern UINT msi_package_add_media_disk(MSIPACKAGE *, DWORD, DWORD, DWORD, LPWSTR, LPWSTR);
|
|
|
|
extern UINT msi_clone_properties(MSIPACKAGE *);
|
2010-05-29 08:55:43 +00:00
|
|
|
extern UINT msi_set_context(MSIPACKAGE *);
|
Finish the Wine sync. These components are not just rc file changes
atl, comctl32, comdlg32, dwmapi, fusion, gdiplus, jscript, mpr, mshtml, msi, msimtf, msxml3, ole32, oleaut32, riched20, shdocvw, shlwapi, urlmon, usp10, version and windowscodecs
Seems to build and boot. /me hides
svn path=/trunk/; revision=48273
2010-07-26 02:26:04 +00:00
|
|
|
extern void msi_adjust_allusers_property(MSIPACKAGE *);
|
2009-11-16 01:13:42 +00:00
|
|
|
extern UINT MSI_GetFeatureCost(MSIPACKAGE *, MSIFEATURE *, MSICOSTTREE, INSTALLSTATE, LPINT);
|
2006-02-17 00:04:10 +00:00
|
|
|
|
|
|
|
/* for deformating */
|
2008-01-16 10:11:22 +00:00
|
|
|
extern UINT MSI_FormatRecordW( MSIPACKAGE *, MSIRECORD *, LPWSTR, LPDWORD );
|
2006-10-22 20:23:59 +00:00
|
|
|
|
2006-02-17 00:04:10 +00:00
|
|
|
/* registry data encoding/decoding functions */
|
|
|
|
extern BOOL unsquash_guid(LPCWSTR in, LPWSTR out);
|
|
|
|
extern BOOL squash_guid(LPCWSTR in, LPWSTR out);
|
|
|
|
extern BOOL encode_base85_guid(GUID *,LPWSTR);
|
|
|
|
extern BOOL decode_base85_guid(LPCWSTR,GUID*);
|
|
|
|
extern UINT MSIREG_OpenUninstallKey(LPCWSTR szProduct, HKEY* key, BOOL create);
|
2008-01-16 10:11:22 +00:00
|
|
|
extern UINT MSIREG_DeleteUninstallKey(LPCWSTR szProduct);
|
2009-05-20 12:59:23 +00:00
|
|
|
extern UINT MSIREG_OpenProductKey(LPCWSTR szProduct, LPCWSTR szUserSid,
|
|
|
|
MSIINSTALLCONTEXT context, HKEY* key, BOOL create);
|
2008-12-27 15:10:14 +00:00
|
|
|
extern UINT MSIREG_OpenFeaturesKey(LPCWSTR szProduct, MSIINSTALLCONTEXT context,
|
|
|
|
HKEY *key, BOOL create);
|
2008-01-16 10:11:22 +00:00
|
|
|
extern UINT MSIREG_OpenUserPatchesKey(LPCWSTR szPatch, HKEY* key, BOOL create);
|
2008-12-27 15:10:14 +00:00
|
|
|
UINT MSIREG_OpenUserDataFeaturesKey(LPCWSTR szProduct, MSIINSTALLCONTEXT context,
|
|
|
|
HKEY *key, BOOL create);
|
2006-02-17 00:04:10 +00:00
|
|
|
extern UINT MSIREG_OpenUserComponentsKey(LPCWSTR szComponent, HKEY* key, BOOL create);
|
2008-12-27 15:10:14 +00:00
|
|
|
extern UINT MSIREG_OpenUserDataComponentKey(LPCWSTR szComponent, LPCWSTR szUserSid,
|
|
|
|
HKEY *key, BOOL create);
|
2008-01-16 10:11:22 +00:00
|
|
|
extern UINT MSIREG_OpenPatchesKey(LPCWSTR szPatch, HKEY* key, BOOL create);
|
2008-12-27 15:10:14 +00:00
|
|
|
extern UINT MSIREG_OpenUserDataProductKey(LPCWSTR szProduct, MSIINSTALLCONTEXT dwContext,
|
|
|
|
LPCWSTR szUserSid, HKEY *key, BOOL create);
|
|
|
|
extern UINT MSIREG_OpenUserDataPatchKey(LPCWSTR szPatch, MSIINSTALLCONTEXT dwContext,
|
|
|
|
HKEY *key, BOOL create);
|
2010-05-29 08:55:43 +00:00
|
|
|
extern UINT MSIREG_OpenUserDataProductPatchesKey(LPCWSTR product, MSIINSTALLCONTEXT context,
|
|
|
|
HKEY *key, BOOL create);
|
2008-12-27 15:10:14 +00:00
|
|
|
extern UINT MSIREG_OpenInstallProps(LPCWSTR szProduct, MSIINSTALLCONTEXT dwContext,
|
|
|
|
LPCWSTR szUserSid, HKEY *key, BOOL create);
|
2006-02-17 00:04:10 +00:00
|
|
|
extern UINT MSIREG_OpenUpgradeCodesKey(LPCWSTR szProduct, HKEY* key, BOOL create);
|
|
|
|
extern UINT MSIREG_OpenUserUpgradeCodesKey(LPCWSTR szProduct, HKEY* key, BOOL create);
|
2008-01-16 10:11:22 +00:00
|
|
|
extern UINT MSIREG_DeleteProductKey(LPCWSTR szProduct);
|
|
|
|
extern UINT MSIREG_DeleteUserProductKey(LPCWSTR szProduct);
|
2010-05-29 08:55:43 +00:00
|
|
|
extern UINT MSIREG_DeleteUserDataPatchKey(LPCWSTR patch, MSIINSTALLCONTEXT context);
|
2008-01-16 10:11:22 +00:00
|
|
|
extern UINT MSIREG_DeleteUserDataProductKey(LPCWSTR szProduct);
|
|
|
|
extern UINT MSIREG_DeleteUserFeaturesKey(LPCWSTR szProduct);
|
2008-12-27 15:10:14 +00:00
|
|
|
extern UINT MSIREG_DeleteUserDataComponentKey(LPCWSTR szComponent, LPCWSTR szUserSid);
|
2008-07-08 20:52:29 +00:00
|
|
|
extern UINT MSIREG_DeleteUserUpgradeCodesKey(LPCWSTR szUpgradeCode);
|
|
|
|
extern UINT MSIREG_OpenClassesUpgradeCodesKey(LPCWSTR szUpgradeCode, HKEY* key, BOOL create);
|
2008-12-27 15:10:14 +00:00
|
|
|
extern UINT MSIREG_DeleteLocalClassesProductKey(LPCWSTR szProductCode);
|
|
|
|
extern UINT MSIREG_DeleteLocalClassesFeaturesKey(LPCWSTR szProductCode);
|
2006-02-17 00:04:10 +00:00
|
|
|
|
2006-08-01 23:12:11 +00:00
|
|
|
extern LPWSTR msi_reg_get_val_str( HKEY hkey, LPCWSTR name );
|
|
|
|
extern BOOL msi_reg_get_val_dword( HKEY hkey, LPCWSTR name, DWORD *val);
|
|
|
|
|
|
|
|
extern DWORD msi_version_str_to_dword(LPCWSTR p);
|
Sync aclui, advapi32, atl, authz, kernel32, msi, oledlg, powrprof, qmgr, riched20, samlib to Wine 1.2rc5
Update some psdk Headers to get some more synched winetests build
svn path=/trunk/; revision=47930
2010-07-03 12:42:55 +00:00
|
|
|
extern void msi_parse_version_string(LPCWSTR, PDWORD, PDWORD);
|
|
|
|
extern VS_FIXEDFILEINFO *msi_get_disk_file_version(LPCWSTR);
|
|
|
|
extern int msi_compare_file_versions(VS_FIXEDFILEINFO *, const WCHAR *);
|
|
|
|
|
2006-08-01 23:12:11 +00:00
|
|
|
|
2006-02-17 00:04:10 +00:00
|
|
|
extern LONG msi_reg_set_val_str( HKEY hkey, LPCWSTR name, LPCWSTR value );
|
|
|
|
extern LONG msi_reg_set_val_multi_str( HKEY hkey, LPCWSTR name, LPCWSTR value );
|
|
|
|
extern LONG msi_reg_set_val_dword( HKEY hkey, LPCWSTR name, DWORD val );
|
2006-08-01 23:12:11 +00:00
|
|
|
extern LONG msi_reg_set_subkey_val( HKEY hkey, LPCWSTR path, LPCWSTR name, LPCWSTR val );
|
2006-02-17 00:04:10 +00:00
|
|
|
|
|
|
|
/* msi dialog interface */
|
|
|
|
typedef UINT (*msi_dialog_event_handler)( MSIPACKAGE*, LPCWSTR, LPCWSTR, msi_dialog* );
|
2006-10-22 20:23:59 +00:00
|
|
|
extern msi_dialog *msi_dialog_create( MSIPACKAGE*, LPCWSTR, msi_dialog*, msi_dialog_event_handler );
|
2006-02-17 00:04:10 +00:00
|
|
|
extern UINT msi_dialog_run_message_loop( msi_dialog* );
|
|
|
|
extern void msi_dialog_end_dialog( msi_dialog* );
|
|
|
|
extern void msi_dialog_check_messages( HANDLE );
|
|
|
|
extern void msi_dialog_do_preview( msi_dialog* );
|
|
|
|
extern void msi_dialog_destroy( msi_dialog* );
|
|
|
|
extern void msi_dialog_unregister_class( void );
|
|
|
|
extern void msi_dialog_handle_event( msi_dialog*, LPCWSTR, LPCWSTR, MSIRECORD * );
|
|
|
|
extern UINT msi_dialog_reset( msi_dialog *dialog );
|
2006-08-30 19:24:26 +00:00
|
|
|
extern UINT msi_dialog_directorylist_up( msi_dialog *dialog );
|
2006-10-22 20:23:59 +00:00
|
|
|
extern msi_dialog *msi_dialog_get_parent( msi_dialog *dialog );
|
|
|
|
extern LPWSTR msi_dialog_get_name( msi_dialog *dialog );
|
2006-11-28 11:21:39 +00:00
|
|
|
extern UINT msi_spawn_error_dialog( MSIPACKAGE*, LPWSTR, LPWSTR );
|
2006-02-17 00:04:10 +00:00
|
|
|
|
|
|
|
/* summary information */
|
2006-11-28 11:21:39 +00:00
|
|
|
extern MSISUMMARYINFO *MSI_GetSummaryInformationW( IStorage *stg, UINT uiUpdateCount );
|
2006-02-17 00:04:10 +00:00
|
|
|
extern LPWSTR msi_suminfo_dup_string( MSISUMMARYINFO *si, UINT uiProperty );
|
2006-11-28 11:21:39 +00:00
|
|
|
extern LPWSTR msi_get_suminfo_product( IStorage *stg );
|
2009-05-20 12:59:23 +00:00
|
|
|
extern UINT msi_add_suminfo( MSIDATABASE *db, LPWSTR **records, int num_records, int num_columns );
|
2006-02-17 00:04:10 +00:00
|
|
|
|
|
|
|
/* undocumented functions */
|
|
|
|
UINT WINAPI MsiCreateAndVerifyInstallerDirectory( DWORD );
|
2008-01-16 10:11:22 +00:00
|
|
|
UINT WINAPI MsiDecomposeDescriptorW( LPCWSTR, LPWSTR, LPWSTR, LPWSTR, LPDWORD );
|
|
|
|
UINT WINAPI MsiDecomposeDescriptorA( LPCSTR, LPSTR, LPSTR, LPSTR, LPDWORD );
|
2006-02-17 00:04:10 +00:00
|
|
|
LANGID WINAPI MsiLoadStringW( MSIHANDLE, UINT, LPWSTR, int, LANGID );
|
|
|
|
LANGID WINAPI MsiLoadStringA( MSIHANDLE, UINT, LPSTR, int, LANGID );
|
|
|
|
|
|
|
|
/* UI globals */
|
|
|
|
extern INSTALLUILEVEL gUILevel;
|
|
|
|
extern HWND gUIhwnd;
|
|
|
|
extern INSTALLUI_HANDLERA gUIHandlerA;
|
|
|
|
extern INSTALLUI_HANDLERW gUIHandlerW;
|
2009-11-16 01:13:42 +00:00
|
|
|
extern INSTALLUI_HANDLER_RECORD gUIHandlerRecord;
|
2006-02-17 00:04:10 +00:00
|
|
|
extern DWORD gUIFilter;
|
|
|
|
extern LPVOID gUIContext;
|
|
|
|
extern WCHAR gszLogFile[MAX_PATH];
|
2006-08-01 23:12:11 +00:00
|
|
|
extern HINSTANCE msi_hInstance;
|
2006-02-17 00:04:10 +00:00
|
|
|
|
2006-10-22 20:23:59 +00:00
|
|
|
/* action related functions */
|
Finish the Wine sync. These components are not just rc file changes
atl, comctl32, comdlg32, dwmapi, fusion, gdiplus, jscript, mpr, mshtml, msi, msimtf, msxml3, ole32, oleaut32, riched20, shdocvw, shlwapi, urlmon, usp10, version and windowscodecs
Seems to build and boot. /me hides
svn path=/trunk/; revision=48273
2010-07-26 02:26:04 +00:00
|
|
|
extern UINT ACTION_PerformAction(MSIPACKAGE *package, const WCHAR *action, UINT script);
|
2008-01-16 10:11:22 +00:00
|
|
|
extern UINT ACTION_PerformUIAction(MSIPACKAGE *package, const WCHAR *action, UINT script);
|
|
|
|
extern void ACTION_FinishCustomActions( const MSIPACKAGE* package);
|
|
|
|
extern UINT ACTION_CustomAction(MSIPACKAGE *package,const WCHAR *action, UINT script, BOOL execute);
|
2006-10-22 20:23:59 +00:00
|
|
|
|
2008-12-27 15:10:14 +00:00
|
|
|
static inline void msi_feature_set_state(MSIPACKAGE *package,
|
|
|
|
MSIFEATURE *feature,
|
|
|
|
INSTALLSTATE state)
|
2006-11-28 11:21:39 +00:00
|
|
|
{
|
2008-12-27 15:10:14 +00:00
|
|
|
if (!package->ProductCode)
|
|
|
|
{
|
|
|
|
feature->ActionRequest = state;
|
|
|
|
feature->Action = state;
|
|
|
|
}
|
|
|
|
else if (state == INSTALLSTATE_ABSENT)
|
|
|
|
{
|
|
|
|
switch (feature->Installed)
|
|
|
|
{
|
|
|
|
case INSTALLSTATE_ABSENT:
|
|
|
|
feature->ActionRequest = INSTALLSTATE_UNKNOWN;
|
|
|
|
feature->Action = INSTALLSTATE_UNKNOWN;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
feature->ActionRequest = state;
|
|
|
|
feature->Action = state;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (state == INSTALLSTATE_SOURCE)
|
|
|
|
{
|
|
|
|
switch (feature->Installed)
|
|
|
|
{
|
|
|
|
case INSTALLSTATE_ABSENT:
|
|
|
|
case INSTALLSTATE_SOURCE:
|
|
|
|
feature->ActionRequest = state;
|
|
|
|
feature->Action = state;
|
|
|
|
break;
|
|
|
|
case INSTALLSTATE_LOCAL:
|
|
|
|
feature->ActionRequest = INSTALLSTATE_LOCAL;
|
|
|
|
feature->Action = INSTALLSTATE_LOCAL;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
feature->ActionRequest = INSTALLSTATE_UNKNOWN;
|
|
|
|
feature->Action = INSTALLSTATE_UNKNOWN;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
feature->ActionRequest = state;
|
|
|
|
feature->Action = state;
|
|
|
|
}
|
2006-11-28 11:21:39 +00:00
|
|
|
}
|
|
|
|
|
2008-12-27 15:10:14 +00:00
|
|
|
static inline void msi_component_set_state(MSIPACKAGE *package,
|
|
|
|
MSICOMPONENT *comp,
|
|
|
|
INSTALLSTATE state)
|
2006-11-28 11:21:39 +00:00
|
|
|
{
|
2008-12-27 15:10:14 +00:00
|
|
|
if (!package->ProductCode)
|
|
|
|
{
|
|
|
|
comp->ActionRequest = state;
|
|
|
|
comp->Action = state;
|
|
|
|
}
|
|
|
|
else if (state == INSTALLSTATE_ABSENT)
|
|
|
|
{
|
|
|
|
switch (comp->Installed)
|
|
|
|
{
|
|
|
|
case INSTALLSTATE_LOCAL:
|
|
|
|
case INSTALLSTATE_SOURCE:
|
|
|
|
case INSTALLSTATE_DEFAULT:
|
|
|
|
comp->ActionRequest = state;
|
|
|
|
comp->Action = state;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
comp->ActionRequest = INSTALLSTATE_UNKNOWN;
|
|
|
|
comp->Action = INSTALLSTATE_UNKNOWN;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (state == INSTALLSTATE_SOURCE)
|
|
|
|
{
|
|
|
|
if (comp->Installed == INSTALLSTATE_ABSENT ||
|
|
|
|
(comp->Installed == INSTALLSTATE_SOURCE && comp->hasLocalFeature))
|
|
|
|
{
|
|
|
|
comp->ActionRequest = state;
|
|
|
|
comp->Action = state;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
comp->ActionRequest = INSTALLSTATE_UNKNOWN;
|
|
|
|
comp->Action = INSTALLSTATE_UNKNOWN;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
comp->ActionRequest = state;
|
|
|
|
comp->Action = state;
|
|
|
|
}
|
2006-11-28 11:21:39 +00:00
|
|
|
}
|
|
|
|
|
2006-10-22 20:23:59 +00:00
|
|
|
/* actions in other modules */
|
|
|
|
extern UINT ACTION_AppSearch(MSIPACKAGE *package);
|
2008-01-16 10:11:22 +00:00
|
|
|
extern UINT ACTION_CCPSearch(MSIPACKAGE *package);
|
2006-10-22 20:23:59 +00:00
|
|
|
extern UINT ACTION_FindRelatedProducts(MSIPACKAGE *package);
|
|
|
|
extern UINT ACTION_InstallFiles(MSIPACKAGE *package);
|
|
|
|
extern UINT ACTION_RemoveFiles(MSIPACKAGE *package);
|
2010-03-06 09:05:09 +00:00
|
|
|
extern UINT ACTION_MoveFiles(MSIPACKAGE *package);
|
2006-10-22 20:23:59 +00:00
|
|
|
extern UINT ACTION_DuplicateFiles(MSIPACKAGE *package);
|
2010-03-06 09:05:09 +00:00
|
|
|
extern UINT ACTION_RemoveDuplicateFiles(MSIPACKAGE *package);
|
2006-10-22 20:23:59 +00:00
|
|
|
extern UINT ACTION_RegisterClassInfo(MSIPACKAGE *package);
|
|
|
|
extern UINT ACTION_RegisterProgIdInfo(MSIPACKAGE *package);
|
|
|
|
extern UINT ACTION_RegisterExtensionInfo(MSIPACKAGE *package);
|
|
|
|
extern UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package);
|
|
|
|
extern UINT ACTION_RegisterFonts(MSIPACKAGE *package);
|
2010-05-29 08:55:43 +00:00
|
|
|
extern UINT ACTION_UnregisterClassInfo(MSIPACKAGE *package);
|
|
|
|
extern UINT ACTION_UnregisterExtensionInfo(MSIPACKAGE *package);
|
2010-03-01 12:01:30 +00:00
|
|
|
extern UINT ACTION_UnregisterFonts(MSIPACKAGE *package);
|
2010-05-29 08:55:43 +00:00
|
|
|
extern UINT ACTION_UnregisterMIMEInfo(MSIPACKAGE *package);
|
|
|
|
extern UINT ACTION_UnregisterProgIdInfo(MSIPACKAGE *package);
|
2006-10-22 20:23:59 +00:00
|
|
|
|
|
|
|
/* Helpers */
|
|
|
|
extern DWORD deformat_string(MSIPACKAGE *package, LPCWSTR ptr, WCHAR** data );
|
|
|
|
extern LPWSTR msi_dup_record_field(MSIRECORD *row, INT index);
|
2010-05-29 08:55:43 +00:00
|
|
|
extern LPWSTR msi_dup_property( MSIDATABASE *db, LPCWSTR prop );
|
|
|
|
extern UINT msi_set_property( MSIDATABASE *, LPCWSTR, LPCWSTR );
|
|
|
|
extern UINT msi_get_property( MSIDATABASE *, LPCWSTR, LPWSTR, LPDWORD );
|
|
|
|
extern int msi_get_property_int( MSIDATABASE *package, LPCWSTR prop, int def );
|
2006-10-22 20:23:59 +00:00
|
|
|
extern LPWSTR resolve_folder(MSIPACKAGE *package, LPCWSTR name, BOOL source,
|
2008-01-16 10:11:22 +00:00
|
|
|
BOOL set_prop, BOOL load_prop, MSIFOLDER **folder);
|
2008-12-27 15:10:14 +00:00
|
|
|
extern LPWSTR resolve_file_source(MSIPACKAGE *package, MSIFILE *file);
|
2010-05-29 08:55:43 +00:00
|
|
|
extern void msi_reset_folders( MSIPACKAGE *package, BOOL source );
|
2006-10-22 20:23:59 +00:00
|
|
|
extern MSICOMPONENT *get_loaded_component( MSIPACKAGE* package, LPCWSTR Component );
|
|
|
|
extern MSIFEATURE *get_loaded_feature( MSIPACKAGE* package, LPCWSTR Feature );
|
|
|
|
extern MSIFILE *get_loaded_file( MSIPACKAGE* package, LPCWSTR file );
|
|
|
|
extern MSIFOLDER *get_loaded_folder( MSIPACKAGE *package, LPCWSTR dir );
|
2008-01-16 10:11:22 +00:00
|
|
|
extern int track_tempfile(MSIPACKAGE *package, LPCWSTR path);
|
2006-10-22 20:23:59 +00:00
|
|
|
extern UINT schedule_action(MSIPACKAGE *package, UINT script, LPCWSTR action);
|
2006-11-28 11:21:39 +00:00
|
|
|
extern void msi_free_action_script(MSIPACKAGE *package, UINT script);
|
2006-10-22 20:23:59 +00:00
|
|
|
extern LPWSTR build_icon_path(MSIPACKAGE *, LPCWSTR);
|
|
|
|
extern LPWSTR build_directory_name(DWORD , ...);
|
|
|
|
extern BOOL create_full_pathW(const WCHAR *path);
|
|
|
|
extern void reduce_to_longfilename(WCHAR*);
|
|
|
|
extern LPWSTR create_component_advertise_string(MSIPACKAGE*, MSICOMPONENT*, LPCWSTR);
|
|
|
|
extern void ACTION_UpdateComponentStates(MSIPACKAGE *package, LPCWSTR szFeature);
|
|
|
|
extern UINT register_unique_action(MSIPACKAGE *, LPCWSTR);
|
2008-01-16 10:11:22 +00:00
|
|
|
extern BOOL check_unique_action(const MSIPACKAGE *, LPCWSTR);
|
2006-10-22 20:23:59 +00:00
|
|
|
extern WCHAR* generate_error_string(MSIPACKAGE *, UINT, DWORD, ... );
|
2008-04-04 13:43:40 +00:00
|
|
|
extern UINT msi_set_last_used_source(LPCWSTR product, LPCWSTR usersid,
|
|
|
|
MSIINSTALLCONTEXT context, DWORD options, LPCWSTR value);
|
2010-05-29 08:55:43 +00:00
|
|
|
extern UINT msi_get_local_package_name(LPWSTR path, LPCWSTR suffix);
|
Finish the Wine sync. These components are not just rc file changes
atl, comctl32, comdlg32, dwmapi, fusion, gdiplus, jscript, mpr, mshtml, msi, msimtf, msxml3, ole32, oleaut32, riched20, shdocvw, shlwapi, urlmon, usp10, version and windowscodecs
Seems to build and boot. /me hides
svn path=/trunk/; revision=48273
2010-07-26 02:26:04 +00:00
|
|
|
extern UINT msi_set_sourcedir_props(MSIPACKAGE *package, BOOL replace);
|
2008-12-27 15:10:14 +00:00
|
|
|
|
|
|
|
/* media */
|
|
|
|
|
|
|
|
typedef BOOL (*PMSICABEXTRACTCB)(MSIPACKAGE *, LPCWSTR, DWORD, LPWSTR *, DWORD *, PVOID);
|
|
|
|
|
|
|
|
#define MSICABEXTRACT_BEGINEXTRACT 0x01
|
|
|
|
#define MSICABEXTRACT_FILEEXTRACTED 0x02
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
MSIPACKAGE* package;
|
|
|
|
MSIMEDIAINFO *mi;
|
|
|
|
PMSICABEXTRACTCB cb;
|
|
|
|
LPWSTR curfile;
|
|
|
|
PVOID user;
|
|
|
|
} MSICABDATA;
|
|
|
|
|
|
|
|
extern UINT ready_media(MSIPACKAGE *package, MSIFILE *file, MSIMEDIAINFO *mi);
|
2008-05-17 19:46:01 +00:00
|
|
|
extern void msi_free_media_info(MSIMEDIAINFO *mi);
|
2008-12-27 15:10:14 +00:00
|
|
|
extern BOOL msi_cabextract(MSIPACKAGE* package, MSIMEDIAINFO *mi, LPVOID data);
|
2006-10-22 20:23:59 +00:00
|
|
|
|
|
|
|
/* control event stuff */
|
|
|
|
extern VOID ControlEvent_FireSubscribedEvent(MSIPACKAGE *package, LPCWSTR event,
|
|
|
|
MSIRECORD *data);
|
2008-01-16 10:11:22 +00:00
|
|
|
extern VOID ControlEvent_CleanupDialogSubscriptions(MSIPACKAGE *package, LPWSTR dialog);
|
2006-10-22 20:23:59 +00:00
|
|
|
extern VOID ControlEvent_CleanupSubscriptions(MSIPACKAGE *package);
|
|
|
|
extern VOID ControlEvent_SubscribeToEvent(MSIPACKAGE *package, msi_dialog *dialog,
|
|
|
|
LPCWSTR event, LPCWSTR control, LPCWSTR attribute);
|
|
|
|
|
2008-01-16 10:11:22 +00:00
|
|
|
/* OLE automation */
|
|
|
|
extern HRESULT create_msiserver(IUnknown *pOuter, LPVOID *ppObj);
|
|
|
|
extern HRESULT create_session(MSIHANDLE msiHandle, IDispatch *pInstaller, IDispatch **pDispatch);
|
|
|
|
extern HRESULT load_type_info(IDispatch *iface, ITypeInfo **pptinfo, REFIID clsid, LCID lcid);
|
|
|
|
|
|
|
|
/* Scripting */
|
|
|
|
extern DWORD call_script(MSIHANDLE hPackage, INT type, LPCWSTR script, LPCWSTR function, LPCWSTR action);
|
|
|
|
|
2006-10-22 20:23:59 +00:00
|
|
|
/* User Interface messages from the actions */
|
|
|
|
extern void ui_progress(MSIPACKAGE *, int, int, int, int);
|
|
|
|
extern void ui_actiondata(MSIPACKAGE *, LPCWSTR, MSIRECORD *);
|
|
|
|
|
2009-10-25 11:06:09 +00:00
|
|
|
/* common strings */
|
|
|
|
static const WCHAR cszSourceDir[] = {'S','o','u','r','c','e','D','i','r',0};
|
|
|
|
static const WCHAR cszSOURCEDIR[] = {'S','O','U','R','C','E','D','I','R',0};
|
|
|
|
static const WCHAR cszRootDrive[] = {'R','O','O','T','D','R','I','V','E',0};
|
|
|
|
static const WCHAR szLocalSid[] = {'S','-','1','-','5','-','1','8',0};
|
|
|
|
static const WCHAR szEmpty[] = {0};
|
|
|
|
static const WCHAR szAll[] = {'A','L','L',0};
|
|
|
|
static const WCHAR szOne[] = {'1',0};
|
|
|
|
static const WCHAR szZero[] = {'0',0};
|
|
|
|
static const WCHAR szSpace[] = {' ',0};
|
|
|
|
static const WCHAR szBackSlash[] = {'\\',0};
|
|
|
|
static const WCHAR szForwardSlash[] = {'/',0};
|
|
|
|
static const WCHAR szDot[] = {'.',0};
|
|
|
|
static const WCHAR szDotDot[] = {'.','.',0};
|
|
|
|
static const WCHAR szSemiColon[] = {';',0};
|
|
|
|
static const WCHAR szPreselected[] = {'P','r','e','s','e','l','e','c','t','e','d',0};
|
|
|
|
static const WCHAR szPatches[] = {'P','a','t','c','h','e','s',0};
|
|
|
|
static const WCHAR szState[] = {'S','t','a','t','e',0};
|
|
|
|
static const WCHAR szMsi[] = {'m','s','i',0};
|
|
|
|
static const WCHAR szPatch[] = {'P','A','T','C','H',0};
|
|
|
|
static const WCHAR szSourceList[] = {'S','o','u','r','c','e','L','i','s','t',0};
|
|
|
|
static const WCHAR szInstalled[] = {'I','n','s','t','a','l','l','e','d',0};
|
|
|
|
static const WCHAR szReinstall[] = {'R','E','I','N','S','T','A','L','L',0};
|
|
|
|
static const WCHAR szReinstallMode[] = {'R','E','I','N','S','T','A','L','L','M','O','D','E',0};
|
|
|
|
static const WCHAR szRemove[] = {'R','E','M','O','V','E',0};
|
|
|
|
static const WCHAR szUserSID[] = {'U','s','e','r','S','I','D',0};
|
|
|
|
static const WCHAR szProductCode[] = {'P','r','o','d','u','c','t','C','o','d','e',0};
|
|
|
|
static const WCHAR szRegisterClassInfo[] = {'R','e','g','i','s','t','e','r','C','l','a','s','s','I','n','f','o',0};
|
|
|
|
static const WCHAR szRegisterProgIdInfo[] = {'R','e','g','i','s','t','e','r','P','r','o','g','I','d','I','n','f','o',0};
|
|
|
|
static const WCHAR szRegisterExtensionInfo[] = {'R','e','g','i','s','t','e','r','E','x','t','e','n','s','i','o','n','I','n','f','o',0};
|
|
|
|
static const WCHAR szRegisterMIMEInfo[] = {'R','e','g','i','s','t','e','r','M','I','M','E','I','n','f','o',0};
|
|
|
|
static const WCHAR szDuplicateFiles[] = {'D','u','p','l','i','c','a','t','e','F','i','l','e','s',0};
|
2010-03-06 09:05:09 +00:00
|
|
|
static const WCHAR szRemoveDuplicateFiles[] = {'R','e','m','o','v','e','D','u','p','l','i','c','a','t','e','F','i','l','e','s',0};
|
2009-10-25 11:06:09 +00:00
|
|
|
static const WCHAR szInstallFiles[] = {'I','n','s','t','a','l','l','F','i','l','e','s',0};
|
|
|
|
static const WCHAR szRemoveFiles[] = {'R','e','m','o','v','e','F','i','l','e','s',0};
|
|
|
|
static const WCHAR szFindRelatedProducts[] = {'F','i','n','d','R','e','l','a','t','e','d','P','r','o','d','u','c','t','s',0};
|
|
|
|
static const WCHAR szAllUsers[] = {'A','L','L','U','S','E','R','S',0};
|
|
|
|
static const WCHAR szCustomActionData[] = {'C','u','s','t','o','m','A','c','t','i','o','n','D','a','t','a',0};
|
|
|
|
static const WCHAR szUILevel[] = {'U','I','L','e','v','e','l',0};
|
2010-03-01 12:01:30 +00:00
|
|
|
static const WCHAR szProductID[] = {'P','r','o','d','u','c','t','I','D',0};
|
|
|
|
static const WCHAR szPIDTemplate[] = {'P','I','D','T','e','m','p','l','a','t','e',0};
|
|
|
|
static const WCHAR szPIDKEY[] = {'P','I','D','K','E','Y',0};
|
|
|
|
static const WCHAR szTYPELIB[] = {'T','Y','P','E','L','I','B',0};
|
|
|
|
static const WCHAR szSumInfo[] = {5 ,'S','u','m','m','a','r','y','I','n','f','o','r','m','a','t','i','o','n',0};
|
2010-03-06 09:05:09 +00:00
|
|
|
static const WCHAR szHCR[] = {'H','K','E','Y','_','C','L','A','S','S','E','S','_','R','O','O','T','\\',0};
|
|
|
|
static const WCHAR szHCU[] = {'H','K','E','Y','_','C','U','R','R','E','N','T','_','U','S','E','R','\\',0};
|
|
|
|
static const WCHAR szHLM[] = {'H','K','E','Y','_','L','O','C','A','L','_','M','A','C','H','I','N','E','\\',0};
|
|
|
|
static const WCHAR szHU[] = {'H','K','E','Y','_','U','S','E','R','S','\\',0};
|
|
|
|
static const WCHAR szWindowsFolder[] = {'W','i','n','d','o','w','s','F','o','l','d','e','r',0};
|
|
|
|
static const WCHAR szAppSearch[] = {'A','p','p','S','e','a','r','c','h',0};
|
|
|
|
static const WCHAR szMoveFiles[] = {'M','o','v','e','F','i','l','e','s',0};
|
2010-05-29 08:55:43 +00:00
|
|
|
static const WCHAR szCCPSearch[] = {'C','C','P','S','e','a','r','c','h',0};
|
|
|
|
static const WCHAR szUnregisterClassInfo[] = {'U','n','r','e','g','i','s','t','e','r','C','l','a','s','s','I','n','f','o',0};
|
|
|
|
static const WCHAR szUnregisterExtensionInfo[] = {'U','n','r','e','g','i','s','t','e','r','E','x','t','e','n','s','i','o','n','I','n','f','o',0};
|
|
|
|
static const WCHAR szUnregisterMIMEInfo[] = {'U','n','r','e','g','i','s','t','e','r','M','I','M','E','I','n','f','o',0};
|
|
|
|
static const WCHAR szUnregisterProgIdInfo[] = {'U','n','r','e','g','i','s','t','e','r','P','r','o','g','I','d','I','n','f','o',0};
|
|
|
|
static const WCHAR szRegisterFonts[] = {'R','e','g','i','s','t','e','r','F','o','n','t','s',0};
|
|
|
|
static const WCHAR szUnregisterFonts[] = {'U','n','r','e','g','i','s','t','e','r','F','o','n','t','s',0};
|
|
|
|
static const WCHAR szCLSID[] = {'C','L','S','I','D',0};
|
|
|
|
static const WCHAR szProgID[] = {'P','r','o','g','I','D',0};
|
|
|
|
static const WCHAR szVIProgID[] = {'V','e','r','s','i','o','n','I','n','d','e','p','e','n','d','e','n','t','P','r','o','g','I','D',0};
|
|
|
|
static const WCHAR szAppID[] = {'A','p','p','I','D',0};
|
|
|
|
static const WCHAR szDefaultIcon[] = {'D','e','f','a','u','l','t','I','c','o','n',0};
|
|
|
|
static const WCHAR szInprocHandler[] = {'I','n','p','r','o','c','H','a','n','d','l','e','r',0};
|
|
|
|
static const WCHAR szInprocHandler32[] = {'I','n','p','r','o','c','H','a','n','d','l','e','r','3','2',0};
|
|
|
|
static const WCHAR szMIMEDatabase[] = {'M','I','M','E','\\','D','a','t','a','b','a','s','e','\\','C','o','n','t','e','n','t',' ','T','y','p','e','\\',0};
|
|
|
|
static const WCHAR szLocalPackage[] = {'L','o','c','a','l','P','a','c','k','a','g','e',0};
|
|
|
|
static const WCHAR szOriginalDatabase[] = {'O','r','i','g','i','n','a','l','D','a','t','a','b','a','s','e',0};
|
Finish the Wine sync. These components are not just rc file changes
atl, comctl32, comdlg32, dwmapi, fusion, gdiplus, jscript, mpr, mshtml, msi, msimtf, msxml3, ole32, oleaut32, riched20, shdocvw, shlwapi, urlmon, usp10, version and windowscodecs
Seems to build and boot. /me hides
svn path=/trunk/; revision=48273
2010-07-26 02:26:04 +00:00
|
|
|
static const WCHAR szUpgradeCode[] = {'U','p','g','r','a','d','e','C','o','d','e',0};
|
2006-10-22 20:23:59 +00:00
|
|
|
|
2006-02-17 00:04:10 +00:00
|
|
|
/* memory allocation macro functions */
|
2008-12-27 15:10:14 +00:00
|
|
|
static void *msi_alloc( size_t len ) __WINE_ALLOC_SIZE(1);
|
2006-02-17 00:04:10 +00:00
|
|
|
static inline void *msi_alloc( size_t len )
|
|
|
|
{
|
|
|
|
return HeapAlloc( GetProcessHeap(), 0, len );
|
|
|
|
}
|
|
|
|
|
2008-12-27 15:10:14 +00:00
|
|
|
static void *msi_alloc_zero( size_t len ) __WINE_ALLOC_SIZE(1);
|
2006-02-17 00:04:10 +00:00
|
|
|
static inline void *msi_alloc_zero( size_t len )
|
|
|
|
{
|
|
|
|
return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, len );
|
|
|
|
}
|
|
|
|
|
2008-12-27 15:10:14 +00:00
|
|
|
static void *msi_realloc( void *mem, size_t len ) __WINE_ALLOC_SIZE(2);
|
2006-02-17 00:04:10 +00:00
|
|
|
static inline void *msi_realloc( void *mem, size_t len )
|
|
|
|
{
|
|
|
|
return HeapReAlloc( GetProcessHeap(), 0, mem, len );
|
|
|
|
}
|
|
|
|
|
2008-12-27 15:10:14 +00:00
|
|
|
static void *msi_realloc_zero( void *mem, size_t len ) __WINE_ALLOC_SIZE(2);
|
2006-02-17 00:04:10 +00:00
|
|
|
static inline void *msi_realloc_zero( void *mem, size_t len )
|
|
|
|
{
|
|
|
|
return HeapReAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, mem, len );
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline BOOL msi_free( void *mem )
|
|
|
|
{
|
|
|
|
return HeapFree( GetProcessHeap(), 0, mem );
|
|
|
|
}
|
|
|
|
|
2008-01-16 10:11:22 +00:00
|
|
|
static inline char *strdupWtoA( LPCWSTR str )
|
2006-02-17 00:04:10 +00:00
|
|
|
{
|
|
|
|
LPSTR ret = NULL;
|
|
|
|
DWORD len;
|
|
|
|
|
|
|
|
if (!str) return ret;
|
|
|
|
len = WideCharToMultiByte( CP_ACP, 0, str, -1, NULL, 0, NULL, NULL);
|
|
|
|
ret = msi_alloc( len );
|
|
|
|
if (ret)
|
|
|
|
WideCharToMultiByte( CP_ACP, 0, str, -1, ret, len, NULL, NULL );
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2008-01-16 10:11:22 +00:00
|
|
|
static inline LPWSTR strdupAtoW( LPCSTR str )
|
2006-02-17 00:04:10 +00:00
|
|
|
{
|
|
|
|
LPWSTR ret = NULL;
|
|
|
|
DWORD len;
|
|
|
|
|
|
|
|
if (!str) return ret;
|
|
|
|
len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0 );
|
|
|
|
ret = msi_alloc( len * sizeof(WCHAR) );
|
|
|
|
if (ret)
|
|
|
|
MultiByteToWideChar( CP_ACP, 0, str, -1, ret, len );
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2008-01-16 10:11:22 +00:00
|
|
|
static inline LPWSTR strdupW( LPCWSTR src )
|
2006-02-17 00:04:10 +00:00
|
|
|
{
|
|
|
|
LPWSTR dest;
|
|
|
|
if (!src) return NULL;
|
|
|
|
dest = msi_alloc( (lstrlenW(src)+1)*sizeof(WCHAR) );
|
|
|
|
if (dest)
|
|
|
|
lstrcpyW(dest, src);
|
|
|
|
return dest;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* __WINE_MSI_PRIVATE__ */
|