msi: Constify some variables.
This commit is contained in:
parent
daca693f30
commit
a0ae69a8d1
|
@ -793,7 +793,7 @@ void ui_actiondata(MSIPACKAGE *package, LPCWSTR action, MSIRECORD * record)
|
||||||
msiobj_release(&row->hdr);
|
msiobj_release(&row->hdr);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL ACTION_VerifyComponentForAction( MSICOMPONENT* comp, INSTALLSTATE check )
|
BOOL ACTION_VerifyComponentForAction( const MSICOMPONENT* comp, INSTALLSTATE check )
|
||||||
{
|
{
|
||||||
if (!comp)
|
if (!comp)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -807,7 +807,7 @@ BOOL ACTION_VerifyComponentForAction( MSICOMPONENT* comp, INSTALLSTATE check )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL ACTION_VerifyFeatureForAction( MSIFEATURE* feature, INSTALLSTATE check )
|
BOOL ACTION_VerifyFeatureForAction( const MSIFEATURE* feature, INSTALLSTATE check )
|
||||||
{
|
{
|
||||||
if (!feature)
|
if (!feature)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -969,7 +969,7 @@ UINT register_unique_action(MSIPACKAGE *package, LPCWSTR action)
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL check_unique_action(MSIPACKAGE *package, LPCWSTR action)
|
BOOL check_unique_action(const MSIPACKAGE *package, LPCWSTR action)
|
||||||
{
|
{
|
||||||
INT i;
|
INT i;
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ static UINT INSERT_fetch_int( struct tagMSIVIEW *view, UINT row, UINT col, UINT
|
||||||
* Merge a value_list and a record to create a second record.
|
* Merge a value_list and a record to create a second record.
|
||||||
* Replace wildcard entries in the valuelist with values from the record
|
* Replace wildcard entries in the valuelist with values from the record
|
||||||
*/
|
*/
|
||||||
MSIRECORD *msi_query_merge_record( UINT fields, column_info *vl, MSIRECORD *rec )
|
MSIRECORD *msi_query_merge_record( UINT fields, const column_info *vl, MSIRECORD *rec )
|
||||||
{
|
{
|
||||||
MSIRECORD *merged;
|
MSIRECORD *merged;
|
||||||
DWORD wildcard_count = 1, i;
|
DWORD wildcard_count = 1, i;
|
||||||
|
@ -234,7 +234,7 @@ static const MSIVIEWOPS insert_ops =
|
||||||
INSERT_find_matching_rows
|
INSERT_find_matching_rows
|
||||||
};
|
};
|
||||||
|
|
||||||
static UINT count_column_info( column_info *ci )
|
static UINT count_column_info( const column_info *ci )
|
||||||
{
|
{
|
||||||
UINT n = 0;
|
UINT n = 0;
|
||||||
for ( ; ci; ci = ci->next )
|
for ( ; ci; ci = ci->next )
|
||||||
|
@ -242,7 +242,7 @@ static UINT count_column_info( column_info *ci )
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT INSERT_CreateView( MSIDATABASE *db, MSIVIEW **view, LPWSTR table,
|
UINT INSERT_CreateView( MSIDATABASE *db, MSIVIEW **view, LPCWSTR table,
|
||||||
column_info *columns, column_info *values, BOOL temp )
|
column_info *columns, column_info *values, BOOL temp )
|
||||||
{
|
{
|
||||||
MSIINSERTVIEW *iv = NULL;
|
MSIINSERTVIEW *iv = NULL;
|
||||||
|
|
|
@ -1413,7 +1413,7 @@ INSTALLSTATE WINAPI MsiUseFeatureA( LPCSTR szProduct, LPCSTR szFeature )
|
||||||
* MSI_ProvideQualifiedComponentEx [internal]
|
* MSI_ProvideQualifiedComponentEx [internal]
|
||||||
*/
|
*/
|
||||||
static UINT WINAPI MSI_ProvideQualifiedComponentEx(LPCWSTR szComponent,
|
static UINT WINAPI MSI_ProvideQualifiedComponentEx(LPCWSTR szComponent,
|
||||||
LPCWSTR szQualifier, DWORD dwInstallMode, LPWSTR szProduct,
|
LPCWSTR szQualifier, DWORD dwInstallMode, LPCWSTR szProduct,
|
||||||
DWORD Unused1, DWORD Unused2, awstring *lpPathBuf,
|
DWORD Unused1, DWORD Unused2, awstring *lpPathBuf,
|
||||||
DWORD* pcchPathBuf)
|
DWORD* pcchPathBuf)
|
||||||
{
|
{
|
||||||
|
|
|
@ -587,7 +587,7 @@ extern UINT MSI_SetFeatureStates( MSIPACKAGE *package );
|
||||||
/* record internals */
|
/* record internals */
|
||||||
extern UINT MSI_RecordSetIStream( MSIRECORD *, unsigned int, IStream *);
|
extern UINT MSI_RecordSetIStream( MSIRECORD *, unsigned int, IStream *);
|
||||||
extern UINT MSI_RecordGetIStream( MSIRECORD *, unsigned int, IStream **);
|
extern UINT MSI_RecordGetIStream( MSIRECORD *, unsigned int, IStream **);
|
||||||
extern const WCHAR *MSI_RecordGetString( MSIRECORD *, unsigned int );
|
extern const WCHAR *MSI_RecordGetString( const MSIRECORD *, unsigned int );
|
||||||
extern MSIRECORD *MSI_CreateRecord( unsigned int );
|
extern MSIRECORD *MSI_CreateRecord( unsigned int );
|
||||||
extern UINT MSI_RecordSetInteger( MSIRECORD *, unsigned int, int );
|
extern UINT MSI_RecordSetInteger( MSIRECORD *, unsigned int, int );
|
||||||
extern UINT MSI_RecordSetStringW( MSIRECORD *, unsigned int, LPCWSTR );
|
extern UINT MSI_RecordSetStringW( MSIRECORD *, unsigned int, LPCWSTR );
|
||||||
|
@ -597,7 +597,7 @@ extern UINT MSI_RecordGetStringW( MSIRECORD * , unsigned int, LPWSTR, DWORD *);
|
||||||
extern UINT MSI_RecordGetStringA( MSIRECORD *, unsigned int, LPSTR, DWORD *);
|
extern UINT MSI_RecordGetStringA( MSIRECORD *, unsigned int, LPSTR, DWORD *);
|
||||||
extern int MSI_RecordGetInteger( MSIRECORD *, unsigned int );
|
extern int MSI_RecordGetInteger( MSIRECORD *, unsigned int );
|
||||||
extern UINT MSI_RecordReadStream( MSIRECORD *, unsigned int, char *, DWORD *);
|
extern UINT MSI_RecordReadStream( MSIRECORD *, unsigned int, char *, DWORD *);
|
||||||
extern unsigned int MSI_RecordGetFieldCount( MSIRECORD *rec );
|
extern unsigned int MSI_RecordGetFieldCount( const MSIRECORD *rec );
|
||||||
extern UINT MSI_RecordSetStream( MSIRECORD *, unsigned int, IStream * );
|
extern UINT MSI_RecordSetStream( MSIRECORD *, unsigned int, IStream * );
|
||||||
extern UINT MSI_RecordDataSize( MSIRECORD *, unsigned int );
|
extern UINT MSI_RecordDataSize( MSIRECORD *, unsigned int );
|
||||||
extern UINT MSI_RecordStreamToFile( MSIRECORD *, unsigned int, LPCWSTR );
|
extern UINT MSI_RecordStreamToFile( MSIRECORD *, unsigned int, LPCWSTR );
|
||||||
|
@ -634,7 +634,7 @@ extern UINT VIEW_find_column( MSIVIEW *, LPCWSTR, UINT * );
|
||||||
extern UINT MSI_SetInstallLevel( MSIPACKAGE *package, int iInstallLevel );
|
extern UINT MSI_SetInstallLevel( MSIPACKAGE *package, int iInstallLevel );
|
||||||
|
|
||||||
/* package internals */
|
/* package internals */
|
||||||
extern MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *, LPWSTR );
|
extern MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *, LPCWSTR );
|
||||||
extern UINT MSI_OpenPackageW( LPCWSTR szPackage, MSIPACKAGE ** );
|
extern UINT MSI_OpenPackageW( LPCWSTR szPackage, MSIPACKAGE ** );
|
||||||
extern UINT MSI_SetTargetPathW( MSIPACKAGE *, LPCWSTR, LPCWSTR );
|
extern UINT MSI_SetTargetPathW( MSIPACKAGE *, LPCWSTR, LPCWSTR );
|
||||||
extern UINT MSI_SetPropertyW( MSIPACKAGE *, LPCWSTR, LPCWSTR );
|
extern UINT MSI_SetPropertyW( MSIPACKAGE *, LPCWSTR, LPCWSTR );
|
||||||
|
@ -770,14 +770,14 @@ extern void msi_free_action_script(MSIPACKAGE *package, UINT script);
|
||||||
extern LPWSTR build_icon_path(MSIPACKAGE *, LPCWSTR);
|
extern LPWSTR build_icon_path(MSIPACKAGE *, LPCWSTR);
|
||||||
extern LPWSTR build_directory_name(DWORD , ...);
|
extern LPWSTR build_directory_name(DWORD , ...);
|
||||||
extern BOOL create_full_pathW(const WCHAR *path);
|
extern BOOL create_full_pathW(const WCHAR *path);
|
||||||
extern BOOL ACTION_VerifyComponentForAction(MSICOMPONENT*, INSTALLSTATE);
|
extern BOOL ACTION_VerifyComponentForAction(const MSICOMPONENT*, INSTALLSTATE);
|
||||||
extern BOOL ACTION_VerifyFeatureForAction(MSIFEATURE*, INSTALLSTATE);
|
extern BOOL ACTION_VerifyFeatureForAction(const MSIFEATURE*, INSTALLSTATE);
|
||||||
extern void reduce_to_longfilename(WCHAR*);
|
extern void reduce_to_longfilename(WCHAR*);
|
||||||
extern void reduce_to_shortfilename(WCHAR*);
|
extern void reduce_to_shortfilename(WCHAR*);
|
||||||
extern LPWSTR create_component_advertise_string(MSIPACKAGE*, MSICOMPONENT*, LPCWSTR);
|
extern LPWSTR create_component_advertise_string(MSIPACKAGE*, MSICOMPONENT*, LPCWSTR);
|
||||||
extern void ACTION_UpdateComponentStates(MSIPACKAGE *package, LPCWSTR szFeature);
|
extern void ACTION_UpdateComponentStates(MSIPACKAGE *package, LPCWSTR szFeature);
|
||||||
extern UINT register_unique_action(MSIPACKAGE *, LPCWSTR);
|
extern UINT register_unique_action(MSIPACKAGE *, LPCWSTR);
|
||||||
extern BOOL check_unique_action(MSIPACKAGE *, LPCWSTR);
|
extern BOOL check_unique_action(const MSIPACKAGE *, LPCWSTR);
|
||||||
extern WCHAR* generate_error_string(MSIPACKAGE *, UINT, DWORD, ... );
|
extern WCHAR* generate_error_string(MSIPACKAGE *, UINT, DWORD, ... );
|
||||||
extern UINT msi_create_component_directories( MSIPACKAGE *package );
|
extern UINT msi_create_component_directories( MSIPACKAGE *package );
|
||||||
extern void msi_ui_error( DWORD msg_id, DWORD type );
|
extern void msi_ui_error( DWORD msg_id, DWORD type );
|
||||||
|
|
|
@ -587,7 +587,7 @@ static MSIPACKAGE *msi_alloc_package( void )
|
||||||
return package;
|
return package;
|
||||||
}
|
}
|
||||||
|
|
||||||
MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPWSTR base_url )
|
MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url )
|
||||||
{
|
{
|
||||||
static const WCHAR szLevel[] = { 'U','I','L','e','v','e','l',0 };
|
static const WCHAR szLevel[] = { 'U','I','L','e','v','e','l',0 };
|
||||||
static const WCHAR szpi[] = {'%','i',0};
|
static const WCHAR szpi[] = {'%','i',0};
|
||||||
|
|
|
@ -111,7 +111,7 @@ UINT WHERE_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table,
|
||||||
UINT CREATE_CreateView( MSIDATABASE *db, MSIVIEW **view, LPWSTR table,
|
UINT CREATE_CreateView( MSIDATABASE *db, MSIVIEW **view, LPWSTR table,
|
||||||
column_info *col_info, BOOL hold );
|
column_info *col_info, BOOL hold );
|
||||||
|
|
||||||
UINT INSERT_CreateView( MSIDATABASE *db, MSIVIEW **view, LPWSTR table,
|
UINT INSERT_CreateView( MSIDATABASE *db, MSIVIEW **view, LPCWSTR table,
|
||||||
column_info *columns, column_info *values, BOOL temp );
|
column_info *columns, column_info *values, BOOL temp );
|
||||||
|
|
||||||
UINT UPDATE_CreateView( MSIDATABASE *db, MSIVIEW **, LPWSTR table,
|
UINT UPDATE_CreateView( MSIDATABASE *db, MSIVIEW **, LPWSTR table,
|
||||||
|
@ -128,7 +128,7 @@ UINT STREAMS_CreateView( MSIDATABASE *db, MSIVIEW **view );
|
||||||
|
|
||||||
int sqliteGetToken(const WCHAR *z, int *tokenType);
|
int sqliteGetToken(const WCHAR *z, int *tokenType);
|
||||||
|
|
||||||
MSIRECORD *msi_query_merge_record( UINT fields, column_info *vl, MSIRECORD *rec );
|
MSIRECORD *msi_query_merge_record( UINT fields, const column_info *vl, MSIRECORD *rec );
|
||||||
|
|
||||||
UINT msi_create_table( MSIDATABASE *db, LPCWSTR name, column_info *col_info,
|
UINT msi_create_table( MSIDATABASE *db, LPCWSTR name, column_info *col_info,
|
||||||
BOOL persistent, MSITABLE **table_ret);
|
BOOL persistent, MSITABLE **table_ret);
|
||||||
|
|
|
@ -106,7 +106,7 @@ MSIHANDLE WINAPI MsiCreateRecord( unsigned int cParams )
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int MSI_RecordGetFieldCount( MSIRECORD *rec )
|
unsigned int MSI_RecordGetFieldCount( const MSIRECORD *rec )
|
||||||
{
|
{
|
||||||
return rec->count;
|
return rec->count;
|
||||||
}
|
}
|
||||||
|
@ -393,7 +393,7 @@ UINT WINAPI MsiRecordGetStringA(MSIHANDLE handle, unsigned int iField,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
const WCHAR *MSI_RecordGetString( MSIRECORD *rec, unsigned int iField )
|
const WCHAR *MSI_RecordGetString( const MSIRECORD *rec, unsigned int iField )
|
||||||
{
|
{
|
||||||
if( iField > rec->count )
|
if( iField > rec->count )
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue