mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Sync to Wine-20050830:
Francois Gouget <fgouget@free.fr> - Change some Dll* functions so they are exported by name like on Windows. Update the documentation accordingly. Johan Dahlin <jdahlin@async.com.br> - Implemented MsiSetComponentState*. - Added stubs for MsiSetComponentStateA and MsiSetComponentStateW. - Added a null check for component. Alexandre Julliard <julliard@winehq.org> - Don't prefix the functions DllCanUnloadNow, DllGetClassObject and Dll(Un)RegisterServer with the dll name so that the compiler can check the prototypes. Vincent Beron <vberon@mecano.gme.usherb.ca> - Correct mismatches between spec files and comments about export number. Aric Stewart <aric@codeweavers.com> - Display the correct text string in the action text field for the dialog boxes. Also the string should be deformatted. - Make index INT not UINT because it can be -1. - Fixed a memory overflow and leak identified by Mike McCormack. - Add some body to ResolveSource because it is possible to need it when an install is begun but the media is not in the drive, such as in install-on-demand cases. - The file name used in the ui messages is the target name not the source name. Yuri Kozlov <kozlov.y@gmail.com> - Remove duplicate declaration of MSI_SetPropertyW. Mike McCormack <mike@codeweavers.com> - Handle loading strings over 64k from the string table. - build a standard Wine list of folders instead of using an array - use folder pointers instead of array indexes - build a standard Wine list of files instead of using an array - use file pointers instead of array indexes - build a standard Wine list of features instead of using an array - use feature pointers instead of array indexes - build a standard Wine list of components instead of using an array - use component pointers instead of array indexes - Store the component information in a standard Wine list. - Add include guard to header and make functions extern. - build a standard Wine list of extensions instead of using an array - use extension pointers instead of array indexes - build a standard Wine list of appids instead of using an array - use appid pointers instead of array indexes - build a standard Wine list of mime types instead of using an array - use mime type pointers instead of array indexes - Add the allocated mime type to the mime type list. - build a standard Wine list of classes instead of using an array - use class pointers instead of array indexes - Fix a small bug introduced when converting appids to a list. - Implement MsiModifyView (MSIMODIFY_INSERT_TEMPORARY). - Better stub for MsiViewGetError. - Don't dereference variables in a trace. - the combination of all table keys must be unique, not each key - MsiViewExecute may not be called before MsiModifyView - Make sure to save the result calculated in ACTION_UpdateInstallStates. Steven Edwards <steven_ed4153@yahoo.com> - Add real stub for MsiConfigureFeatureW. svn path=/trunk/; revision=17672
This commit is contained in:
parent
965b06eb4d
commit
a9179e7930
22 changed files with 1646 additions and 1495 deletions
File diff suppressed because it is too large
Load diff
|
@ -18,10 +18,16 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef __MSI_ACTION_H__
|
||||
#define __MSI_ACTION_H__
|
||||
|
||||
#include "wine/list.h"
|
||||
|
||||
#define IDENTIFIER_SIZE 96
|
||||
|
||||
typedef struct tagMSIFEATURE
|
||||
{
|
||||
struct list entry;
|
||||
WCHAR Feature[IDENTIFIER_SIZE];
|
||||
WCHAR Feature_Parent[IDENTIFIER_SIZE];
|
||||
WCHAR Title[0x100];
|
||||
|
@ -35,13 +41,15 @@ typedef struct tagMSIFEATURE
|
|||
INSTALLSTATE ActionRequest;
|
||||
INSTALLSTATE Action;
|
||||
|
||||
INT ComponentCount;
|
||||
INT Components[1024]; /* yes hardcoded limit.... I am bad */
|
||||
struct list Components;
|
||||
|
||||
INT Cost;
|
||||
} MSIFEATURE;
|
||||
|
||||
typedef struct tagMSICOMPONENT
|
||||
{
|
||||
struct list entry;
|
||||
DWORD magic;
|
||||
WCHAR Component[IDENTIFIER_SIZE];
|
||||
WCHAR ComponentId[IDENTIFIER_SIZE];
|
||||
WCHAR Directory[IDENTIFIER_SIZE];
|
||||
|
@ -61,8 +69,15 @@ typedef struct tagMSICOMPONENT
|
|||
LPWSTR AdvertiseString;
|
||||
} MSICOMPONENT;
|
||||
|
||||
typedef struct tagComponentList
|
||||
{
|
||||
struct list entry;
|
||||
MSICOMPONENT *component;
|
||||
} ComponentList;
|
||||
|
||||
typedef struct tagMSIFOLDER
|
||||
{
|
||||
struct list entry;
|
||||
LPWSTR Directory;
|
||||
LPWSTR TargetDefault;
|
||||
LPWSTR SourceDefault;
|
||||
|
@ -70,7 +85,7 @@ typedef struct tagMSIFOLDER
|
|||
LPWSTR ResolvedTarget;
|
||||
LPWSTR ResolvedSource;
|
||||
LPWSTR Property; /* initially set property */
|
||||
INT ParentIndex;
|
||||
struct tagMSIFOLDER *Parent;
|
||||
INT State;
|
||||
/* 0 = uninitialized */
|
||||
/* 1 = existing */
|
||||
|
@ -78,12 +93,13 @@ typedef struct tagMSIFOLDER
|
|||
/* 3 = created persist if empty */
|
||||
INT Cost;
|
||||
INT Space;
|
||||
}MSIFOLDER;
|
||||
} MSIFOLDER;
|
||||
|
||||
typedef struct tagMSIFILE
|
||||
{
|
||||
struct list entry;
|
||||
LPWSTR File;
|
||||
INT ComponentIndex;
|
||||
MSICOMPONENT *Component;
|
||||
LPWSTR FileName;
|
||||
LPWSTR ShortName;
|
||||
INT FileSize;
|
||||
|
@ -101,36 +117,52 @@ typedef struct tagMSIFILE
|
|||
LPWSTR SourcePath;
|
||||
LPWSTR TargetPath;
|
||||
BOOL Temporary;
|
||||
}MSIFILE;
|
||||
} MSIFILE;
|
||||
|
||||
typedef struct tagMSIAPPID
|
||||
{
|
||||
struct list entry;
|
||||
WCHAR AppID[IDENTIFIER_SIZE]; /* Primary key */
|
||||
LPWSTR RemoteServerName;
|
||||
LPWSTR LocalServer;
|
||||
LPWSTR ServiceParameters;
|
||||
LPWSTR DllSurrogate;
|
||||
BOOL ActivateAtStorage;
|
||||
BOOL RunAsInteractiveUser;
|
||||
} MSIAPPID;
|
||||
|
||||
typedef struct tagMSICLASS
|
||||
{
|
||||
struct list entry;
|
||||
WCHAR CLSID[IDENTIFIER_SIZE]; /* Primary Key */
|
||||
WCHAR Context[IDENTIFIER_SIZE]; /* Primary Key */
|
||||
INT ComponentIndex; /* Primary Key */
|
||||
MSICOMPONENT *Component;
|
||||
INT ProgIDIndex;
|
||||
LPWSTR ProgIDText;
|
||||
LPWSTR Description;
|
||||
INT AppIDIndex;
|
||||
MSIAPPID *AppID;
|
||||
LPWSTR FileTypeMask;
|
||||
LPWSTR IconPath;
|
||||
LPWSTR DefInprocHandler;
|
||||
LPWSTR DefInprocHandler32;
|
||||
LPWSTR Argument;
|
||||
INT FeatureIndex;
|
||||
MSIFEATURE *Feature;
|
||||
INT Attributes;
|
||||
/* not in the table, set during installation */
|
||||
BOOL Installed;
|
||||
} MSICLASS;
|
||||
|
||||
typedef struct tagMSIMIME MSIMIME;
|
||||
|
||||
typedef struct tagMSIEXTENSION
|
||||
{
|
||||
struct list entry;
|
||||
WCHAR Extension[256]; /* Primary Key */
|
||||
INT ComponentIndex; /* Primary Key */
|
||||
MSICOMPONENT *Component;
|
||||
INT ProgIDIndex;
|
||||
LPWSTR ProgIDText;
|
||||
INT MIMEIndex;
|
||||
INT FeatureIndex;
|
||||
MSIMIME *Mime;
|
||||
MSIFEATURE *Feature;
|
||||
/* not in the table, set during installation */
|
||||
BOOL Installed;
|
||||
INT VerbCount;
|
||||
|
@ -141,7 +173,7 @@ typedef struct tagMSIPROGID
|
|||
{
|
||||
LPWSTR ProgID; /* Primary Key */
|
||||
INT ParentIndex;
|
||||
INT ClassIndex;
|
||||
MSICLASS *Class;
|
||||
LPWSTR Description;
|
||||
LPWSTR IconPath;
|
||||
/* not in the table, set during installation */
|
||||
|
@ -152,33 +184,23 @@ typedef struct tagMSIPROGID
|
|||
|
||||
typedef struct tagMSIVERB
|
||||
{
|
||||
INT ExtensionIndex;
|
||||
MSIEXTENSION *Extension;
|
||||
LPWSTR Verb;
|
||||
INT Sequence;
|
||||
LPWSTR Command;
|
||||
LPWSTR Argument;
|
||||
} MSIVERB;
|
||||
|
||||
typedef struct tagMSIMIME
|
||||
struct tagMSIMIME
|
||||
{
|
||||
struct list entry;
|
||||
LPWSTR ContentType; /* Primary Key */
|
||||
INT ExtensionIndex;
|
||||
MSIEXTENSION *Extension;
|
||||
WCHAR CLSID[IDENTIFIER_SIZE];
|
||||
INT ClassIndex;
|
||||
MSICLASS *Class;
|
||||
/* not in the table, set during installation */
|
||||
BOOL InstallMe;
|
||||
} MSIMIME;
|
||||
|
||||
typedef struct tagMSIAPPID
|
||||
{
|
||||
WCHAR AppID[IDENTIFIER_SIZE]; /* Primary key */
|
||||
LPWSTR RemoteServerName;
|
||||
LPWSTR LocalServer;
|
||||
LPWSTR ServiceParameters;
|
||||
LPWSTR DllSurrogate;
|
||||
BOOL ActivateAtStorage;
|
||||
BOOL RunAsInteractiveUser;
|
||||
} MSIAPPID;
|
||||
};
|
||||
|
||||
enum SCRIPTS {
|
||||
INSTALL_SCRIPT = 0,
|
||||
|
@ -200,63 +222,64 @@ typedef struct tagMSISCRIPT
|
|||
UINT InWhatSequence;
|
||||
LPWSTR *UniqueActions;
|
||||
UINT UniqueActionsCount;
|
||||
}MSISCRIPT;
|
||||
} MSISCRIPT;
|
||||
|
||||
|
||||
UINT ACTION_PerformAction(MSIPACKAGE *package, const WCHAR *action, BOOL force);
|
||||
UINT ACTION_PerformUIAction(MSIPACKAGE *package, const WCHAR *action);
|
||||
void ACTION_FinishCustomActions( MSIPACKAGE* package);
|
||||
UINT ACTION_CustomAction(MSIPACKAGE *package,const WCHAR *action, BOOL execute);
|
||||
extern UINT ACTION_PerformAction(MSIPACKAGE *package, const WCHAR *action, BOOL force);
|
||||
extern UINT ACTION_PerformUIAction(MSIPACKAGE *package, const WCHAR *action);
|
||||
extern void ACTION_FinishCustomActions( MSIPACKAGE* package);
|
||||
extern UINT ACTION_CustomAction(MSIPACKAGE *package,const WCHAR *action, BOOL execute);
|
||||
|
||||
/* actions in other modules */
|
||||
UINT ACTION_AppSearch(MSIPACKAGE *package);
|
||||
UINT ACTION_FindRelatedProducts(MSIPACKAGE *package);
|
||||
UINT ACTION_InstallFiles(MSIPACKAGE *package);
|
||||
UINT ACTION_DuplicateFiles(MSIPACKAGE *package);
|
||||
UINT ACTION_RegisterClassInfo(MSIPACKAGE *package);
|
||||
UINT ACTION_RegisterProgIdInfo(MSIPACKAGE *package);
|
||||
UINT ACTION_RegisterExtensionInfo(MSIPACKAGE *package);
|
||||
UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package);
|
||||
extern UINT ACTION_AppSearch(MSIPACKAGE *package);
|
||||
extern UINT ACTION_FindRelatedProducts(MSIPACKAGE *package);
|
||||
extern UINT ACTION_InstallFiles(MSIPACKAGE *package);
|
||||
extern UINT ACTION_DuplicateFiles(MSIPACKAGE *package);
|
||||
extern UINT ACTION_RegisterClassInfo(MSIPACKAGE *package);
|
||||
extern UINT ACTION_RegisterProgIdInfo(MSIPACKAGE *package);
|
||||
extern UINT ACTION_RegisterExtensionInfo(MSIPACKAGE *package);
|
||||
extern UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package);
|
||||
|
||||
|
||||
/* Helpers */
|
||||
DWORD deformat_string(MSIPACKAGE *package, LPCWSTR ptr, WCHAR** data );
|
||||
WCHAR *load_dynamic_stringW(MSIRECORD *row, INT index);
|
||||
LPWSTR load_dynamic_property(MSIPACKAGE *package, LPCWSTR prop, UINT* rc);
|
||||
LPWSTR resolve_folder(MSIPACKAGE *package, LPCWSTR name, BOOL source,
|
||||
extern DWORD deformat_string(MSIPACKAGE *package, LPCWSTR ptr, WCHAR** data );
|
||||
extern WCHAR *load_dynamic_stringW(MSIRECORD *row, INT index);
|
||||
extern LPWSTR load_dynamic_property(MSIPACKAGE *package, LPCWSTR prop, UINT* rc);
|
||||
extern LPWSTR resolve_folder(MSIPACKAGE *package, LPCWSTR name, BOOL source,
|
||||
BOOL set_prop, MSIFOLDER **folder);
|
||||
int get_loaded_component(MSIPACKAGE* package, LPCWSTR Component );
|
||||
int get_loaded_feature(MSIPACKAGE* package, LPCWSTR Feature );
|
||||
int get_loaded_file(MSIPACKAGE* package, LPCWSTR file);
|
||||
int track_tempfile(MSIPACKAGE *package, LPCWSTR name, LPCWSTR path);
|
||||
UINT schedule_action(MSIPACKAGE *package, UINT script, LPCWSTR action);
|
||||
UINT build_icon_path(MSIPACKAGE *, LPCWSTR, LPWSTR *);
|
||||
DWORD build_version_dword(LPCWSTR);
|
||||
LPWSTR build_directory_name(DWORD , ...);
|
||||
BOOL create_full_pathW(const WCHAR *path);
|
||||
BOOL ACTION_VerifyComponentForAction(MSIPACKAGE*, INT, INSTALLSTATE);
|
||||
BOOL ACTION_VerifyFeatureForAction(MSIPACKAGE*, INT, INSTALLSTATE);
|
||||
void reduce_to_longfilename(WCHAR*);
|
||||
void reduce_to_shortfilename(WCHAR*);
|
||||
LPWSTR create_component_advertise_string(MSIPACKAGE*, MSICOMPONENT*, LPCWSTR);
|
||||
void ACTION_UpdateComponentStates(MSIPACKAGE *package, LPCWSTR szFeature);
|
||||
UINT register_unique_action(MSIPACKAGE *, LPCWSTR);
|
||||
BOOL check_unique_action(MSIPACKAGE *, LPCWSTR);
|
||||
WCHAR* generate_error_string(MSIPACKAGE *, UINT, DWORD, ... );
|
||||
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 );
|
||||
extern int track_tempfile(MSIPACKAGE *package, LPCWSTR name, LPCWSTR path);
|
||||
extern UINT schedule_action(MSIPACKAGE *package, UINT script, LPCWSTR action);
|
||||
extern UINT build_icon_path(MSIPACKAGE *, LPCWSTR, LPWSTR *);
|
||||
extern DWORD build_version_dword(LPCWSTR);
|
||||
extern LPWSTR build_directory_name(DWORD , ...);
|
||||
extern BOOL create_full_pathW(const WCHAR *path);
|
||||
extern BOOL ACTION_VerifyComponentForAction(MSIPACKAGE*, MSICOMPONENT*, INSTALLSTATE);
|
||||
extern BOOL ACTION_VerifyFeatureForAction(MSIFEATURE*, INSTALLSTATE);
|
||||
extern void reduce_to_longfilename(WCHAR*);
|
||||
extern void reduce_to_shortfilename(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);
|
||||
extern BOOL check_unique_action(MSIPACKAGE *, LPCWSTR);
|
||||
extern WCHAR* generate_error_string(MSIPACKAGE *, UINT, DWORD, ... );
|
||||
|
||||
|
||||
/* control event stuff */
|
||||
VOID ControlEvent_FireSubscribedEvent(MSIPACKAGE *package, LPCWSTR event,
|
||||
extern VOID ControlEvent_FireSubscribedEvent(MSIPACKAGE *package, LPCWSTR event,
|
||||
MSIRECORD *data);
|
||||
VOID ControlEvent_CleanupSubscriptions(MSIPACKAGE *package);
|
||||
VOID ControlEvent_SubscribeToEvent(MSIPACKAGE *package, LPCWSTR event,
|
||||
extern VOID ControlEvent_CleanupSubscriptions(MSIPACKAGE *package);
|
||||
extern VOID ControlEvent_SubscribeToEvent(MSIPACKAGE *package, LPCWSTR event,
|
||||
LPCWSTR control, LPCWSTR attribute);
|
||||
VOID ControlEvent_UnSubscribeToEvent( MSIPACKAGE *package, LPCWSTR event,
|
||||
extern VOID ControlEvent_UnSubscribeToEvent( MSIPACKAGE *package, LPCWSTR event,
|
||||
LPCWSTR control, LPCWSTR attribute );
|
||||
|
||||
/* User Interface messages from the actions */
|
||||
void ui_progress(MSIPACKAGE *, int, int, int, int);
|
||||
void ui_actiondata(MSIPACKAGE *, LPCWSTR, MSIRECORD *);
|
||||
extern void ui_progress(MSIPACKAGE *, int, int, int, int);
|
||||
extern void ui_actiondata(MSIPACKAGE *, LPCWSTR, MSIRECORD *);
|
||||
|
||||
|
||||
/* string consts use a number of places and defined in helpers.c*/
|
||||
|
@ -264,3 +287,5 @@ extern const WCHAR cszSourceDir[];
|
|||
extern const WCHAR szProductCode[];
|
||||
extern const WCHAR cszRootDrive[];
|
||||
extern const WCHAR cszbs[];
|
||||
|
||||
#endif /* __MSI_ACTION_H__ */
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -60,10 +60,11 @@ static UINT CREATE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
|
|||
{
|
||||
MSICREATEVIEW *cv = (MSICREATEVIEW*)view;
|
||||
column_info *col;
|
||||
UINT r, nField, row, table_val, column_val;
|
||||
UINT r, nField;
|
||||
static const WCHAR szTables[] = { '_','T','a','b','l','e','s',0 };
|
||||
static const WCHAR szColumns[] = { '_','C','o','l','u','m','n','s',0 };
|
||||
MSIVIEW *tv = NULL;
|
||||
MSIRECORD *rec;
|
||||
|
||||
TRACE("%p Table %s (%s)\n", cv, debugstr_w(cv->name),
|
||||
cv->bIsTemp?"temporary":"permanent");
|
||||
|
@ -72,12 +73,6 @@ static UINT CREATE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
|
|||
if( TABLE_Exists(cv->db, cv->name ) )
|
||||
return ERROR_BAD_QUERY_SYNTAX;
|
||||
|
||||
/* add the name to the _Tables table */
|
||||
table_val = msi_addstringW( cv->db->strings, 0, cv->name, -1, 1 );
|
||||
TRACE("New string %s -> %d\n", debugstr_w( cv->name ), table_val );
|
||||
if( table_val < 0 )
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
|
||||
r = TABLE_CreateView( cv->db, szTables, &tv );
|
||||
TRACE("CreateView returned %x\n", r);
|
||||
if( r )
|
||||
|
@ -86,20 +81,26 @@ static UINT CREATE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
|
|||
r = tv->ops->execute( tv, 0 );
|
||||
TRACE("tv execute returned %x\n", r);
|
||||
if( r )
|
||||
return r;
|
||||
goto err;
|
||||
|
||||
row = -1;
|
||||
r = tv->ops->insert_row( tv, &row );
|
||||
rec = MSI_CreateRecord( 1 );
|
||||
if( !rec )
|
||||
goto err;
|
||||
|
||||
r = MSI_RecordSetStringW( rec, 1, cv->name );
|
||||
if( r )
|
||||
goto err;
|
||||
|
||||
r = tv->ops->insert_row( tv, rec );
|
||||
TRACE("insert_row returned %x\n", r);
|
||||
if( r )
|
||||
goto err;
|
||||
|
||||
r = tv->ops->set_int( tv, row, 1, table_val );
|
||||
if( r )
|
||||
goto err;
|
||||
tv->ops->delete( tv );
|
||||
tv = NULL;
|
||||
|
||||
msiobj_release( &rec->hdr );
|
||||
|
||||
/* add each column to the _Columns table */
|
||||
r = TABLE_CreateView( cv->db, szColumns, &tv );
|
||||
if( r )
|
||||
|
@ -108,7 +109,15 @@ static UINT CREATE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
|
|||
r = tv->ops->execute( tv, 0 );
|
||||
TRACE("tv execute returned %x\n", r);
|
||||
if( r )
|
||||
return r;
|
||||
goto err;
|
||||
|
||||
rec = MSI_CreateRecord( 4 );
|
||||
if( !rec )
|
||||
goto err;
|
||||
|
||||
r = MSI_RecordSetStringW( rec, 1, cv->name );
|
||||
if( r )
|
||||
goto err;
|
||||
|
||||
/*
|
||||
* need to set the table, column number, col name and type
|
||||
|
@ -117,36 +126,21 @@ static UINT CREATE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
|
|||
nField = 1;
|
||||
for( col = cv->col_info; col; col = col->next )
|
||||
{
|
||||
row = -1;
|
||||
r = tv->ops->insert_row( tv, &row );
|
||||
r = MSI_RecordSetInteger( rec, 2, nField );
|
||||
if( r )
|
||||
goto err;
|
||||
|
||||
column_val = msi_addstringW( cv->db->strings, 0, col->column, -1, 1 );
|
||||
TRACE("New string %s -> %d\n", debugstr_w( col->column ), column_val );
|
||||
if( column_val < 0 )
|
||||
break;
|
||||
|
||||
/* add the string again here so we increase the reference count */
|
||||
table_val = msi_addstringW( cv->db->strings, 0, cv->name, -1, 1 );
|
||||
if( table_val < 0 )
|
||||
break;
|
||||
|
||||
r = tv->ops->set_int( tv, row, 1, table_val );
|
||||
r = MSI_RecordSetStringW( rec, 3, col->column );
|
||||
if( r )
|
||||
break;
|
||||
goto err;
|
||||
|
||||
r = tv->ops->set_int( tv, row, 2, 0x8000|nField );
|
||||
r = MSI_RecordSetInteger( rec, 4, col->type );
|
||||
if( r )
|
||||
break;
|
||||
goto err;
|
||||
|
||||
r = tv->ops->set_int( tv, row, 3, column_val );
|
||||
r = tv->ops->insert_row( tv, rec );
|
||||
if( r )
|
||||
break;
|
||||
|
||||
r = tv->ops->set_int( tv, row, 4, 0x8000|col->type );
|
||||
if( r )
|
||||
break;
|
||||
goto err;
|
||||
|
||||
nField++;
|
||||
}
|
||||
|
|
|
@ -586,14 +586,16 @@ static UINT HANDLE_CustomType18(MSIPACKAGE *package, LPCWSTR source,
|
|||
WCHAR *cmd;
|
||||
INT len;
|
||||
static const WCHAR spc[] = {' ',0};
|
||||
int index;
|
||||
MSIFILE *file;
|
||||
UINT prc;
|
||||
|
||||
memset(&si,0,sizeof(STARTUPINFOW));
|
||||
|
||||
index = get_loaded_file(package,source);
|
||||
file = get_loaded_file(package,source);
|
||||
if( !file )
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
|
||||
len = strlenW(package->files[index].TargetPath);
|
||||
len = lstrlenW( file->TargetPath );
|
||||
|
||||
deformat_string(package,target,&deformated);
|
||||
if (deformated)
|
||||
|
@ -602,7 +604,7 @@ static UINT HANDLE_CustomType18(MSIPACKAGE *package, LPCWSTR source,
|
|||
|
||||
cmd = HeapAlloc(GetProcessHeap(),0,len * sizeof(WCHAR));
|
||||
|
||||
strcpyW(cmd, package->files[index].TargetPath);
|
||||
lstrcpyW( cmd, file->TargetPath);
|
||||
if (deformated)
|
||||
{
|
||||
strcatW(cmd, spc);
|
||||
|
|
|
@ -82,11 +82,11 @@ static UINT DELETE_set_int( struct tagMSIVIEW *view, UINT row, UINT col, UINT va
|
|||
return ERROR_FUNCTION_FAILED;
|
||||
}
|
||||
|
||||
static UINT DELETE_insert_row( struct tagMSIVIEW *view, UINT *num )
|
||||
static UINT DELETE_insert_row( struct tagMSIVIEW *view, MSIRECORD *record )
|
||||
{
|
||||
MSIDELETEVIEW *dv = (MSIDELETEVIEW*)view;
|
||||
|
||||
TRACE("%p %p\n", dv, num );
|
||||
TRACE("%p %p\n", dv, record );
|
||||
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
}
|
||||
|
|
|
@ -170,7 +170,7 @@ static UINT ControlEvent_AddLocal(MSIPACKAGE* package, LPCWSTR argument,
|
|||
msi_dialog* dialog)
|
||||
{
|
||||
static const WCHAR szAll[] = {'A','L','L',0};
|
||||
int i;
|
||||
MSIFEATURE *feature = NULL;
|
||||
|
||||
if (lstrcmpW(szAll,argument))
|
||||
{
|
||||
|
@ -178,10 +178,10 @@ static UINT ControlEvent_AddLocal(MSIPACKAGE* package, LPCWSTR argument,
|
|||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < package->loaded_features; i++)
|
||||
LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry )
|
||||
{
|
||||
package->features[i].ActionRequest = INSTALLSTATE_LOCAL;
|
||||
package->features[i].Action = INSTALLSTATE_LOCAL;
|
||||
feature->ActionRequest = INSTALLSTATE_LOCAL;
|
||||
feature->Action = INSTALLSTATE_LOCAL;
|
||||
}
|
||||
ACTION_UpdateComponentStates(package,argument);
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ static UINT ControlEvent_Remove(MSIPACKAGE* package, LPCWSTR argument,
|
|||
msi_dialog* dialog)
|
||||
{
|
||||
static const WCHAR szAll[] = {'A','L','L',0};
|
||||
int i;
|
||||
MSIFEATURE *feature = NULL;
|
||||
|
||||
if (lstrcmpW(szAll,argument))
|
||||
{
|
||||
|
@ -200,10 +200,10 @@ static UINT ControlEvent_Remove(MSIPACKAGE* package, LPCWSTR argument,
|
|||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < package->loaded_features; i++)
|
||||
LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry )
|
||||
{
|
||||
package->features[i].ActionRequest = INSTALLSTATE_ABSENT;
|
||||
package->features[i].Action= INSTALLSTATE_ABSENT;
|
||||
feature->ActionRequest = INSTALLSTATE_ABSENT;
|
||||
feature->Action= INSTALLSTATE_ABSENT;
|
||||
}
|
||||
ACTION_UpdateComponentStates(package,argument);
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ static UINT ControlEvent_AddSource(MSIPACKAGE* package, LPCWSTR argument,
|
|||
msi_dialog* dialog)
|
||||
{
|
||||
static const WCHAR szAll[] = {'A','L','L',0};
|
||||
int i;
|
||||
MSIFEATURE *feature = NULL;
|
||||
|
||||
if (lstrcmpW(szAll,argument))
|
||||
{
|
||||
|
@ -222,10 +222,10 @@ static UINT ControlEvent_AddSource(MSIPACKAGE* package, LPCWSTR argument,
|
|||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < package->loaded_features; i++)
|
||||
LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry )
|
||||
{
|
||||
package->features[i].ActionRequest = INSTALLSTATE_SOURCE;
|
||||
package->features[i].Action = INSTALLSTATE_SOURCE;
|
||||
feature->ActionRequest = INSTALLSTATE_SOURCE;
|
||||
feature->Action = INSTALLSTATE_SOURCE;
|
||||
}
|
||||
ACTION_UpdateComponentStates(package,argument);
|
||||
}
|
||||
|
|
|
@ -56,14 +56,13 @@ extern const WCHAR szRemoveFiles[];
|
|||
|
||||
static const WCHAR cszTempFolder[]= {'T','e','m','p','F','o','l','d','e','r',0};
|
||||
|
||||
inline static UINT create_component_directory ( MSIPACKAGE* package, INT component)
|
||||
static UINT create_component_directory( MSIPACKAGE* package, MSICOMPONENT *comp )
|
||||
{
|
||||
UINT rc = ERROR_SUCCESS;
|
||||
MSIFOLDER *folder;
|
||||
LPWSTR install_path;
|
||||
|
||||
install_path = resolve_folder(package, package->components[component].Directory,
|
||||
FALSE, FALSE, &folder);
|
||||
install_path = resolve_folder(package, comp->Directory, FALSE, FALSE, &folder);
|
||||
if (!install_path)
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
|
||||
|
@ -208,23 +207,22 @@ static INT_PTR cabinet_notify(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin)
|
|||
LPWSTR tracknametmp;
|
||||
static const WCHAR tmpprefix[] = {'C','A','B','T','M','P','_',0};
|
||||
LPWSTR given_file;
|
||||
INT index;
|
||||
|
||||
MSIRECORD * uirow;
|
||||
LPWSTR uipath;
|
||||
MSIFILE *f;
|
||||
|
||||
given_file = strdupAtoW(pfdin->psz1);
|
||||
index = get_loaded_file(data->package, given_file);
|
||||
f = get_loaded_file(data->package, given_file);
|
||||
|
||||
if (index < 0)
|
||||
if (!f)
|
||||
{
|
||||
ERR("Unknown File in Cabinent (%s)\n",debugstr_w(given_file));
|
||||
HeapFree(GetProcessHeap(),0,given_file);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!((data->package->files[index].State == 1 ||
|
||||
data->package->files[index].State == 2)))
|
||||
if (!((f->State == 1 || f->State == 2)))
|
||||
{
|
||||
TRACE("Skipping extraction of %s\n",debugstr_w(given_file));
|
||||
HeapFree(GetProcessHeap(),0,given_file);
|
||||
|
@ -254,16 +252,16 @@ static INT_PTR cabinet_notify(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin)
|
|||
|
||||
/* the UI chunk */
|
||||
uirow=MSI_CreateRecord(9);
|
||||
MSI_RecordSetStringW(uirow,1,data->package->files[index].File);
|
||||
uipath = strdupW(data->package->files[index].TargetPath);
|
||||
MSI_RecordSetStringW( uirow, 1, f->FileName );
|
||||
uipath = strdupW( f->TargetPath );
|
||||
*(strrchrW(uipath,'\\')+1)=0;
|
||||
MSI_RecordSetStringW(uirow,9,uipath);
|
||||
MSI_RecordSetInteger(uirow,6,data->package->files[index].FileSize);
|
||||
MSI_RecordSetInteger( uirow, 6, f->FileSize );
|
||||
ui_actiondata(data->package,szInstallFiles,uirow);
|
||||
msiobj_release( &uirow->hdr );
|
||||
HeapFree(GetProcessHeap(),0,uipath);
|
||||
|
||||
ui_progress(data->package,2,data->package->files[index].FileSize,0,0);
|
||||
ui_progress( data->package, 2, f->FileSize, 0, 0);
|
||||
|
||||
return cabinet_open(file, _O_WRONLY | _O_CREAT, 0);
|
||||
}
|
||||
|
@ -434,7 +432,7 @@ static UINT ready_volume(MSIPACKAGE* package, LPCWSTR path, LPWSTR last_volume,
|
|||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
static UINT ready_media_for_file(MSIPACKAGE *package, int fileindex,
|
||||
static UINT ready_media_for_file(MSIPACKAGE *package, MSIFILE *file,
|
||||
MSICOMPONENT* comp)
|
||||
{
|
||||
UINT rc = ERROR_SUCCESS;
|
||||
|
@ -452,7 +450,6 @@ static UINT ready_media_for_file(MSIPACKAGE *package, int fileindex,
|
|||
static UINT last_sequence = 0;
|
||||
static LPWSTR last_volume = NULL;
|
||||
static LPWSTR last_path = NULL;
|
||||
MSIFILE* file = NULL;
|
||||
UINT type;
|
||||
LPCWSTR prompt;
|
||||
static DWORD count = 0;
|
||||
|
@ -470,8 +467,6 @@ static UINT ready_media_for_file(MSIPACKAGE *package, int fileindex,
|
|||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
file = &package->files[fileindex];
|
||||
|
||||
if (file->Sequence <= last_sequence)
|
||||
{
|
||||
set_file_source(package,file,comp,last_path);
|
||||
|
@ -582,8 +577,6 @@ static UINT ready_media_for_file(MSIPACKAGE *package, int fileindex,
|
|||
}
|
||||
}
|
||||
rc = !extract_cabinet_file(package, source, last_path);
|
||||
/* reaquire file ptr */
|
||||
file = &package->files[fileindex];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -616,21 +609,21 @@ static UINT ready_media_for_file(MSIPACKAGE *package, int fileindex,
|
|||
return rc;
|
||||
}
|
||||
|
||||
inline static UINT get_file_target(MSIPACKAGE *package, LPCWSTR file_key,
|
||||
static UINT get_file_target(MSIPACKAGE *package, LPCWSTR file_key,
|
||||
LPWSTR* file_source)
|
||||
{
|
||||
DWORD index;
|
||||
MSIFILE *file;
|
||||
|
||||
if (!package)
|
||||
return ERROR_INVALID_HANDLE;
|
||||
|
||||
for (index = 0; index < package->loaded_files; index ++)
|
||||
LIST_FOR_EACH_ENTRY( file, &package->files, MSIFILE, entry )
|
||||
{
|
||||
if (strcmpW(file_key,package->files[index].File)==0)
|
||||
if (lstrcmpW( file_key, file->File )==0)
|
||||
{
|
||||
if (package->files[index].State >= 2)
|
||||
if (file->State >= 2)
|
||||
{
|
||||
*file_source = strdupW(package->files[index].TargetPath);
|
||||
*file_source = strdupW( file->TargetPath );
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
else
|
||||
|
@ -651,8 +644,8 @@ inline static UINT get_file_target(MSIPACKAGE *package, LPCWSTR file_key,
|
|||
UINT ACTION_InstallFiles(MSIPACKAGE *package)
|
||||
{
|
||||
UINT rc = ERROR_SUCCESS;
|
||||
DWORD index;
|
||||
LPWSTR ptr;
|
||||
MSIFILE *file;
|
||||
|
||||
if (!package)
|
||||
return ERROR_INVALID_HANDLE;
|
||||
|
@ -673,17 +666,14 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
|
|||
FIXME("Write DiskPrompt\n");
|
||||
|
||||
/* Pass 1 */
|
||||
for (index = 0; index < package->loaded_files; index++)
|
||||
LIST_FOR_EACH_ENTRY( file, &package->files, MSIFILE, entry )
|
||||
{
|
||||
MSIFILE *file;
|
||||
MSICOMPONENT* comp = NULL;
|
||||
|
||||
file = &package->files[index];
|
||||
|
||||
if (file->Temporary)
|
||||
continue;
|
||||
|
||||
if (!ACTION_VerifyComponentForAction(package, file->ComponentIndex,
|
||||
if (!ACTION_VerifyComponentForAction(package, file->Component,
|
||||
INSTALLSTATE_LOCAL))
|
||||
{
|
||||
ui_progress(package,2,file->FileSize,0,0);
|
||||
|
@ -700,13 +690,12 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
|
|||
|
||||
TRACE("Pass 1: %s\n",debugstr_w(file->File));
|
||||
|
||||
create_component_directory( package, file->ComponentIndex);
|
||||
create_component_directory( package, file->Component );
|
||||
|
||||
/* recalculate file paths because things may have changed */
|
||||
|
||||
if (file->ComponentIndex >= 0)
|
||||
comp = &package->components[file->ComponentIndex];
|
||||
else
|
||||
comp = file->Component;
|
||||
if (!comp)
|
||||
{
|
||||
ERR("No Component for file\n");
|
||||
continue;
|
||||
|
@ -721,13 +710,8 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
|
|||
}
|
||||
|
||||
/* Pass 2 */
|
||||
for (index = 0; index < package->loaded_files; index++)
|
||||
LIST_FOR_EACH_ENTRY( file, &package->files, MSIFILE, entry )
|
||||
{
|
||||
MSIFILE *file;
|
||||
MSICOMPONENT* comp = NULL;
|
||||
|
||||
file = &package->files[index];
|
||||
|
||||
if (file->Temporary)
|
||||
continue;
|
||||
|
||||
|
@ -735,10 +719,7 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
|
|||
{
|
||||
TRACE("Pass 2: %s\n",debugstr_w(file->File));
|
||||
|
||||
if (file->ComponentIndex >= 0)
|
||||
comp = &package->components[file->ComponentIndex];
|
||||
|
||||
rc = ready_media_for_file(package, index, comp);
|
||||
rc = ready_media_for_file( package, file, file->Component );
|
||||
if (rc != ERROR_SUCCESS)
|
||||
{
|
||||
ERR("Unable to ready media\n");
|
||||
|
@ -746,13 +727,6 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
|
|||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* WARNING!
|
||||
* our file table could change here because a new temp file
|
||||
* may have been created. So reaquire our ptr.
|
||||
*/
|
||||
file = &package->files[index];
|
||||
|
||||
TRACE("file paths %s to %s\n",debugstr_w(file->SourcePath),
|
||||
debugstr_w(file->TargetPath));
|
||||
|
||||
|
@ -797,7 +771,7 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
|
|||
}
|
||||
|
||||
/* cleanup */
|
||||
ready_media_for_file(NULL, 0, NULL);
|
||||
ready_media_for_file(NULL, NULL, NULL);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -808,27 +782,25 @@ static UINT ITERATE_DuplicateFiles(MSIRECORD *row, LPVOID param)
|
|||
WCHAR dest_name[0x100];
|
||||
LPWSTR dest_path, dest;
|
||||
LPCWSTR file_key, component;
|
||||
INT component_index;
|
||||
DWORD sz;
|
||||
DWORD rc;
|
||||
MSICOMPONENT *comp;
|
||||
|
||||
component = MSI_RecordGetString(row,2);
|
||||
component_index = get_loaded_component(package,component);
|
||||
comp = get_loaded_component(package,component);
|
||||
|
||||
if (!ACTION_VerifyComponentForAction(package, component_index,
|
||||
INSTALLSTATE_LOCAL))
|
||||
if (!ACTION_VerifyComponentForAction(package, comp, INSTALLSTATE_LOCAL))
|
||||
{
|
||||
TRACE("Skipping copy due to disabled component %s\n",
|
||||
debugstr_w(component));
|
||||
|
||||
/* the action taken was the same as the current install state */
|
||||
package->components[component_index].Action =
|
||||
package->components[component_index].Installed;
|
||||
comp->Action = comp->Installed;
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
package->components[component_index].Action = INSTALLSTATE_LOCAL;
|
||||
comp->Action = INSTALLSTATE_LOCAL;
|
||||
|
||||
file_key = MSI_RecordGetString(row,3);
|
||||
if (!file_key)
|
||||
|
|
|
@ -79,18 +79,17 @@ static const WCHAR* scanW(LPCWSTR buf, WCHAR token, DWORD len)
|
|||
static LPWSTR deformat_component(MSIPACKAGE* package, LPCWSTR key, DWORD* sz)
|
||||
{
|
||||
LPWSTR value = NULL;
|
||||
INT index;
|
||||
MSICOMPONENT *comp;
|
||||
|
||||
*sz = 0;
|
||||
if (!package)
|
||||
return NULL;
|
||||
|
||||
ERR("POORLY HANDLED DEFORMAT.. [$componentkey] \n");
|
||||
index = get_loaded_component(package,key);
|
||||
if (index >= 0)
|
||||
comp = get_loaded_component(package,key);
|
||||
if (comp)
|
||||
{
|
||||
value = resolve_folder(package, package->components[index].Directory,
|
||||
FALSE, FALSE, NULL);
|
||||
value = resolve_folder(package, comp->Directory, FALSE, FALSE, NULL);
|
||||
*sz = (strlenW(value)) * sizeof(WCHAR);
|
||||
}
|
||||
|
||||
|
@ -101,38 +100,37 @@ static LPWSTR deformat_file(MSIPACKAGE* package, LPCWSTR key, DWORD* sz,
|
|||
BOOL shortname)
|
||||
{
|
||||
LPWSTR value = NULL;
|
||||
INT index;
|
||||
MSIFILE *file;
|
||||
|
||||
*sz = 0;
|
||||
|
||||
if (!package)
|
||||
return NULL;
|
||||
|
||||
index = get_loaded_file(package,key);
|
||||
if (index >=0)
|
||||
file = get_loaded_file( package, key );
|
||||
if (file)
|
||||
{
|
||||
if (!shortname)
|
||||
{
|
||||
value = strdupW(package->files[index].TargetPath);
|
||||
value = strdupW( file->TargetPath );
|
||||
*sz = (strlenW(value)) * sizeof(WCHAR);
|
||||
}
|
||||
else
|
||||
{
|
||||
DWORD size = 0;
|
||||
size = GetShortPathNameW(package->files[index].TargetPath, NULL, 0);
|
||||
size = GetShortPathNameW( file->TargetPath, NULL, 0 );
|
||||
|
||||
if (size > 0)
|
||||
{
|
||||
*sz = (size-1) * sizeof (WCHAR);
|
||||
size ++;
|
||||
value = HeapAlloc(GetProcessHeap(),0,size * sizeof(WCHAR));
|
||||
GetShortPathNameW(package->files[index].TargetPath, value,
|
||||
size);
|
||||
GetShortPathNameW( file->TargetPath, value, size );
|
||||
}
|
||||
else
|
||||
{
|
||||
ERR("Unable to get ShortPath size (%s)\n",
|
||||
debugstr_w(package->files[index].TargetPath));
|
||||
ERR("Unable to get ShortPath size (%s)\n",
|
||||
debugstr_w( file->TargetPath) );
|
||||
value = NULL;
|
||||
*sz = 0;
|
||||
}
|
||||
|
|
|
@ -167,89 +167,80 @@ LPWSTR load_dynamic_property(MSIPACKAGE *package, LPCWSTR prop, UINT* rc)
|
|||
return str;
|
||||
}
|
||||
|
||||
int get_loaded_component(MSIPACKAGE* package, LPCWSTR Component )
|
||||
MSICOMPONENT* get_loaded_component( MSIPACKAGE* package, LPCWSTR Component )
|
||||
{
|
||||
int rc = -1;
|
||||
DWORD i;
|
||||
MSICOMPONENT *comp;
|
||||
|
||||
for (i = 0; i < package->loaded_components; i++)
|
||||
LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
|
||||
{
|
||||
if (strcmpW(Component,package->components[i].Component)==0)
|
||||
{
|
||||
rc = i;
|
||||
break;
|
||||
}
|
||||
if (lstrcmpW(Component,comp->Component)==0)
|
||||
return comp;
|
||||
}
|
||||
return rc;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int get_loaded_feature(MSIPACKAGE* package, LPCWSTR Feature )
|
||||
MSIFEATURE* get_loaded_feature(MSIPACKAGE* package, LPCWSTR Feature )
|
||||
{
|
||||
int rc = -1;
|
||||
DWORD i;
|
||||
MSIFEATURE *feature;
|
||||
|
||||
for (i = 0; i < package->loaded_features; i++)
|
||||
LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry )
|
||||
{
|
||||
if (strcmpW(Feature,package->features[i].Feature)==0)
|
||||
{
|
||||
rc = i;
|
||||
break;
|
||||
}
|
||||
if (lstrcmpW( Feature, feature->Feature )==0)
|
||||
return feature;
|
||||
}
|
||||
return rc;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int get_loaded_file(MSIPACKAGE* package, LPCWSTR file)
|
||||
MSIFILE* get_loaded_file( MSIPACKAGE* package, LPCWSTR key )
|
||||
{
|
||||
int rc = -1;
|
||||
DWORD i;
|
||||
MSIFILE *file;
|
||||
|
||||
for (i = 0; i < package->loaded_files; i++)
|
||||
LIST_FOR_EACH_ENTRY( file, &package->files, MSIFILE, entry )
|
||||
{
|
||||
if (strcmpW(file,package->files[i].File)==0)
|
||||
{
|
||||
rc = i;
|
||||
break;
|
||||
}
|
||||
if (lstrcmpW( key, file->File )==0)
|
||||
return file;
|
||||
}
|
||||
return rc;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int track_tempfile(MSIPACKAGE *package, LPCWSTR name, LPCWSTR path)
|
||||
int track_tempfile( MSIPACKAGE *package, LPCWSTR name, LPCWSTR path )
|
||||
{
|
||||
DWORD i;
|
||||
DWORD index;
|
||||
MSIFILE *file;
|
||||
|
||||
if (!package)
|
||||
return -2;
|
||||
|
||||
for (i=0; i < package->loaded_files; i++)
|
||||
if (strcmpW(package->files[i].File,name)==0)
|
||||
return -1;
|
||||
file = get_loaded_file( package, name );
|
||||
if (file)
|
||||
return -1;
|
||||
|
||||
index = package->loaded_files;
|
||||
package->loaded_files++;
|
||||
if (package->loaded_files== 1)
|
||||
package->files = HeapAlloc(GetProcessHeap(),0,sizeof(MSIFILE));
|
||||
else
|
||||
package->files = HeapReAlloc(GetProcessHeap(),0,
|
||||
package->files , package->loaded_files * sizeof(MSIFILE));
|
||||
file = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof (MSIFILE) );
|
||||
|
||||
memset(&package->files[index],0,sizeof(MSIFILE));
|
||||
file->File = strdupW( name );
|
||||
file->TargetPath = strdupW( path );
|
||||
file->Temporary = TRUE;
|
||||
|
||||
package->files[index].File = strdupW(name);
|
||||
package->files[index].TargetPath = strdupW(path);
|
||||
package->files[index].Temporary = TRUE;
|
||||
|
||||
TRACE("Tracking tempfile (%s)\n",debugstr_w(package->files[index].File));
|
||||
TRACE("Tracking tempfile (%s)\n", debugstr_w( file->File ));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
MSIFOLDER *get_loaded_folder( MSIPACKAGE *package, LPCWSTR dir )
|
||||
{
|
||||
MSIFOLDER *folder;
|
||||
|
||||
LIST_FOR_EACH_ENTRY( folder, &package->folders, MSIFOLDER, entry )
|
||||
{
|
||||
if (lstrcmpW( dir, folder->Directory )==0)
|
||||
return folder;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
LPWSTR resolve_folder(MSIPACKAGE *package, LPCWSTR name, BOOL source,
|
||||
BOOL set_prop, MSIFOLDER **folder)
|
||||
{
|
||||
DWORD i;
|
||||
MSIFOLDER *f;
|
||||
LPWSTR p, path = NULL;
|
||||
|
||||
TRACE("Working to resolve %s\n",debugstr_w(name));
|
||||
|
@ -275,17 +266,6 @@ LPWSTR resolve_folder(MSIPACKAGE *package, LPCWSTR name, BOOL source,
|
|||
path = build_directory_name(2, check_path, NULL);
|
||||
if (strcmpiW(path,check_path)!=0)
|
||||
MSI_SetPropertyW(package,cszTargetDir,path);
|
||||
|
||||
if (folder)
|
||||
{
|
||||
for (i = 0; i < package->loaded_folders; i++)
|
||||
{
|
||||
if (strcmpW(package->folders[i].Directory,name)==0)
|
||||
break;
|
||||
}
|
||||
*folder = &(package->folders[i]);
|
||||
}
|
||||
return path;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -300,81 +280,66 @@ LPWSTR resolve_folder(MSIPACKAGE *package, LPCWSTR name, BOOL source,
|
|||
*(p+1) = 0;
|
||||
}
|
||||
}
|
||||
if (folder)
|
||||
{
|
||||
for (i = 0; i < package->loaded_folders; i++)
|
||||
{
|
||||
if (strcmpW(package->folders[i].Directory,name)==0)
|
||||
break;
|
||||
}
|
||||
*folder = &(package->folders[i]);
|
||||
}
|
||||
return path;
|
||||
}
|
||||
if (folder)
|
||||
*folder = get_loaded_folder( package, name );
|
||||
return path;
|
||||
}
|
||||
|
||||
for (i = 0; i < package->loaded_folders; i++)
|
||||
{
|
||||
if (strcmpW(package->folders[i].Directory,name)==0)
|
||||
break;
|
||||
}
|
||||
|
||||
if (i >= package->loaded_folders)
|
||||
f = get_loaded_folder( package, name );
|
||||
if (!f)
|
||||
return NULL;
|
||||
|
||||
if (folder)
|
||||
*folder = &(package->folders[i]);
|
||||
*folder = f;
|
||||
|
||||
if (!source && package->folders[i].ResolvedTarget)
|
||||
if (!source && f->ResolvedTarget)
|
||||
{
|
||||
path = strdupW(package->folders[i].ResolvedTarget);
|
||||
path = strdupW( f->ResolvedTarget );
|
||||
TRACE(" already resolved to %s\n",debugstr_w(path));
|
||||
return path;
|
||||
}
|
||||
else if (source && package->folders[i].ResolvedSource)
|
||||
else if (source && f->ResolvedSource)
|
||||
{
|
||||
path = strdupW(package->folders[i].ResolvedSource);
|
||||
path = strdupW( f->ResolvedSource );
|
||||
TRACE(" (source)already resolved to %s\n",debugstr_w(path));
|
||||
return path;
|
||||
}
|
||||
else if (!source && package->folders[i].Property)
|
||||
else if (!source && f->Property)
|
||||
{
|
||||
path = build_directory_name(2, package->folders[i].Property, NULL);
|
||||
path = build_directory_name( 2, f->Property, NULL );
|
||||
|
||||
TRACE(" internally set to %s\n",debugstr_w(path));
|
||||
if (set_prop)
|
||||
MSI_SetPropertyW(package,name,path);
|
||||
MSI_SetPropertyW( package, name, path );
|
||||
return path;
|
||||
}
|
||||
|
||||
if (package->folders[i].ParentIndex >= 0)
|
||||
if (f->Parent)
|
||||
{
|
||||
LPWSTR parent = package->folders[package->folders[i].ParentIndex].Directory;
|
||||
LPWSTR parent = f->Parent->Directory;
|
||||
|
||||
TRACE(" ! Parent is %s\n", debugstr_w(parent));
|
||||
|
||||
p = resolve_folder(package, parent, source, set_prop, NULL);
|
||||
if (!source)
|
||||
{
|
||||
TRACE(" TargetDefault = %s\n",
|
||||
debugstr_w(package->folders[i].TargetDefault));
|
||||
TRACE(" TargetDefault = %s\n", debugstr_w(f->TargetDefault));
|
||||
|
||||
path = build_directory_name(3, p,
|
||||
package->folders[i].TargetDefault, NULL);
|
||||
package->folders[i].ResolvedTarget = strdupW(path);
|
||||
path = build_directory_name( 3, p, f->TargetDefault, NULL );
|
||||
f->ResolvedTarget = strdupW( path );
|
||||
TRACE(" resolved into %s\n",debugstr_w(path));
|
||||
if (set_prop)
|
||||
MSI_SetPropertyW(package,name,path);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (package->folders[i].SourceDefault &&
|
||||
package->folders[i].SourceDefault[0]!='.')
|
||||
path = build_directory_name(3, p, package->folders[i].SourceDefault, NULL);
|
||||
if (f->SourceDefault && f->SourceDefault[0]!='.')
|
||||
path = build_directory_name( 3, p, f->SourceDefault, NULL );
|
||||
else
|
||||
path = strdupW(p);
|
||||
TRACE(" (source)resolved into %s\n",debugstr_w(path));
|
||||
package->folders[i].ResolvedSource = strdupW(path);
|
||||
f->ResolvedSource = strdupW( path );
|
||||
}
|
||||
HeapFree(GetProcessHeap(),0,p);
|
||||
}
|
||||
|
@ -437,89 +402,113 @@ UINT schedule_action(MSIPACKAGE *package, UINT script, LPCWSTR action)
|
|||
|
||||
static void remove_tracked_tempfiles(MSIPACKAGE* package)
|
||||
{
|
||||
DWORD i;
|
||||
MSIFILE *file;
|
||||
|
||||
if (!package)
|
||||
return;
|
||||
|
||||
for (i = 0; i < package->loaded_files; i++)
|
||||
LIST_FOR_EACH_ENTRY( file, &package->files, MSIFILE, entry )
|
||||
{
|
||||
if (package->files[i].Temporary)
|
||||
if (file->Temporary)
|
||||
{
|
||||
TRACE("Cleaning up %s\n",debugstr_w(package->files[i].TargetPath));
|
||||
DeleteFileW(package->files[i].TargetPath);
|
||||
TRACE("Cleaning up %s\n", debugstr_w( file->TargetPath ));
|
||||
DeleteFileW( file->TargetPath );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
static void free_feature( MSIFEATURE *feature )
|
||||
{
|
||||
struct list *item, *cursor;
|
||||
|
||||
LIST_FOR_EACH_SAFE( item, cursor, &feature->Components )
|
||||
{
|
||||
ComponentList *cl = LIST_ENTRY( item, ComponentList, entry );
|
||||
list_remove( &cl->entry );
|
||||
HeapFree( GetProcessHeap(), 0, cl );
|
||||
}
|
||||
HeapFree( GetProcessHeap(), 0, feature );
|
||||
}
|
||||
|
||||
|
||||
/* Called when the package is being closed */
|
||||
void ACTION_free_package_structures( MSIPACKAGE* package)
|
||||
{
|
||||
INT i;
|
||||
struct list *item, *cursor;
|
||||
|
||||
TRACE("Freeing package action data\n");
|
||||
|
||||
remove_tracked_tempfiles(package);
|
||||
|
||||
/* No dynamic buffers in features */
|
||||
if (package->features && package->loaded_features > 0)
|
||||
HeapFree(GetProcessHeap(),0,package->features);
|
||||
|
||||
for (i = 0; i < package->loaded_folders; i++)
|
||||
LIST_FOR_EACH_SAFE( item, cursor, &package->features )
|
||||
{
|
||||
HeapFree(GetProcessHeap(),0,package->folders[i].Directory);
|
||||
HeapFree(GetProcessHeap(),0,package->folders[i].TargetDefault);
|
||||
HeapFree(GetProcessHeap(),0,package->folders[i].SourceDefault);
|
||||
HeapFree(GetProcessHeap(),0,package->folders[i].ResolvedTarget);
|
||||
HeapFree(GetProcessHeap(),0,package->folders[i].ResolvedSource);
|
||||
HeapFree(GetProcessHeap(),0,package->folders[i].Property);
|
||||
}
|
||||
if (package->folders && package->loaded_folders > 0)
|
||||
HeapFree(GetProcessHeap(),0,package->folders);
|
||||
|
||||
for (i = 0; i < package->loaded_components; i++)
|
||||
HeapFree(GetProcessHeap(),0,package->components[i].FullKeypath);
|
||||
|
||||
if (package->components && package->loaded_components > 0)
|
||||
HeapFree(GetProcessHeap(),0,package->components);
|
||||
|
||||
for (i = 0; i < package->loaded_files; i++)
|
||||
{
|
||||
HeapFree(GetProcessHeap(),0,package->files[i].File);
|
||||
HeapFree(GetProcessHeap(),0,package->files[i].FileName);
|
||||
HeapFree(GetProcessHeap(),0,package->files[i].ShortName);
|
||||
HeapFree(GetProcessHeap(),0,package->files[i].Version);
|
||||
HeapFree(GetProcessHeap(),0,package->files[i].Language);
|
||||
HeapFree(GetProcessHeap(),0,package->files[i].SourcePath);
|
||||
HeapFree(GetProcessHeap(),0,package->files[i].TargetPath);
|
||||
MSIFEATURE *feature = LIST_ENTRY( item, MSIFEATURE, entry );
|
||||
list_remove( &feature->entry );
|
||||
free_feature( feature );
|
||||
}
|
||||
|
||||
if (package->files && package->loaded_files > 0)
|
||||
HeapFree(GetProcessHeap(),0,package->files);
|
||||
LIST_FOR_EACH_SAFE( item, cursor, &package->folders )
|
||||
{
|
||||
MSIFOLDER *folder = LIST_ENTRY( item, MSIFOLDER, entry );
|
||||
|
||||
list_remove( &folder->entry );
|
||||
HeapFree( GetProcessHeap(), 0, folder->Directory );
|
||||
HeapFree( GetProcessHeap(), 0, folder->TargetDefault );
|
||||
HeapFree( GetProcessHeap(), 0, folder->SourceDefault );
|
||||
HeapFree( GetProcessHeap(), 0, folder->ResolvedTarget );
|
||||
HeapFree( GetProcessHeap(), 0, folder->ResolvedSource );
|
||||
HeapFree( GetProcessHeap(), 0, folder->Property );
|
||||
}
|
||||
|
||||
LIST_FOR_EACH_SAFE( item, cursor, &package->components )
|
||||
{
|
||||
MSICOMPONENT *comp = LIST_ENTRY( item, MSICOMPONENT, entry );
|
||||
|
||||
list_remove( &comp->entry );
|
||||
HeapFree( GetProcessHeap(), 0, comp->FullKeypath );
|
||||
HeapFree( GetProcessHeap(), 0, comp );
|
||||
}
|
||||
|
||||
LIST_FOR_EACH_SAFE( item, cursor, &package->files )
|
||||
{
|
||||
MSIFILE *file = LIST_ENTRY( item, MSIFILE, entry );
|
||||
|
||||
list_remove( &file->entry );
|
||||
HeapFree( GetProcessHeap(), 0, file->File );
|
||||
HeapFree( GetProcessHeap(), 0, file->FileName );
|
||||
HeapFree( GetProcessHeap(), 0, file->ShortName );
|
||||
HeapFree( GetProcessHeap(), 0, file->Version );
|
||||
HeapFree( GetProcessHeap(), 0, file->Language );
|
||||
HeapFree( GetProcessHeap(), 0, file->SourcePath );
|
||||
HeapFree( GetProcessHeap(), 0, file->TargetPath );
|
||||
HeapFree( GetProcessHeap(), 0, file );
|
||||
}
|
||||
|
||||
/* clean up extension, progid, class and verb structures */
|
||||
for (i = 0; i < package->loaded_classes; i++)
|
||||
LIST_FOR_EACH_SAFE( item, cursor, &package->classes )
|
||||
{
|
||||
HeapFree(GetProcessHeap(),0,package->classes[i].Description);
|
||||
HeapFree(GetProcessHeap(),0,package->classes[i].FileTypeMask);
|
||||
HeapFree(GetProcessHeap(),0,package->classes[i].IconPath);
|
||||
HeapFree(GetProcessHeap(),0,package->classes[i].DefInprocHandler);
|
||||
HeapFree(GetProcessHeap(),0,package->classes[i].DefInprocHandler32);
|
||||
HeapFree(GetProcessHeap(),0,package->classes[i].Argument);
|
||||
HeapFree(GetProcessHeap(),0,package->classes[i].ProgIDText);
|
||||
MSICLASS *cls = LIST_ENTRY( item, MSICLASS, entry );
|
||||
|
||||
list_remove( &cls->entry );
|
||||
HeapFree( GetProcessHeap(), 0, cls->Description );
|
||||
HeapFree( GetProcessHeap(), 0, cls->FileTypeMask );
|
||||
HeapFree( GetProcessHeap(), 0, cls->IconPath );
|
||||
HeapFree( GetProcessHeap(), 0, cls->DefInprocHandler );
|
||||
HeapFree( GetProcessHeap(), 0, cls->DefInprocHandler32 );
|
||||
HeapFree( GetProcessHeap(), 0, cls->Argument );
|
||||
HeapFree( GetProcessHeap(), 0, cls->ProgIDText );
|
||||
HeapFree( GetProcessHeap(), 0, cls );
|
||||
}
|
||||
|
||||
if (package->classes && package->loaded_classes > 0)
|
||||
HeapFree(GetProcessHeap(),0,package->classes);
|
||||
|
||||
for (i = 0; i < package->loaded_extensions; i++)
|
||||
LIST_FOR_EACH_SAFE( item, cursor, &package->extensions )
|
||||
{
|
||||
HeapFree(GetProcessHeap(),0,package->extensions[i].ProgIDText);
|
||||
}
|
||||
MSIEXTENSION *ext = LIST_ENTRY( item, MSIEXTENSION, entry );
|
||||
|
||||
if (package->extensions && package->loaded_extensions > 0)
|
||||
HeapFree(GetProcessHeap(),0,package->extensions);
|
||||
list_remove( &ext->entry );
|
||||
HeapFree( GetProcessHeap(), 0, ext->ProgIDText );
|
||||
HeapFree( GetProcessHeap(), 0, ext );
|
||||
}
|
||||
|
||||
for (i = 0; i < package->loaded_progids; i++)
|
||||
{
|
||||
|
@ -541,22 +530,26 @@ void ACTION_free_package_structures( MSIPACKAGE* package)
|
|||
if (package->verbs && package->loaded_verbs > 0)
|
||||
HeapFree(GetProcessHeap(),0,package->verbs);
|
||||
|
||||
for (i = 0; i < package->loaded_mimes; i++)
|
||||
HeapFree(GetProcessHeap(),0,package->mimes[i].ContentType);
|
||||
|
||||
if (package->mimes && package->loaded_mimes > 0)
|
||||
HeapFree(GetProcessHeap(),0,package->mimes);
|
||||
|
||||
for (i = 0; i < package->loaded_appids; i++)
|
||||
LIST_FOR_EACH_SAFE( item, cursor, &package->mimes )
|
||||
{
|
||||
HeapFree(GetProcessHeap(),0,package->appids[i].RemoteServerName);
|
||||
HeapFree(GetProcessHeap(),0,package->appids[i].LocalServer);
|
||||
HeapFree(GetProcessHeap(),0,package->appids[i].ServiceParameters);
|
||||
HeapFree(GetProcessHeap(),0,package->appids[i].DllSurrogate);
|
||||
MSIMIME *mt = LIST_ENTRY( item, MSIMIME, entry );
|
||||
|
||||
list_remove( &mt->entry );
|
||||
HeapFree( GetProcessHeap(), 0, mt->ContentType );
|
||||
HeapFree( GetProcessHeap(), 0, mt );
|
||||
}
|
||||
|
||||
if (package->appids && package->loaded_appids > 0)
|
||||
HeapFree(GetProcessHeap(),0,package->appids);
|
||||
LIST_FOR_EACH_SAFE( item, cursor, &package->appids )
|
||||
{
|
||||
MSIAPPID *appid = LIST_ENTRY( item, MSIAPPID, entry );
|
||||
|
||||
list_remove( &appid->entry );
|
||||
HeapFree( GetProcessHeap(), 0, appid->RemoteServerName );
|
||||
HeapFree( GetProcessHeap(), 0, appid->LocalServer );
|
||||
HeapFree( GetProcessHeap(), 0, appid->ServiceParameters );
|
||||
HeapFree( GetProcessHeap(), 0, appid->DllSurrogate );
|
||||
HeapFree( GetProcessHeap(), 0, appid );
|
||||
}
|
||||
|
||||
if (package->script)
|
||||
{
|
||||
|
@ -753,25 +746,24 @@ void ui_actiondata(MSIPACKAGE *package, LPCWSTR action, MSIRECORD * record)
|
|||
msiobj_release(&row->hdr);
|
||||
}
|
||||
|
||||
BOOL ACTION_VerifyComponentForAction(MSIPACKAGE* package, INT index,
|
||||
BOOL ACTION_VerifyComponentForAction(MSIPACKAGE* package, MSICOMPONENT* comp,
|
||||
INSTALLSTATE check )
|
||||
{
|
||||
if (package->components[index].Installed == check)
|
||||
if (comp->Installed == check)
|
||||
return FALSE;
|
||||
|
||||
if (package->components[index].ActionRequest == check)
|
||||
if (comp->ActionRequest == check)
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ACTION_VerifyFeatureForAction(MSIPACKAGE* package, INT index,
|
||||
INSTALLSTATE check )
|
||||
BOOL ACTION_VerifyFeatureForAction( MSIFEATURE* feature, INSTALLSTATE check )
|
||||
{
|
||||
if (package->features[index].Installed == check)
|
||||
if (feature->Installed == check)
|
||||
return FALSE;
|
||||
|
||||
if (package->features[index].ActionRequest == check)
|
||||
if (feature->ActionRequest == check)
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
|
@ -844,21 +836,20 @@ LPWSTR create_component_advertise_string(MSIPACKAGE* package,
|
|||
/* update compoennt state based on a feature change */
|
||||
void ACTION_UpdateComponentStates(MSIPACKAGE *package, LPCWSTR szFeature)
|
||||
{
|
||||
int i;
|
||||
INSTALLSTATE newstate;
|
||||
MSIFEATURE *feature;
|
||||
ComponentList *cl;
|
||||
|
||||
i = get_loaded_feature(package,szFeature);
|
||||
if (i < 0)
|
||||
feature = get_loaded_feature(package,szFeature);
|
||||
if (!feature)
|
||||
return;
|
||||
|
||||
feature = &package->features[i];
|
||||
newstate = feature->ActionRequest;
|
||||
|
||||
for( i = 0; i < feature->ComponentCount; i++)
|
||||
LIST_FOR_EACH_ENTRY( cl, &feature->Components, ComponentList, entry )
|
||||
{
|
||||
MSICOMPONENT* component = &package->components[feature->Components[i]];
|
||||
|
||||
MSICOMPONENT* component = cl->component;
|
||||
|
||||
TRACE("MODIFYING(%i): Component %s (Installed %i, Action %i, Request %i)\n",
|
||||
newstate, debugstr_w(component->Component), component->Installed,
|
||||
component->Action, component->ActionRequest);
|
||||
|
@ -874,30 +865,31 @@ void ACTION_UpdateComponentStates(MSIPACKAGE *package, LPCWSTR szFeature)
|
|||
}
|
||||
else
|
||||
{
|
||||
int j,k;
|
||||
ComponentList *clist;
|
||||
MSIFEATURE *f;
|
||||
|
||||
component->ActionRequest = newstate;
|
||||
component->Action = newstate;
|
||||
|
||||
/*if any other feature wants is local we need to set it local*/
|
||||
for (j = 0;
|
||||
j < package->loaded_features &&
|
||||
component->ActionRequest != INSTALLSTATE_LOCAL;
|
||||
j++)
|
||||
LIST_FOR_EACH_ENTRY( f, &package->features, MSIFEATURE, entry )
|
||||
{
|
||||
for (k = 0; k < package->features[j].ComponentCount; k++)
|
||||
if ( package->features[j].Components[k] ==
|
||||
feature->Components[i] )
|
||||
if ( component->ActionRequest != INSTALLSTATE_LOCAL )
|
||||
break;
|
||||
|
||||
LIST_FOR_EACH_ENTRY( clist, &f->Components, ComponentList, entry )
|
||||
{
|
||||
if ( clist->component == component )
|
||||
{
|
||||
if (package->features[j].ActionRequest ==
|
||||
INSTALLSTATE_LOCAL)
|
||||
if (f->ActionRequest == INSTALLSTATE_LOCAL)
|
||||
{
|
||||
TRACE("Saved by %s\n", debugstr_w(package->features[j].Feature));
|
||||
TRACE("Saved by %s\n", debugstr_w(f->Feature));
|
||||
component->ActionRequest = INSTALLSTATE_LOCAL;
|
||||
component->Action = INSTALLSTATE_LOCAL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@ err:
|
|||
static UINT INSERT_execute( struct tagMSIVIEW *view, MSIRECORD *record )
|
||||
{
|
||||
MSIINSERTVIEW *iv = (MSIINSERTVIEW*)view;
|
||||
UINT n, type, val, r, row, col_count = 0;
|
||||
UINT r, col_count = 0;
|
||||
MSIVIEW *sv;
|
||||
MSIRECORD *values = NULL;
|
||||
|
||||
|
@ -136,38 +136,13 @@ static UINT INSERT_execute( struct tagMSIVIEW *view, MSIRECORD *record )
|
|||
if( !values )
|
||||
goto err;
|
||||
|
||||
row = -1;
|
||||
r = sv->ops->insert_row( sv, &row );
|
||||
TRACE("insert_row returned %x\n", r);
|
||||
if( r )
|
||||
goto err;
|
||||
|
||||
for( n = 1; n <= col_count; n++ )
|
||||
{
|
||||
r = sv->ops->get_column_info( sv, n, NULL, &type );
|
||||
if( r )
|
||||
break;
|
||||
|
||||
if( type & MSITYPE_STRING )
|
||||
{
|
||||
const WCHAR *str = MSI_RecordGetString( values, n );
|
||||
val = msi_addstringW( iv->db->strings, 0, str, -1, 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
val = MSI_RecordGetInteger( values, n );
|
||||
val |= 0x8000;
|
||||
}
|
||||
r = sv->ops->set_int( sv, row, n, val );
|
||||
if( r )
|
||||
break;
|
||||
}
|
||||
r = sv->ops->insert_row( sv, values );
|
||||
|
||||
err:
|
||||
if( values )
|
||||
msiobj_release( &values->hdr );
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -263,7 +263,6 @@ UINT WINAPI MsiSetTargetPathA(MSIHANDLE hInstall, LPCSTR szFolder,
|
|||
UINT MSI_SetTargetPathW(MSIPACKAGE *package, LPCWSTR szFolder,
|
||||
LPCWSTR szFolderPath)
|
||||
{
|
||||
DWORD i;
|
||||
DWORD attrib;
|
||||
LPWSTR path = NULL;
|
||||
LPWSTR path2 = NULL;
|
||||
|
@ -312,16 +311,17 @@ UINT MSI_SetTargetPathW(MSIPACKAGE *package, LPCWSTR szFolder,
|
|||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < package->loaded_folders; i++)
|
||||
MSIFOLDER *f;
|
||||
|
||||
LIST_FOR_EACH_ENTRY( f, &package->folders, MSIFOLDER, entry )
|
||||
{
|
||||
HeapFree(GetProcessHeap(),0,package->folders[i].ResolvedTarget);
|
||||
package->folders[i].ResolvedTarget=NULL;
|
||||
HeapFree( GetProcessHeap(),0,f->ResolvedTarget);
|
||||
f->ResolvedTarget=NULL;
|
||||
}
|
||||
|
||||
for (i = 0; i < package->loaded_folders; i++)
|
||||
LIST_FOR_EACH_ENTRY( f, &package->folders, MSIFOLDER, entry )
|
||||
{
|
||||
path2=resolve_folder(package, package->folders[i].Directory, FALSE,
|
||||
TRUE, NULL);
|
||||
path2 = resolve_folder(package, f->Directory, FALSE, TRUE, NULL);
|
||||
HeapFree(GetProcessHeap(),0,path2);
|
||||
}
|
||||
}
|
||||
|
@ -416,30 +416,29 @@ UINT WINAPI MsiSetFeatureStateA(MSIHANDLE hInstall, LPCSTR szFeature,
|
|||
UINT WINAPI MSI_SetFeatureStateW(MSIPACKAGE* package, LPCWSTR szFeature,
|
||||
INSTALLSTATE iState)
|
||||
{
|
||||
INT index, i;
|
||||
UINT rc = ERROR_SUCCESS;
|
||||
MSIFEATURE *feature, *child;
|
||||
|
||||
TRACE(" %s to %i\n",debugstr_w(szFeature), iState);
|
||||
|
||||
index = get_loaded_feature(package,szFeature);
|
||||
if (index < 0)
|
||||
feature = get_loaded_feature(package,szFeature);
|
||||
if (!feature)
|
||||
return ERROR_UNKNOWN_FEATURE;
|
||||
|
||||
if (iState == INSTALLSTATE_ADVERTISED &&
|
||||
package->features[index].Attributes &
|
||||
msidbFeatureAttributesDisallowAdvertise)
|
||||
feature->Attributes & msidbFeatureAttributesDisallowAdvertise)
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
|
||||
package->features[index].ActionRequest= iState;
|
||||
package->features[index].Action= iState;
|
||||
feature->ActionRequest = iState;
|
||||
feature->Action = iState;
|
||||
|
||||
ACTION_UpdateComponentStates(package,szFeature);
|
||||
|
||||
/* update all the features that are children of this feature */
|
||||
for (i = 0; i < package->loaded_features; i++)
|
||||
LIST_FOR_EACH_ENTRY( child, &package->features, MSIFEATURE, entry )
|
||||
{
|
||||
if (strcmpW(szFeature, package->features[i].Feature_Parent) == 0)
|
||||
MSI_SetFeatureStateW(package, package->features[i].Feature, iState);
|
||||
if (lstrcmpW(szFeature, child->Feature_Parent) == 0)
|
||||
MSI_SetFeatureStateW(package, child->Feature, iState);
|
||||
}
|
||||
|
||||
return rc;
|
||||
|
@ -487,19 +486,19 @@ UINT WINAPI MsiGetFeatureStateA(MSIHANDLE hInstall, LPSTR szFeature,
|
|||
UINT MSI_GetFeatureStateW(MSIPACKAGE *package, LPWSTR szFeature,
|
||||
INSTALLSTATE *piInstalled, INSTALLSTATE *piAction)
|
||||
{
|
||||
INT index;
|
||||
MSIFEATURE *feature;
|
||||
|
||||
index = get_loaded_feature(package,szFeature);
|
||||
if (index < 0)
|
||||
feature = get_loaded_feature(package,szFeature);
|
||||
if (!feature)
|
||||
return ERROR_UNKNOWN_FEATURE;
|
||||
|
||||
if (piInstalled)
|
||||
*piInstalled = package->features[index].Installed;
|
||||
*piInstalled = feature->Installed;
|
||||
|
||||
if (piAction)
|
||||
*piAction = package->features[index].Action;
|
||||
*piAction = feature->Action;
|
||||
|
||||
TRACE("returning %i %i\n",*piInstalled,*piAction);
|
||||
TRACE("returning %i %i\n", feature->Installed, feature->Action);
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
@ -524,6 +523,22 @@ piAction);
|
|||
return ret;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* MsiSetComponentStateA (MSI.@)
|
||||
*/
|
||||
UINT WINAPI MsiSetComponentStateA(MSIHANDLE hInstall, LPCSTR szComponent,
|
||||
INSTALLSTATE iState)
|
||||
{
|
||||
UINT rc;
|
||||
LPWSTR szwComponent = strdupAtoW(szComponent);
|
||||
|
||||
rc = MsiSetComponentStateW(hInstall, szwComponent, iState);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, szwComponent);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* MsiGetComponentStateA (MSI.@)
|
||||
*/
|
||||
|
@ -542,30 +557,62 @@ UINT WINAPI MsiGetComponentStateA(MSIHANDLE hInstall, LPSTR szComponent,
|
|||
return rc;
|
||||
}
|
||||
|
||||
static UINT MSI_SetComponentStateW(MSIPACKAGE *package, LPCWSTR szComponent,
|
||||
INSTALLSTATE iState)
|
||||
{
|
||||
MSICOMPONENT *comp;
|
||||
|
||||
TRACE("%p %s %d\n", package, debugstr_w(szComponent), iState);
|
||||
|
||||
comp = get_loaded_component(package, szComponent);
|
||||
if (!comp)
|
||||
return ERROR_UNKNOWN_COMPONENT;
|
||||
|
||||
comp->Installed = iState;
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
UINT MSI_GetComponentStateW(MSIPACKAGE *package, LPWSTR szComponent,
|
||||
INSTALLSTATE *piInstalled, INSTALLSTATE *piAction)
|
||||
{
|
||||
INT index;
|
||||
MSICOMPONENT *comp;
|
||||
|
||||
TRACE("%p %s %p %p\n", package, debugstr_w(szComponent), piInstalled,
|
||||
piAction);
|
||||
TRACE("%p %s %p %p\n", package, debugstr_w(szComponent),
|
||||
piInstalled, piAction);
|
||||
|
||||
index = get_loaded_component(package,szComponent);
|
||||
if (index < 0)
|
||||
comp = get_loaded_component(package,szComponent);
|
||||
if (!comp)
|
||||
return ERROR_UNKNOWN_COMPONENT;
|
||||
|
||||
if (piInstalled)
|
||||
*piInstalled = package->components[index].Installed;
|
||||
*piInstalled = comp->Installed;
|
||||
|
||||
if (piAction)
|
||||
*piAction = package->components[index].Action;
|
||||
*piAction = comp->Action;
|
||||
|
||||
TRACE("states (%i, %i)\n",
|
||||
(piInstalled)?*piInstalled:-1,(piAction)?*piAction:-1);
|
||||
TRACE("states (%i, %i)\n", comp->Installed, comp->Action );
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* MsiSetComponentStateW (MSI.@)
|
||||
*/
|
||||
UINT WINAPI MsiSetComponentStateW(MSIHANDLE hInstall, LPCWSTR szComponent,
|
||||
INSTALLSTATE iState)
|
||||
{
|
||||
MSIPACKAGE* package;
|
||||
UINT ret;
|
||||
|
||||
package = msihandle2msiinfo(hInstall, MSIHANDLETYPE_PACKAGE);
|
||||
if (!package)
|
||||
return ERROR_INVALID_HANDLE;
|
||||
ret = MSI_SetComponentStateW(package, szComponent, iState);
|
||||
msiobj_release(&package->hdr);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* MsiGetComponentStateW (MSI.@)
|
||||
*/
|
||||
|
|
|
@ -1342,7 +1342,7 @@ static IClassFactoryImpl Msi_CF = { &MsiCF_Vtbl };
|
|||
/******************************************************************
|
||||
* DllGetClassObject [MSI.@]
|
||||
*/
|
||||
HRESULT WINAPI MSI_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
{
|
||||
TRACE("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
|
||||
|
||||
|
@ -1361,7 +1361,7 @@ HRESULT WINAPI MSI_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
|||
/******************************************************************
|
||||
* DllGetVersion [MSI.@]
|
||||
*/
|
||||
HRESULT WINAPI MSI_DllGetVersion(DLLVERSIONINFO *pdvi)
|
||||
HRESULT WINAPI DllGetVersion(DLLVERSIONINFO *pdvi)
|
||||
{
|
||||
TRACE("%p\n",pdvi);
|
||||
|
||||
|
@ -1379,7 +1379,7 @@ HRESULT WINAPI MSI_DllGetVersion(DLLVERSIONINFO *pdvi)
|
|||
/******************************************************************
|
||||
* DllCanUnloadNow [MSI.@]
|
||||
*/
|
||||
BOOL WINAPI MSI_DllCanUnloadNow(void)
|
||||
HRESULT WINAPI DllCanUnloadNow(void)
|
||||
{
|
||||
return S_FALSE;
|
||||
}
|
||||
|
@ -1691,6 +1691,14 @@ UINT WINAPI MsiCollectUserInfoA(LPCSTR szProduct)
|
|||
return rc;
|
||||
}
|
||||
|
||||
UINT WINAPI MsiConfigureFeatureW(LPWSTR szProduct, LPWSTR szFeature, INSTALLSTATE eInstallState)
|
||||
{
|
||||
FIXME("%s %s %i\n", debugstr_w(szProduct), debugstr_w(szFeature), eInstallState);
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
UINT WINAPI MsiCreateAndVerifyInstallerDirectory(DWORD dwReserved)
|
||||
{
|
||||
WCHAR path[MAX_PATH];
|
||||
|
|
|
@ -1,236 +1,237 @@
|
|||
1 stdcall -private DllCanUnloadNow() MSI_DllCanUnloadNow
|
||||
2 stdcall -private DllGetClassObject(ptr ptr ptr) MSI_DllGetClassObject
|
||||
3 stdcall -private DllRegisterServer() MSI_DllRegisterServer
|
||||
4 stdcall -private DllUnregisterServer() MSI_DllUnregisterServer
|
||||
5 stdcall MsiAdvertiseProductA(str str str long)
|
||||
6 stdcall MsiAdvertiseProductW(wstr wstr wstr long)
|
||||
7 stdcall MsiCloseAllHandles()
|
||||
8 stdcall MsiCloseHandle(long)
|
||||
9 stdcall MsiCollectUserInfoA(str)
|
||||
10 stdcall MsiCollectUserInfoW(wstr)
|
||||
11 stub MsiConfigureFeatureA
|
||||
12 stub MsiConfigureFeatureFromDescriptorA
|
||||
13 stub MsiConfigureFeatureFromDescriptorW
|
||||
14 stub MsiConfigureFeatureW
|
||||
15 stdcall MsiConfigureProductA(str long long)
|
||||
16 stdcall MsiConfigureProductW(wstr long long)
|
||||
17 stdcall MsiCreateRecord(long)
|
||||
18 stdcall MsiDatabaseApplyTransformA(long str long)
|
||||
19 stdcall MsiDatabaseApplyTransformW(long wstr long)
|
||||
20 stdcall MsiDatabaseCommit(long)
|
||||
21 stdcall MsiDatabaseExportA(long str str str)
|
||||
22 stdcall MsiDatabaseExportW(long wstr wstr wstr)
|
||||
23 stdcall MsiDatabaseGenerateTransformA(long long str long long)
|
||||
24 stdcall MsiDatabaseGenerateTransformW(long long wstr long long)
|
||||
25 stdcall MsiDatabaseGetPrimaryKeysA(long str ptr)
|
||||
26 stdcall MsiDatabaseGetPrimaryKeysW(long wstr ptr)
|
||||
27 stdcall MsiDatabaseImportA(str str long)
|
||||
28 stdcall MsiDatabaseImportW(wstr wstr long)
|
||||
29 stub MsiDatabaseMergeA
|
||||
30 stub MsiDatabaseMergeW
|
||||
31 stdcall MsiDatabaseOpenViewA(long str ptr)
|
||||
32 stdcall MsiDatabaseOpenViewW(long wstr ptr)
|
||||
33 stdcall MsiDoActionA(long str)
|
||||
34 stdcall MsiDoActionW(long wstr)
|
||||
35 stdcall MsiEnableUIPreview(long ptr)
|
||||
36 stdcall MsiEnumClientsA(str long ptr)
|
||||
37 stdcall MsiEnumClientsW(wstr long ptr)
|
||||
38 stdcall MsiEnumComponentQualifiersA(str long str ptr str ptr)
|
||||
39 stdcall MsiEnumComponentQualifiersW(wstr long wstr ptr wstr ptr)
|
||||
40 stdcall MsiEnumComponentsA(long ptr)
|
||||
41 stdcall MsiEnumComponentsW(long ptr)
|
||||
42 stdcall MsiEnumFeaturesA(str long ptr ptr)
|
||||
43 stdcall MsiEnumFeaturesW(wstr long ptr ptr)
|
||||
44 stdcall MsiEnumProductsA(long ptr)
|
||||
45 stdcall MsiEnumProductsW(long ptr)
|
||||
46 stdcall MsiEvaluateConditionA(long str)
|
||||
47 stdcall MsiEvaluateConditionW(long wstr)
|
||||
48 stub MsiGetLastErrorRecord
|
||||
49 stdcall MsiGetActiveDatabase(long)
|
||||
50 stdcall MsiGetComponentStateA(long str ptr ptr)
|
||||
51 stdcall MsiGetComponentStateW(long wstr ptr ptr)
|
||||
52 stub MsiGetDatabaseState
|
||||
53 stub MsiGetFeatureCostA
|
||||
54 stub MsiGetFeatureCostW
|
||||
55 stub MsiGetFeatureInfoA
|
||||
56 stub MsiGetFeatureInfoW
|
||||
57 stdcall MsiGetFeatureStateA(long str ptr ptr)
|
||||
58 stdcall MsiGetFeatureStateW(long wstr ptr ptr)
|
||||
59 stdcall MsiGetFeatureUsageA(str str ptr ptr)
|
||||
60 stdcall MsiGetFeatureUsageW(wstr wstr ptr ptr)
|
||||
61 stub MsiGetFeatureValidStatesA
|
||||
62 stub MsiGetFeatureValidStatesW
|
||||
63 stdcall MsiGetLanguage(long)
|
||||
64 stdcall MsiGetMode(long long)
|
||||
65 stdcall MsiGetProductCodeA(str str)
|
||||
66 stdcall MsiGetProductCodeW(wstr wstr)
|
||||
67 stdcall MsiGetProductInfoA(str str str long)
|
||||
68 stub MsiGetProductInfoFromScriptA
|
||||
69 stub MsiGetProductInfoFromScriptW
|
||||
70 stdcall MsiGetProductInfoW(wstr wstr wstr long)
|
||||
71 stdcall MsiGetProductPropertyA(long str ptr ptr)
|
||||
72 stdcall MsiGetProductPropertyW(long wstr ptr ptr)
|
||||
73 stdcall MsiGetPropertyA(ptr str str ptr)
|
||||
74 stdcall MsiGetPropertyW(ptr wstr wstr ptr)
|
||||
75 stdcall MsiGetSourcePathA(long str ptr ptr)
|
||||
76 stdcall MsiGetSourcePathW(long wstr ptr ptr)
|
||||
77 stdcall MsiGetSummaryInformationA(long str long ptr)
|
||||
78 stdcall MsiGetSummaryInformationW(long wstr long ptr)
|
||||
79 stdcall MsiGetTargetPathA(long str ptr ptr)
|
||||
80 stdcall MsiGetTargetPathW(long wstr ptr ptr)
|
||||
81 stdcall MsiGetUserInfoA(str ptr ptr ptr ptr ptr ptr)
|
||||
82 stdcall MsiGetUserInfoW(wstr ptr ptr ptr ptr ptr ptr)
|
||||
83 stub MsiInstallMissingComponentA
|
||||
84 stub MsiInstallMissingComponentW
|
||||
85 stub MsiInstallMissingFileA
|
||||
86 stub MsiInstallMissingFileW
|
||||
87 stdcall MsiInstallProductA(str str)
|
||||
88 stdcall MsiInstallProductW(wstr wstr)
|
||||
89 stdcall MsiLocateComponentA(str ptr long)
|
||||
90 stdcall MsiLocateComponentW(wstr ptr long)
|
||||
91 stdcall MsiOpenDatabaseA(str str ptr)
|
||||
92 stdcall MsiOpenDatabaseW(wstr wstr ptr)
|
||||
93 stdcall MsiOpenPackageA(str ptr)
|
||||
94 stdcall MsiOpenPackageW(wstr ptr)
|
||||
95 stdcall MsiOpenProductA(str ptr)
|
||||
96 stdcall MsiOpenProductW(wstr ptr)
|
||||
97 stdcall MsiPreviewBillboardA(long str str)
|
||||
98 stdcall MsiPreviewBillboardW(long wstr wstr)
|
||||
99 stdcall MsiPreviewDialogA(long str)
|
||||
100 stdcall MsiPreviewDialogW(long wstr)
|
||||
101 stub MsiProcessAdvertiseScriptA
|
||||
102 stub MsiProcessAdvertiseScriptW
|
||||
103 stdcall MsiProcessMessage(long long long)
|
||||
104 stub MsiProvideComponentA
|
||||
105 stdcall MsiProvideComponentFromDescriptorA(str ptr ptr ptr)
|
||||
106 stdcall MsiProvideComponentFromDescriptorW(wstr ptr ptr ptr)
|
||||
107 stub MsiProvideComponentW
|
||||
108 stdcall MsiProvideQualifiedComponentA(str str long ptr ptr)
|
||||
109 stdcall MsiProvideQualifiedComponentW(str str long ptr ptr)
|
||||
110 stdcall MsiQueryFeatureStateA(str str)
|
||||
111 stdcall MsiQueryFeatureStateW(wstr wstr)
|
||||
112 stdcall MsiQueryProductStateA(str)
|
||||
113 stdcall MsiQueryProductStateW(wstr)
|
||||
114 stdcall MsiRecordDataSize(long long)
|
||||
115 stdcall MsiRecordGetFieldCount(long)
|
||||
116 stdcall MsiRecordGetInteger(long long)
|
||||
117 stdcall MsiRecordGetStringA(long long ptr ptr)
|
||||
118 stdcall MsiRecordGetStringW(long long ptr ptr)
|
||||
119 stdcall MsiRecordIsNull(long long)
|
||||
120 stdcall MsiRecordReadStream(long long ptr ptr)
|
||||
121 stdcall MsiRecordSetInteger(long long long)
|
||||
122 stdcall MsiRecordSetStreamA(long long str)
|
||||
123 stdcall MsiRecordSetStreamW(long long wstr)
|
||||
124 stdcall MsiRecordSetStringA(long long str)
|
||||
125 stdcall MsiRecordSetStringW(long long wstr)
|
||||
126 stdcall MsiReinstallFeatureA(str str long)
|
||||
127 stub MsiReinstallFeatureFromDescriptorA
|
||||
128 stub MsiReinstallFeatureFromDescriptorW
|
||||
129 stdcall MsiReinstallFeatureW(wstr wstr long)
|
||||
130 stdcall MsiReinstallProductA(str long)
|
||||
131 stdcall MsiReinstallProductW(wstr long)
|
||||
132 stub MsiSequenceA
|
||||
133 stub MsiSequenceW
|
||||
134 stub MsiSetComponentStateA
|
||||
135 stub MsiSetComponentStateW
|
||||
136 stdcall MsiSetExternalUIA(ptr long ptr)
|
||||
137 stdcall MsiSetExternalUIW(ptr long ptr)
|
||||
138 stdcall MsiSetFeatureStateA(long str long)
|
||||
139 stdcall MsiSetFeatureStateW(long wstr long)
|
||||
140 stub MsiSetInstallLevel
|
||||
141 stdcall MsiSetInternalUI(long ptr)
|
||||
142 stub MsiVerifyDiskSpace
|
||||
143 stub MsiSetMode
|
||||
144 stdcall MsiSetPropertyA(long str str)
|
||||
145 stdcall MsiSetPropertyW(long wstr wstr)
|
||||
146 stdcall MsiSetTargetPathA(long str str)
|
||||
147 stdcall MsiSetTargetPathW(long wstr wstr)
|
||||
148 stdcall MsiSummaryInfoGetPropertyA(long long ptr ptr ptr ptr ptr)
|
||||
149 stdcall MsiSummaryInfoGetPropertyCount(long ptr)
|
||||
150 stdcall MsiSummaryInfoGetPropertyW(long long ptr ptr ptr ptr ptr)
|
||||
151 stdcall MsiSummaryInfoPersist(long)
|
||||
152 stdcall MsiSummaryInfoSetPropertyA(long long long long ptr str)
|
||||
153 stdcall MsiSummaryInfoSetPropertyW(long long long long ptr wstr)
|
||||
154 stdcall MsiUseFeatureA(str str)
|
||||
155 stdcall MsiUseFeatureW(wstr wstr)
|
||||
156 stdcall MsiVerifyPackageA(str)
|
||||
157 stdcall MsiVerifyPackageW(wstr)
|
||||
158 stdcall MsiViewClose(long)
|
||||
159 stdcall MsiViewExecute(long long)
|
||||
160 stdcall MsiViewFetch(long ptr)
|
||||
161 stdcall MsiViewGetErrorA(long ptr ptr)
|
||||
162 stdcall MsiViewGetErrorW(long ptr ptr)
|
||||
163 stdcall MsiViewModify(long long long)
|
||||
164 stdcall MsiDatabaseIsTablePersistentA(long str)
|
||||
165 stdcall MsiDatabaseIsTablePersistentW(long wstr)
|
||||
166 stdcall MsiViewGetColumnInfo(long long ptr)
|
||||
167 stdcall MsiRecordClearData(long)
|
||||
168 stdcall MsiEnableLogA(long str long)
|
||||
169 stdcall MsiEnableLogW(long wstr long)
|
||||
170 stdcall MsiFormatRecordA(long long ptr ptr)
|
||||
171 stdcall MsiFormatRecordW(long long ptr ptr)
|
||||
172 stdcall MsiGetComponentPathA(str str ptr ptr)
|
||||
173 stdcall MsiGetComponentPathW(wstr wstr ptr ptr)
|
||||
174 stdcall MsiApplyPatchA(str str long str)
|
||||
175 stdcall MsiApplyPatchW(wstr wstr long wstr)
|
||||
176 stub MsiAdvertiseScriptA
|
||||
177 stub MsiAdvertiseScriptW
|
||||
178 stub MsiGetPatchInfoA
|
||||
179 stub MsiGetPatchInfoW
|
||||
180 stub MsiEnumPatchesA
|
||||
181 stub MsiEnumPatchesW
|
||||
182 stdcall DllGetVersion(ptr) MSI_DllGetVersion
|
||||
183 stub MsiGetProductCodeFromPackageCodeA
|
||||
184 stub MsiGetProductCodeFromPackageCodeW
|
||||
185 stub MsiCreateTransformSummaryInfoA
|
||||
186 stub MsiCreateTransformSummaryInfoW
|
||||
187 stub MsiQueryFeatureStateFromDescriptorA
|
||||
188 stub MsiQueryFeatureStateFromDescriptorW
|
||||
189 stdcall MsiConfigureProductExA(str long long str)
|
||||
190 stdcall MsiConfigureProductExW(wstr long long wstr)
|
||||
191 stub MsiInvalidateFeatureCache
|
||||
192 stdcall MsiUseFeatureExA(str str long long)
|
||||
193 stdcall MsiUseFeatureExW(wstr wstr long long)
|
||||
194 stdcall MsiGetFileVersionA(str str ptr str ptr)
|
||||
195 stdcall MsiGetFileVersionW(wstr wstr ptr wstr ptr)
|
||||
196 stdcall MsiLoadStringA(long long long long long)
|
||||
197 stdcall MsiLoadStringW(long long long long long)
|
||||
198 stdcall MsiMessageBoxA(long long long long long long)
|
||||
199 stdcall MsiMessageBoxW(long long long long long long)
|
||||
200 stdcall MsiDecomposeDescriptorA(str ptr ptr ptr ptr)
|
||||
201 stdcall MsiDecomposeDescriptorW(wstr ptr ptr ptr ptr)
|
||||
202 stub MsiProvideQualifiedComponentExA
|
||||
203 stdcall MsiProvideQualifiedComponentExW(wstr wstr long wstr long long ptr ptr)
|
||||
204 stdcall MsiEnumRelatedProductsA(str long long ptr)
|
||||
205 stdcall MsiEnumRelatedProductsW(wstr long long ptr)
|
||||
206 stub MsiSetFeatureAttributesA
|
||||
207 stub MsiSetFeatureAttributesW
|
||||
208 stub MsiSourceListClearAllA
|
||||
209 stub MsiSourceListClearAllW
|
||||
210 stub MsiSourceListAddSourceA
|
||||
211 stub MsiSourceListAddSourceW
|
||||
212 stub MsiSourceListForceResolutionA
|
||||
213 stub MsiSourceListForceResolutionW
|
||||
214 stub MsiIsProductElevatedA
|
||||
215 stub MsiIsProductElevatedW
|
||||
216 stdcall MsiGetShortcutTargetA(str ptr ptr ptr)
|
||||
217 stdcall MsiGetShortcutTargetW(wstr ptr ptr ptr)
|
||||
218 stub MsiGetFileHashA
|
||||
219 stub MsiGetFileHashW
|
||||
220 stub MsiEnumComponentCostsA
|
||||
221 stub MsiEnumComponentCostsW
|
||||
222 stdcall MsiCreateAndVerifyInstallerDirectory(long)
|
||||
223 stdcall MsiGetFileSignatureInformationA(str long ptr ptr ptr)
|
||||
224 stdcall MsiGetFileSignatureInformationW(wstr long ptr ptr ptr)
|
||||
225 stdcall MsiProvideAssemblyA(str str long long str ptr)
|
||||
226 stdcall MsiProvideAssemblyW(wstr wstr long long wstr ptr)
|
||||
227 stdcall MsiAdvertiseProductExA(str str str long long long)
|
||||
228 stdcall MsiAdvertiseProductExW(wstr wstr wstr long long long)
|
||||
229 stub MsiNotifySidChangeA
|
||||
230 stub MsiNotifySidChangeW
|
||||
231 stdcall MsiOpenPackageExA(str long ptr)
|
||||
232 stdcall MsiOpenPackageExW(wstr long ptr)
|
||||
233 stub MsiDeleteUserDataA
|
||||
234 stub MsiDeleteUserDataW
|
||||
235 stub Migrate10CachedPackagesA
|
||||
236 stub Migrate10CachedPackagesW
|
||||
5 stdcall MsiAdvertiseProductA(str str str long)
|
||||
6 stdcall MsiAdvertiseProductW(wstr wstr wstr long)
|
||||
7 stdcall MsiCloseAllHandles()
|
||||
8 stdcall MsiCloseHandle(long)
|
||||
9 stdcall MsiCollectUserInfoA(str)
|
||||
10 stdcall MsiCollectUserInfoW(wstr)
|
||||
11 stub MsiConfigureFeatureA
|
||||
12 stub MsiConfigureFeatureFromDescriptorA
|
||||
13 stub MsiConfigureFeatureFromDescriptorW
|
||||
14 stdcall MsiConfigureFeatureW(str str ptr)
|
||||
15 stdcall MsiConfigureProductA(str long long)
|
||||
16 stdcall MsiConfigureProductW(wstr long long)
|
||||
17 stdcall MsiCreateRecord(long)
|
||||
18 stdcall MsiDatabaseApplyTransformA(long str long)
|
||||
19 stdcall MsiDatabaseApplyTransformW(long wstr long)
|
||||
20 stdcall MsiDatabaseCommit(long)
|
||||
21 stdcall MsiDatabaseExportA(long str str str)
|
||||
22 stdcall MsiDatabaseExportW(long wstr wstr wstr)
|
||||
23 stdcall MsiDatabaseGenerateTransformA(long long str long long)
|
||||
24 stdcall MsiDatabaseGenerateTransformW(long long wstr long long)
|
||||
25 stdcall MsiDatabaseGetPrimaryKeysA(long str ptr)
|
||||
26 stdcall MsiDatabaseGetPrimaryKeysW(long wstr ptr)
|
||||
27 stdcall MsiDatabaseImportA(str str long)
|
||||
28 stdcall MsiDatabaseImportW(wstr wstr long)
|
||||
29 stub MsiDatabaseMergeA
|
||||
30 stub MsiDatabaseMergeW
|
||||
31 stdcall MsiDatabaseOpenViewA(long str ptr)
|
||||
32 stdcall MsiDatabaseOpenViewW(long wstr ptr)
|
||||
33 stdcall MsiDoActionA(long str)
|
||||
34 stdcall MsiDoActionW(long wstr)
|
||||
35 stdcall MsiEnableUIPreview(long ptr)
|
||||
36 stdcall MsiEnumClientsA(str long ptr)
|
||||
37 stdcall MsiEnumClientsW(wstr long ptr)
|
||||
38 stdcall MsiEnumComponentQualifiersA(str long str ptr str ptr)
|
||||
39 stdcall MsiEnumComponentQualifiersW(wstr long wstr ptr wstr ptr)
|
||||
40 stdcall MsiEnumComponentsA(long ptr)
|
||||
41 stdcall MsiEnumComponentsW(long ptr)
|
||||
42 stdcall MsiEnumFeaturesA(str long ptr ptr)
|
||||
43 stdcall MsiEnumFeaturesW(wstr long ptr ptr)
|
||||
44 stdcall MsiEnumProductsA(long ptr)
|
||||
45 stdcall MsiEnumProductsW(long ptr)
|
||||
46 stdcall MsiEvaluateConditionA(long str)
|
||||
47 stdcall MsiEvaluateConditionW(long wstr)
|
||||
48 stub MsiGetLastErrorRecord
|
||||
49 stdcall MsiGetActiveDatabase(long)
|
||||
50 stdcall MsiGetComponentStateA(long str ptr ptr)
|
||||
51 stdcall MsiGetComponentStateW(long wstr ptr ptr)
|
||||
52 stub MsiGetDatabaseState
|
||||
53 stub MsiGetFeatureCostA
|
||||
54 stub MsiGetFeatureCostW
|
||||
55 stub MsiGetFeatureInfoA
|
||||
56 stub MsiGetFeatureInfoW
|
||||
57 stdcall MsiGetFeatureStateA(long str ptr ptr)
|
||||
58 stdcall MsiGetFeatureStateW(long wstr ptr ptr)
|
||||
59 stdcall MsiGetFeatureUsageA(str str ptr ptr)
|
||||
60 stdcall MsiGetFeatureUsageW(wstr wstr ptr ptr)
|
||||
61 stub MsiGetFeatureValidStatesA
|
||||
62 stub MsiGetFeatureValidStatesW
|
||||
63 stdcall MsiGetLanguage(long)
|
||||
64 stdcall MsiGetMode(long long)
|
||||
65 stdcall MsiGetProductCodeA(str str)
|
||||
66 stdcall MsiGetProductCodeW(wstr wstr)
|
||||
67 stdcall MsiGetProductInfoA(str str str long)
|
||||
68 stub MsiGetProductInfoFromScriptA
|
||||
69 stub MsiGetProductInfoFromScriptW
|
||||
70 stdcall MsiGetProductInfoW(wstr wstr wstr long)
|
||||
71 stdcall MsiGetProductPropertyA(long str ptr ptr)
|
||||
72 stdcall MsiGetProductPropertyW(long wstr ptr ptr)
|
||||
73 stdcall MsiGetPropertyA(ptr str str ptr)
|
||||
74 stdcall MsiGetPropertyW(ptr wstr wstr ptr)
|
||||
75 stdcall MsiGetSourcePathA(long str ptr ptr)
|
||||
76 stdcall MsiGetSourcePathW(long wstr ptr ptr)
|
||||
77 stdcall MsiGetSummaryInformationA(long str long ptr)
|
||||
78 stdcall MsiGetSummaryInformationW(long wstr long ptr)
|
||||
79 stdcall MsiGetTargetPathA(long str ptr ptr)
|
||||
80 stdcall MsiGetTargetPathW(long wstr ptr ptr)
|
||||
81 stdcall MsiGetUserInfoA(str ptr ptr ptr ptr ptr ptr)
|
||||
82 stdcall MsiGetUserInfoW(wstr ptr ptr ptr ptr ptr ptr)
|
||||
83 stub MsiInstallMissingComponentA
|
||||
84 stub MsiInstallMissingComponentW
|
||||
85 stub MsiInstallMissingFileA
|
||||
86 stub MsiInstallMissingFileW
|
||||
87 stdcall MsiInstallProductA(str str)
|
||||
88 stdcall MsiInstallProductW(wstr wstr)
|
||||
89 stdcall MsiLocateComponentA(str ptr long)
|
||||
90 stdcall MsiLocateComponentW(wstr ptr long)
|
||||
91 stdcall MsiOpenDatabaseA(str str ptr)
|
||||
92 stdcall MsiOpenDatabaseW(wstr wstr ptr)
|
||||
93 stdcall MsiOpenPackageA(str ptr)
|
||||
94 stdcall MsiOpenPackageW(wstr ptr)
|
||||
95 stdcall MsiOpenProductA(str ptr)
|
||||
96 stdcall MsiOpenProductW(wstr ptr)
|
||||
97 stdcall MsiPreviewBillboardA(long str str)
|
||||
98 stdcall MsiPreviewBillboardW(long wstr wstr)
|
||||
99 stdcall MsiPreviewDialogA(long str)
|
||||
100 stdcall MsiPreviewDialogW(long wstr)
|
||||
101 stub MsiProcessAdvertiseScriptA
|
||||
102 stub MsiProcessAdvertiseScriptW
|
||||
103 stdcall MsiProcessMessage(long long long)
|
||||
104 stub MsiProvideComponentA
|
||||
105 stdcall MsiProvideComponentFromDescriptorA(str ptr ptr ptr)
|
||||
106 stdcall MsiProvideComponentFromDescriptorW(wstr ptr ptr ptr)
|
||||
107 stub MsiProvideComponentW
|
||||
108 stdcall MsiProvideQualifiedComponentA(str str long ptr ptr)
|
||||
109 stdcall MsiProvideQualifiedComponentW(str str long ptr ptr)
|
||||
110 stdcall MsiQueryFeatureStateA(str str)
|
||||
111 stdcall MsiQueryFeatureStateW(wstr wstr)
|
||||
112 stdcall MsiQueryProductStateA(str)
|
||||
113 stdcall MsiQueryProductStateW(wstr)
|
||||
114 stdcall MsiRecordDataSize(long long)
|
||||
115 stdcall MsiRecordGetFieldCount(long)
|
||||
116 stdcall MsiRecordGetInteger(long long)
|
||||
117 stdcall MsiRecordGetStringA(long long ptr ptr)
|
||||
118 stdcall MsiRecordGetStringW(long long ptr ptr)
|
||||
119 stdcall MsiRecordIsNull(long long)
|
||||
120 stdcall MsiRecordReadStream(long long ptr ptr)
|
||||
121 stdcall MsiRecordSetInteger(long long long)
|
||||
122 stdcall MsiRecordSetStreamA(long long str)
|
||||
123 stdcall MsiRecordSetStreamW(long long wstr)
|
||||
124 stdcall MsiRecordSetStringA(long long str)
|
||||
125 stdcall MsiRecordSetStringW(long long wstr)
|
||||
126 stdcall MsiReinstallFeatureA(str str long)
|
||||
127 stub MsiReinstallFeatureFromDescriptorA
|
||||
128 stub MsiReinstallFeatureFromDescriptorW
|
||||
129 stdcall MsiReinstallFeatureW(wstr wstr long)
|
||||
130 stdcall MsiReinstallProductA(str long)
|
||||
131 stdcall MsiReinstallProductW(wstr long)
|
||||
132 stub MsiSequenceA
|
||||
133 stub MsiSequenceW
|
||||
134 stdcall MsiSetComponentStateA(long str long)
|
||||
135 stdcall MsiSetComponentStateW(long wstr long)
|
||||
136 stdcall MsiSetExternalUIA(ptr long ptr)
|
||||
137 stdcall MsiSetExternalUIW(ptr long ptr)
|
||||
138 stdcall MsiSetFeatureStateA(long str long)
|
||||
139 stdcall MsiSetFeatureStateW(long wstr long)
|
||||
140 stub MsiSetInstallLevel
|
||||
141 stdcall MsiSetInternalUI(long ptr)
|
||||
142 stub MsiVerifyDiskSpace
|
||||
143 stub MsiSetMode
|
||||
144 stdcall MsiSetPropertyA(long str str)
|
||||
145 stdcall MsiSetPropertyW(long wstr wstr)
|
||||
146 stdcall MsiSetTargetPathA(long str str)
|
||||
147 stdcall MsiSetTargetPathW(long wstr wstr)
|
||||
148 stdcall MsiSummaryInfoGetPropertyA(long long ptr ptr ptr ptr ptr)
|
||||
149 stdcall MsiSummaryInfoGetPropertyCount(long ptr)
|
||||
150 stdcall MsiSummaryInfoGetPropertyW(long long ptr ptr ptr ptr ptr)
|
||||
151 stdcall MsiSummaryInfoPersist(long)
|
||||
152 stdcall MsiSummaryInfoSetPropertyA(long long long long ptr str)
|
||||
153 stdcall MsiSummaryInfoSetPropertyW(long long long long ptr wstr)
|
||||
154 stdcall MsiUseFeatureA(str str)
|
||||
155 stdcall MsiUseFeatureW(wstr wstr)
|
||||
156 stdcall MsiVerifyPackageA(str)
|
||||
157 stdcall MsiVerifyPackageW(wstr)
|
||||
158 stdcall MsiViewClose(long)
|
||||
159 stdcall MsiViewExecute(long long)
|
||||
160 stdcall MsiViewFetch(long ptr)
|
||||
161 stdcall MsiViewGetErrorA(long ptr ptr)
|
||||
162 stdcall MsiViewGetErrorW(long ptr ptr)
|
||||
163 stdcall MsiViewModify(long long long)
|
||||
164 stdcall MsiDatabaseIsTablePersistentA(long str)
|
||||
165 stdcall MsiDatabaseIsTablePersistentW(long wstr)
|
||||
166 stdcall MsiViewGetColumnInfo(long long ptr)
|
||||
167 stdcall MsiRecordClearData(long)
|
||||
168 stdcall MsiEnableLogA(long str long)
|
||||
169 stdcall MsiEnableLogW(long wstr long)
|
||||
170 stdcall MsiFormatRecordA(long long ptr ptr)
|
||||
171 stdcall MsiFormatRecordW(long long ptr ptr)
|
||||
172 stdcall MsiGetComponentPathA(str str ptr ptr)
|
||||
173 stdcall MsiGetComponentPathW(wstr wstr ptr ptr)
|
||||
174 stdcall MsiApplyPatchA(str str long str)
|
||||
175 stdcall MsiApplyPatchW(wstr wstr long wstr)
|
||||
176 stub MsiAdvertiseScriptA
|
||||
177 stub MsiAdvertiseScriptW
|
||||
178 stub MsiGetPatchInfoA
|
||||
179 stub MsiGetPatchInfoW
|
||||
180 stub MsiEnumPatchesA
|
||||
181 stub MsiEnumPatchesW
|
||||
182 stdcall -private DllGetVersion(ptr)
|
||||
183 stub MsiGetProductCodeFromPackageCodeA
|
||||
184 stub MsiGetProductCodeFromPackageCodeW
|
||||
185 stub MsiCreateTransformSummaryInfoA
|
||||
186 stub MsiCreateTransformSummaryInfoW
|
||||
187 stub MsiQueryFeatureStateFromDescriptorA
|
||||
188 stub MsiQueryFeatureStateFromDescriptorW
|
||||
189 stdcall MsiConfigureProductExA(str long long str)
|
||||
190 stdcall MsiConfigureProductExW(wstr long long wstr)
|
||||
191 stub MsiInvalidateFeatureCache
|
||||
192 stdcall MsiUseFeatureExA(str str long long)
|
||||
193 stdcall MsiUseFeatureExW(wstr wstr long long)
|
||||
194 stdcall MsiGetFileVersionA(str str ptr str ptr)
|
||||
195 stdcall MsiGetFileVersionW(wstr wstr ptr wstr ptr)
|
||||
196 stdcall MsiLoadStringA(long long long long long)
|
||||
197 stdcall MsiLoadStringW(long long long long long)
|
||||
198 stdcall MsiMessageBoxA(long long long long long long)
|
||||
199 stdcall MsiMessageBoxW(long long long long long long)
|
||||
200 stdcall MsiDecomposeDescriptorA(str ptr ptr ptr ptr)
|
||||
201 stdcall MsiDecomposeDescriptorW(wstr ptr ptr ptr ptr)
|
||||
202 stub MsiProvideQualifiedComponentExA
|
||||
203 stdcall MsiProvideQualifiedComponentExW(wstr wstr long wstr long long ptr ptr)
|
||||
204 stdcall MsiEnumRelatedProductsA(str long long ptr)
|
||||
205 stdcall MsiEnumRelatedProductsW(wstr long long ptr)
|
||||
206 stub MsiSetFeatureAttributesA
|
||||
207 stub MsiSetFeatureAttributesW
|
||||
208 stub MsiSourceListClearAllA
|
||||
209 stub MsiSourceListClearAllW
|
||||
210 stub MsiSourceListAddSourceA
|
||||
211 stub MsiSourceListAddSourceW
|
||||
212 stub MsiSourceListForceResolutionA
|
||||
213 stub MsiSourceListForceResolutionW
|
||||
214 stub MsiIsProductElevatedA
|
||||
215 stub MsiIsProductElevatedW
|
||||
216 stdcall MsiGetShortcutTargetA(str ptr ptr ptr)
|
||||
217 stdcall MsiGetShortcutTargetW(wstr ptr ptr ptr)
|
||||
218 stub MsiGetFileHashA
|
||||
219 stub MsiGetFileHashW
|
||||
220 stub MsiEnumComponentCostsA
|
||||
221 stub MsiEnumComponentCostsW
|
||||
222 stdcall MsiCreateAndVerifyInstallerDirectory(long)
|
||||
223 stdcall MsiGetFileSignatureInformationA(str long ptr ptr ptr)
|
||||
224 stdcall MsiGetFileSignatureInformationW(wstr long ptr ptr ptr)
|
||||
225 stdcall MsiProvideAssemblyA(str str long long str ptr)
|
||||
226 stdcall MsiProvideAssemblyW(wstr wstr long long wstr ptr)
|
||||
227 stdcall MsiAdvertiseProductExA(str str str long long long)
|
||||
228 stdcall MsiAdvertiseProductExW(wstr wstr wstr long long long)
|
||||
229 stub MsiNotifySidChangeA
|
||||
230 stub MsiNotifySidChangeW
|
||||
231 stdcall MsiOpenPackageExA(str long ptr)
|
||||
232 stdcall MsiOpenPackageExW(wstr long ptr)
|
||||
233 stub MsiDeleteUserDataA
|
||||
234 stub MsiDeleteUserDataW
|
||||
235 stub Migrate10CachedPackagesA
|
||||
236 stub Migrate10CachedPackagesW
|
||||
|
||||
@ stdcall -private DllCanUnloadNow()
|
||||
@ stdcall -private DllGetClassObject(ptr ptr ptr)
|
||||
@ stdcall -private DllRegisterServer()
|
||||
@ stdcall -private DllUnregisterServer()
|
||||
|
|
|
@ -129,10 +129,9 @@ typedef struct tagMSIVIEWOPS
|
|||
UINT (*set_int)( struct tagMSIVIEW *, UINT row, UINT col, UINT val );
|
||||
|
||||
/*
|
||||
* Inserts a new, blank row into the database
|
||||
* *row receives the number of the new row
|
||||
* Inserts a new row into the database from the records contents
|
||||
*/
|
||||
UINT (*insert_row)( struct tagMSIVIEW *, UINT *row );
|
||||
UINT (*insert_row)( struct tagMSIVIEW *, MSIRECORD * );
|
||||
|
||||
/*
|
||||
* execute - loads the underlying data into memory so it can be read
|
||||
|
@ -186,29 +185,21 @@ typedef struct tagMSIPACKAGE
|
|||
{
|
||||
MSIOBJECTHDR hdr;
|
||||
MSIDATABASE *db;
|
||||
struct tagMSIFEATURE *features;
|
||||
UINT loaded_features;
|
||||
struct tagMSIFOLDER *folders;
|
||||
UINT loaded_folders;
|
||||
struct tagMSICOMPONENT *components;
|
||||
UINT loaded_components;
|
||||
struct tagMSIFILE *files;
|
||||
UINT loaded_files;
|
||||
struct list components;
|
||||
struct list features;
|
||||
struct list files;
|
||||
struct list folders;
|
||||
LPWSTR ActionFormat;
|
||||
LPWSTR LastAction;
|
||||
|
||||
struct tagMSICLASS *classes;
|
||||
UINT loaded_classes;
|
||||
struct tagMSIEXTENSION *extensions;
|
||||
UINT loaded_extensions;
|
||||
struct list classes;
|
||||
struct list extensions;
|
||||
struct tagMSIPROGID *progids;
|
||||
UINT loaded_progids;
|
||||
struct tagMSIVERB *verbs;
|
||||
UINT loaded_verbs;
|
||||
struct tagMSIMIME *mimes;
|
||||
UINT loaded_mimes;
|
||||
struct tagMSIAPPID *appids;
|
||||
UINT loaded_appids;
|
||||
struct list mimes;
|
||||
struct list appids;
|
||||
|
||||
struct tagMSISCRIPT *script;
|
||||
|
||||
|
@ -362,7 +353,6 @@ extern INT MSI_ProcessMessage( MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD * );
|
|||
extern UINT MSI_GetPropertyW( MSIPACKAGE *, LPCWSTR, LPWSTR, DWORD * );
|
||||
extern UINT MSI_GetPropertyA(MSIPACKAGE *, LPCSTR, LPSTR, DWORD* );
|
||||
extern MSICONDITION MSI_EvaluateConditionW( MSIPACKAGE *, LPCWSTR );
|
||||
extern UINT MSI_SetPropertyW( MSIPACKAGE *, LPCWSTR, LPCWSTR );
|
||||
extern UINT MSI_GetComponentStateW( MSIPACKAGE *, LPWSTR, INSTALLSTATE *, INSTALLSTATE * );
|
||||
extern UINT MSI_GetFeatureStateW( MSIPACKAGE *, LPWSTR, INSTALLSTATE *, INSTALLSTATE * );
|
||||
extern UINT WINAPI MSI_SetFeatureStateW(MSIPACKAGE*, LPCWSTR, INSTALLSTATE );
|
||||
|
@ -412,11 +402,6 @@ UINT WINAPI MsiDecomposeDescriptorA( LPCSTR, LPSTR, LPSTR, LPSTR, DWORD * );
|
|||
LANGID WINAPI MsiLoadStringW( MSIHANDLE, UINT, LPWSTR, int, LANGID );
|
||||
LANGID WINAPI MsiLoadStringA( MSIHANDLE, UINT, LPSTR, int, LANGID );
|
||||
|
||||
HRESULT WINAPI MSI_DllGetClassObject( REFCLSID, REFIID, LPVOID * );
|
||||
HRESULT WINAPI MSI_DllRegisterServer( void );
|
||||
HRESULT WINAPI MSI_DllUnregisterServer( void );
|
||||
BOOL WINAPI MSI_DllCanUnloadNow( void );
|
||||
|
||||
/* UI globals */
|
||||
extern INSTALLUILEVEL gUILevel;
|
||||
extern HWND gUIhwnd;
|
||||
|
|
|
@ -563,12 +563,16 @@ out:
|
|||
return r;
|
||||
}
|
||||
|
||||
UINT WINAPI MsiViewGetErrorW( MSIHANDLE handle, LPWSTR szColumnNameBuffer,
|
||||
MSIDBERROR WINAPI MsiViewGetErrorW( MSIHANDLE handle, LPWSTR szColumnNameBuffer,
|
||||
DWORD *pcchBuf )
|
||||
{
|
||||
MSIQUERY *query = NULL;
|
||||
static const WCHAR szError[] = { 0 };
|
||||
MSIDBERROR r = MSIDBERROR_NOERROR;
|
||||
int len;
|
||||
|
||||
FIXME("%ld %p %p\n", handle, szColumnNameBuffer, pcchBuf );
|
||||
FIXME("%ld %p %p - returns empty error string\n",
|
||||
handle, szColumnNameBuffer, pcchBuf );
|
||||
|
||||
if( !pcchBuf )
|
||||
return MSIDBERROR_INVALIDARG;
|
||||
|
@ -577,16 +581,30 @@ UINT WINAPI MsiViewGetErrorW( MSIHANDLE handle, LPWSTR szColumnNameBuffer,
|
|||
if( !query )
|
||||
return MSIDBERROR_INVALIDARG;
|
||||
|
||||
len = lstrlenW( szError );
|
||||
if( szColumnNameBuffer )
|
||||
{
|
||||
if( *pcchBuf > len )
|
||||
lstrcpyW( szColumnNameBuffer, szError );
|
||||
else
|
||||
r = MSIDBERROR_MOREDATA;
|
||||
}
|
||||
*pcchBuf = len;
|
||||
|
||||
msiobj_release( &query->hdr );
|
||||
return MSIDBERROR_NOERROR;
|
||||
return r;
|
||||
}
|
||||
|
||||
UINT WINAPI MsiViewGetErrorA( MSIHANDLE handle, LPSTR szColumnNameBuffer,
|
||||
MSIDBERROR WINAPI MsiViewGetErrorA( MSIHANDLE handle, LPSTR szColumnNameBuffer,
|
||||
DWORD *pcchBuf )
|
||||
{
|
||||
static const CHAR szError[] = { 0 };
|
||||
MSIQUERY *query = NULL;
|
||||
MSIDBERROR r = MSIDBERROR_NOERROR;
|
||||
int len;
|
||||
|
||||
FIXME("%ld %p %p\n", handle, szColumnNameBuffer, pcchBuf );
|
||||
FIXME("%ld %p %p - returns empty error string\n",
|
||||
handle, szColumnNameBuffer, pcchBuf );
|
||||
|
||||
if( !pcchBuf )
|
||||
return MSIDBERROR_INVALIDARG;
|
||||
|
@ -595,8 +613,18 @@ UINT WINAPI MsiViewGetErrorA( MSIHANDLE handle, LPSTR szColumnNameBuffer,
|
|||
if( !query )
|
||||
return MSIDBERROR_INVALIDARG;
|
||||
|
||||
len = lstrlenA( szError );
|
||||
if( szColumnNameBuffer )
|
||||
{
|
||||
if( *pcchBuf > len )
|
||||
lstrcpyA( szColumnNameBuffer, szError );
|
||||
else
|
||||
r = MSIDBERROR_MOREDATA;
|
||||
}
|
||||
*pcchBuf = len;
|
||||
|
||||
msiobj_release( &query->hdr );
|
||||
return MSIDBERROR_NOERROR;
|
||||
return r;
|
||||
}
|
||||
|
||||
UINT WINAPI MsiDatabaseApplyTransformA( MSIHANDLE hdb,
|
||||
|
|
|
@ -377,19 +377,19 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db )
|
|||
msiobj_addref( &db->hdr );
|
||||
|
||||
package->db = db;
|
||||
package->features = NULL;
|
||||
package->folders = NULL;
|
||||
package->components = NULL;
|
||||
package->files = NULL;
|
||||
package->loaded_features = 0;
|
||||
package->loaded_folders = 0;
|
||||
package->loaded_components= 0;
|
||||
package->loaded_files = 0;
|
||||
list_init( &package->components );
|
||||
list_init( &package->features );
|
||||
list_init( &package->files );
|
||||
list_init( &package->folders );
|
||||
package->ActionFormat = NULL;
|
||||
package->LastAction = NULL;
|
||||
package->dialog = NULL;
|
||||
package->next_dialog = NULL;
|
||||
list_init( &package->subscriptions );
|
||||
list_init( &package->appids );
|
||||
list_init( &package->classes );
|
||||
list_init( &package->mimes );
|
||||
list_init( &package->extensions );
|
||||
|
||||
/* OK, here is where we do a slew of things to the database to
|
||||
* prep for all that is to come as a package */
|
||||
|
@ -884,7 +884,7 @@ UINT WINAPI MsiGetPropertyA(MSIHANDLE hInstall, LPCSTR szName, LPSTR szValueBuf,
|
|||
MSIPACKAGE *package;
|
||||
UINT ret;
|
||||
|
||||
TRACE("%lu %s %lu\n", hInstall, debugstr_a(szName), *pchValueBuf);
|
||||
TRACE("%lu %s %p\n", hInstall, debugstr_a(szName), pchValueBuf);
|
||||
|
||||
if (0 == hInstall)
|
||||
return ERROR_INVALID_HANDLE;
|
||||
|
@ -904,10 +904,10 @@ UINT WINAPI MsiGetPropertyA(MSIHANDLE hInstall, LPCSTR szName, LPSTR szValueBuf,
|
|||
msiobj_release( &package->hdr );
|
||||
|
||||
/* MsiGetProperty does not return error codes on missing properties */
|
||||
if (ret!= ERROR_MORE_DATA)
|
||||
return ERROR_SUCCESS;
|
||||
else
|
||||
return ret;
|
||||
if (ret != ERROR_MORE_DATA)
|
||||
ret = ERROR_SUCCESS;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
@ -917,6 +917,8 @@ UINT WINAPI MsiGetPropertyW(MSIHANDLE hInstall, LPCWSTR szName,
|
|||
MSIPACKAGE *package;
|
||||
UINT ret;
|
||||
|
||||
TRACE("%lu %s %p\n", hInstall, debugstr_w(szName), pchValueBuf);
|
||||
|
||||
if (0 == hInstall)
|
||||
return ERROR_INVALID_HANDLE;
|
||||
if (NULL == szName)
|
||||
|
@ -935,8 +937,8 @@ UINT WINAPI MsiGetPropertyW(MSIHANDLE hInstall, LPCWSTR szName,
|
|||
msiobj_release( &package->hdr );
|
||||
|
||||
/* MsiGetProperty does not return error codes on missing properties */
|
||||
if (ret!= ERROR_MORE_DATA)
|
||||
return ERROR_SUCCESS;
|
||||
else
|
||||
return ret;
|
||||
if (ret != ERROR_MORE_DATA)
|
||||
ret = ERROR_SUCCESS;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -596,9 +596,10 @@ static struct regsvr_interface const interface_list[] = {
|
|||
};
|
||||
|
||||
/***********************************************************************
|
||||
* DllRegisterServer
|
||||
* DllRegisterServer (MSI.@)
|
||||
*/
|
||||
HRESULT WINAPI MSI_DllRegisterServer(void) {
|
||||
HRESULT WINAPI DllRegisterServer(void)
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("\n");
|
||||
|
@ -610,9 +611,10 @@ HRESULT WINAPI MSI_DllRegisterServer(void) {
|
|||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllUnregisterServer
|
||||
* DllUnregisterServer (MSI.@)
|
||||
*/
|
||||
HRESULT WINAPI MSI_DllUnregisterServer(void) {
|
||||
HRESULT WINAPI DllUnregisterServer(void)
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("\n");
|
||||
|
|
|
@ -99,16 +99,16 @@ static UINT SELECT_set_int( struct tagMSIVIEW *view, UINT row, UINT col, UINT va
|
|||
return sv->table->ops->set_int( sv->table, row, col, val );
|
||||
}
|
||||
|
||||
static UINT SELECT_insert_row( struct tagMSIVIEW *view, UINT *num )
|
||||
static UINT SELECT_insert_row( struct tagMSIVIEW *view, MSIRECORD *record )
|
||||
{
|
||||
MSISELECTVIEW *sv = (MSISELECTVIEW*)view;
|
||||
|
||||
TRACE("%p %p\n", sv, num );
|
||||
TRACE("%p %p\n", sv, record );
|
||||
|
||||
if( !sv->table )
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
|
||||
return sv->table->ops->insert_row( sv->table, num );
|
||||
return sv->table->ops->insert_row( sv->table, record );
|
||||
}
|
||||
|
||||
static UINT SELECT_execute( struct tagMSIVIEW *view, MSIRECORD *record )
|
||||
|
|
|
@ -731,15 +731,40 @@ UINT load_string_table( MSIDATABASE *db )
|
|||
db->strings = msi_init_stringtable( count, codepage );
|
||||
|
||||
offset = 0;
|
||||
n = 1;
|
||||
for( i=1; i<count; i++ )
|
||||
{
|
||||
len = pool[i*2];
|
||||
n = msi_addstring( db->strings, i, data+offset, len, pool[i*2+1] );
|
||||
if( n != i )
|
||||
ERR("Failed to add string %ld\n", i );
|
||||
|
||||
/*
|
||||
* If a string is over 64k, the previous string entry is made null
|
||||
* and its the high word of the length is inserted in the null string's
|
||||
* reference count field.
|
||||
*/
|
||||
if( pool[i*2-2] == 0 )
|
||||
len += pool[i*2-1] * 0x10000;
|
||||
|
||||
if( (offset + len) > datasize )
|
||||
{
|
||||
ERR("string table corrupt?\n");
|
||||
break;
|
||||
}
|
||||
|
||||
/* don't add the high word of a string's length as a string */
|
||||
if ( len || !pool[i*2+1] )
|
||||
{
|
||||
r = msi_addstring( db->strings, n, data+offset, len, pool[i*2+1] );
|
||||
if( r != n )
|
||||
ERR("Failed to add string %ld\n", n );
|
||||
n++;
|
||||
}
|
||||
|
||||
offset += len;
|
||||
}
|
||||
|
||||
if ( datasize != offset )
|
||||
ERR("string table load failed! (%08x != %08lx)\n", datasize, offset );
|
||||
|
||||
TRACE("Loaded %ld strings\n", count);
|
||||
|
||||
ret = ERROR_SUCCESS;
|
||||
|
@ -1167,7 +1192,7 @@ static UINT TABLE_set_int( struct tagMSIVIEW *view, UINT row, UINT col, UINT val
|
|||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
static UINT TABLE_insert_row( struct tagMSIVIEW *view, UINT *num )
|
||||
static UINT table_create_new_row( struct tagMSIVIEW *view, UINT *num )
|
||||
{
|
||||
MSITABLEVIEW *tv = (MSITABLEVIEW*)view;
|
||||
USHORT **p, *row;
|
||||
|
@ -1217,7 +1242,7 @@ static UINT TABLE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
|
|||
r = get_table( tv->db, tv->name, &tv->table );
|
||||
if( r != ERROR_SUCCESS )
|
||||
return r;
|
||||
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -1276,11 +1301,167 @@ static UINT TABLE_get_column_info( struct tagMSIVIEW *view,
|
|||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
static UINT table_find_in_column( MSITABLEVIEW *tv, UINT col, UINT val, UINT *row )
|
||||
{
|
||||
UINT i, r, x;
|
||||
|
||||
for( i=0; i<tv->table->row_count; i++ )
|
||||
{
|
||||
r = TABLE_fetch_int( (struct tagMSIVIEW*) tv, i, col, &x );
|
||||
if ( r != ERROR_SUCCESS )
|
||||
{
|
||||
ERR("TABLE_fetch_int shouldn't fail here\n");
|
||||
break;
|
||||
}
|
||||
if ( x == val )
|
||||
{
|
||||
*row = i;
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
}
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
}
|
||||
|
||||
static UINT table_validate_new( MSITABLEVIEW *tv, MSIRECORD *rec )
|
||||
{
|
||||
LPCWSTR str;
|
||||
UINT i, val, r, row;
|
||||
BOOL has_key = FALSE;
|
||||
|
||||
/* FIXME: set the MsiViewGetError value */
|
||||
|
||||
for( i = 0; i<tv->num_cols; i++ )
|
||||
{
|
||||
/* check for duplicate keys */
|
||||
if( !( tv->columns[i].type & MSITYPE_KEY ) )
|
||||
continue;
|
||||
|
||||
has_key = TRUE;
|
||||
|
||||
TRACE("column %d (%s.%s)is a key\n", i,
|
||||
debugstr_w(tv->columns[i].tablename),
|
||||
debugstr_w(tv->columns[i].colname) );
|
||||
|
||||
val = 0;
|
||||
if( tv->columns[i].type & MSITYPE_STRING )
|
||||
{
|
||||
/* keys can't be null */
|
||||
str = MSI_RecordGetString( rec, i+1 );
|
||||
if( !str )
|
||||
return ERROR_INVALID_DATA;
|
||||
|
||||
/* if the string doesn't exist in the string table yet, it's OK */
|
||||
r = msi_string2idW( tv->db->strings, str, &val );
|
||||
if( ERROR_SUCCESS != r )
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
val = MSI_RecordGetInteger( rec, i+1 );
|
||||
val ^= 0x8000;
|
||||
}
|
||||
|
||||
/* if we find the same value in the table, it's a duplicate */
|
||||
row = 0;
|
||||
r = table_find_in_column( tv, i+1, val, &row );
|
||||
if( ERROR_SUCCESS != r )
|
||||
return ERROR_SUCCESS;
|
||||
|
||||
TRACE("found in row %d\n", row );
|
||||
}
|
||||
|
||||
if (has_key)
|
||||
return ERROR_INVALID_DATA;
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
static UINT TABLE_insert_row( struct tagMSIVIEW *view, MSIRECORD *rec )
|
||||
{
|
||||
MSITABLEVIEW *tv = (MSITABLEVIEW*)view;
|
||||
UINT n, type, val, r, row, col_count = 0;
|
||||
|
||||
r = TABLE_get_dimensions( view, NULL, &col_count );
|
||||
if( r )
|
||||
return r;
|
||||
|
||||
row = -1;
|
||||
r = table_create_new_row( view, &row );
|
||||
TRACE("insert_row returned %08x\n", r);
|
||||
if( r )
|
||||
return r;
|
||||
|
||||
for( n = 1; n <= col_count; n++ )
|
||||
{
|
||||
r = TABLE_get_column_info( view, n, NULL, &type );
|
||||
if( r )
|
||||
break;
|
||||
|
||||
if( type & MSITYPE_STRING )
|
||||
{
|
||||
const WCHAR *str = MSI_RecordGetString( rec, n );
|
||||
val = msi_addstringW( tv->db->strings, 0, str, -1, 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
val = MSI_RecordGetInteger( rec, n );
|
||||
val ^= 0x8000;
|
||||
}
|
||||
r = TABLE_set_int( view, row, n, val );
|
||||
if( r )
|
||||
break;
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
static UINT TABLE_modify( struct tagMSIVIEW *view, MSIMODIFY eModifyMode,
|
||||
MSIRECORD *rec)
|
||||
{
|
||||
FIXME("%p %d %p\n", view, eModifyMode, rec );
|
||||
return ERROR_CALL_NOT_IMPLEMENTED;
|
||||
MSITABLEVIEW *tv = (MSITABLEVIEW*)view;
|
||||
UINT r;
|
||||
|
||||
TRACE("%p %d %p\n", view, eModifyMode, rec );
|
||||
|
||||
if (!tv->table)
|
||||
{
|
||||
r = TABLE_execute( view, NULL );
|
||||
if( r )
|
||||
return r;
|
||||
}
|
||||
|
||||
switch (eModifyMode)
|
||||
{
|
||||
case MSIMODIFY_VALIDATE_NEW:
|
||||
r = table_validate_new( tv, rec );
|
||||
break;
|
||||
|
||||
case MSIMODIFY_INSERT_TEMPORARY:
|
||||
r = table_validate_new( tv, rec );
|
||||
if (r != ERROR_SUCCESS)
|
||||
break;
|
||||
r = TABLE_insert_row( view, rec );
|
||||
break;
|
||||
|
||||
case MSIMODIFY_REFRESH:
|
||||
case MSIMODIFY_INSERT:
|
||||
case MSIMODIFY_UPDATE:
|
||||
case MSIMODIFY_ASSIGN:
|
||||
case MSIMODIFY_REPLACE:
|
||||
case MSIMODIFY_MERGE:
|
||||
case MSIMODIFY_DELETE:
|
||||
case MSIMODIFY_VALIDATE:
|
||||
case MSIMODIFY_VALIDATE_FIELD:
|
||||
case MSIMODIFY_VALIDATE_DELETE:
|
||||
FIXME("%p %d %p - mode not implemented\n", view, eModifyMode, rec );
|
||||
r = ERROR_CALL_NOT_IMPLEMENTED;
|
||||
break;
|
||||
|
||||
default:
|
||||
r = ERROR_INVALID_DATA;
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
static UINT TABLE_delete( struct tagMSIVIEW *view )
|
||||
|
|
|
@ -24,7 +24,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#ifndef _MSI_NO_CRYPTO
|
||||
#include "wincrypt.h"
|
||||
#include <wincrypt.h>
|
||||
#endif
|
||||
|
||||
typedef unsigned long MSIHANDLE;
|
||||
|
|
|
@ -126,8 +126,8 @@ UINT WINAPI MsiViewClose(MSIHANDLE);
|
|||
UINT WINAPI MsiDatabaseOpenViewA(MSIHANDLE,LPCSTR,MSIHANDLE*);
|
||||
UINT WINAPI MsiDatabaseOpenViewW(MSIHANDLE,LPCWSTR,MSIHANDLE*);
|
||||
#define MsiDatabaseOpenView WINELIB_NAME_AW(MsiDatabaseOpenView)
|
||||
UINT WINAPI MsiViewGetErrorA(MSIHANDLE,LPSTR,DWORD*);
|
||||
UINT WINAPI MsiViewGetErrorW(MSIHANDLE,LPWSTR,DWORD*);
|
||||
MSIDBERROR WINAPI MsiViewGetErrorA(MSIHANDLE,LPSTR,DWORD*);
|
||||
MSIDBERROR WINAPI MsiViewGetErrorW(MSIHANDLE,LPWSTR,DWORD*);
|
||||
#define MsiViewGetError WINELIB_NAME_AW(MsiViewGetError)
|
||||
|
||||
/* record manipulation */
|
||||
|
@ -175,6 +175,9 @@ UINT WINAPI MsiDatabaseCommit(MSIHANDLE);
|
|||
UINT WINAPI MsiGetFeatureStateA(MSIHANDLE,LPSTR,INSTALLSTATE*,INSTALLSTATE*);
|
||||
UINT WINAPI MsiGetFeatureStateW(MSIHANDLE,LPWSTR,INSTALLSTATE*,INSTALLSTATE*);
|
||||
#define MsiGetFeatureState WINELIB_NAME_AW(MsiGetFeatureState)
|
||||
UINT WINAPI MsiSetComponentStateA(MSIHANDLE,LPCSTR,INSTALLSTATE);
|
||||
UINT WINAPI MsiSetComponentStateW(MSIHANDLE,LPCWSTR,INSTALLSTATE);
|
||||
#define MsiSetComponentState WINELIB_NAME_AW(MsiSetComponentState)
|
||||
UINT WINAPI MsiGetComponentStateA(MSIHANDLE,LPSTR,INSTALLSTATE*,INSTALLSTATE*);
|
||||
UINT WINAPI MsiGetComponentStateW(MSIHANDLE,LPWSTR,INSTALLSTATE*,INSTALLSTATE*);
|
||||
#define MsiGetComponentState WINELIB_NAME_AW(MsiGetComponentState)
|
||||
|
|
Loading…
Reference in a new issue