msi: Remove unused functions.
This commit is contained in:
parent
096643dfa6
commit
c0ad988e67
|
@ -278,27 +278,6 @@ VOID ControlEvent_SubscribeToEvent( MSIPACKAGE *package, msi_dialog *dialog,
|
|||
list_add_tail( &package->subscriptions, &sub->entry );
|
||||
}
|
||||
|
||||
VOID ControlEvent_UnSubscribeToEvent( MSIPACKAGE *package, LPCWSTR event,
|
||||
LPCWSTR control, LPCWSTR attribute )
|
||||
{
|
||||
struct list *i, *t;
|
||||
struct subscriber *sub;
|
||||
|
||||
LIST_FOR_EACH_SAFE( i, t, &package->subscriptions )
|
||||
{
|
||||
sub = LIST_ENTRY( i, struct subscriber, entry );
|
||||
|
||||
if( lstrcmpiW(sub->control,control) )
|
||||
continue;
|
||||
if( lstrcmpiW(sub->attribute,attribute) )
|
||||
continue;
|
||||
if( lstrcmpiW(sub->event,event) )
|
||||
continue;
|
||||
list_remove( &sub->entry );
|
||||
free_subscriber( sub );
|
||||
}
|
||||
}
|
||||
|
||||
VOID ControlEvent_FireSubscribedEvent( MSIPACKAGE *package, LPCWSTR event,
|
||||
MSIRECORD *rec )
|
||||
{
|
||||
|
|
|
@ -871,13 +871,6 @@ void reduce_to_longfilename(WCHAR* filename)
|
|||
memmove(filename, p+1, (strlenW(p+1)+1)*sizeof(WCHAR));
|
||||
}
|
||||
|
||||
void reduce_to_shortfilename(WCHAR* filename)
|
||||
{
|
||||
LPWSTR p = strchrW(filename,'|');
|
||||
if (p)
|
||||
*p = 0;
|
||||
}
|
||||
|
||||
LPWSTR create_component_advertise_string(MSIPACKAGE* package,
|
||||
MSICOMPONENT* component, LPCWSTR feature)
|
||||
{
|
||||
|
@ -1071,18 +1064,3 @@ WCHAR* generate_error_string(MSIPACKAGE *package, UINT error, DWORD count, ... )
|
|||
msiobj_release( &rec->hdr );
|
||||
return data;
|
||||
}
|
||||
|
||||
void msi_ui_error( DWORD msg_id, DWORD type )
|
||||
{
|
||||
WCHAR text[2048];
|
||||
|
||||
static const WCHAR title[] = {
|
||||
'W','i','n','d','o','w','s',' ','I','n','s','t','a','l','l','e','r',0
|
||||
};
|
||||
|
||||
if (!MsiLoadStringW( -1, msg_id, text, sizeof(text) / sizeof(text[0]),
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL) ))
|
||||
return;
|
||||
|
||||
MessageBoxW( NULL, text, title, type );
|
||||
}
|
||||
|
|
|
@ -655,11 +655,9 @@ enum StringPersistence
|
|||
};
|
||||
|
||||
extern BOOL msi_addstringW( string_table *st, UINT string_no, const WCHAR *data, int len, UINT refcount, enum StringPersistence persistence );
|
||||
extern UINT msi_id2stringW( const string_table *st, UINT string_no, LPWSTR buffer, UINT *sz );
|
||||
|
||||
extern UINT msi_string2idW( const string_table *st, LPCWSTR buffer, UINT *id );
|
||||
extern VOID msi_destroy_stringtable( string_table *st );
|
||||
extern UINT msi_strcmp( const string_table *st, UINT lval, UINT rval, UINT *res );
|
||||
extern const WCHAR *msi_string_lookup_id( const string_table *st, UINT id );
|
||||
extern HRESULT msi_init_string_table( IStorage *stg );
|
||||
extern string_table *msi_load_string_table( IStorage *stg, UINT *bytes_per_strref );
|
||||
|
@ -795,7 +793,6 @@ extern LPWSTR msi_reg_get_val_str( HKEY hkey, LPCWSTR name );
|
|||
extern BOOL msi_reg_get_val_dword( HKEY hkey, LPCWSTR name, DWORD *val);
|
||||
|
||||
extern DWORD msi_version_str_to_dword(LPCWSTR p);
|
||||
extern LPWSTR msi_version_dword_to_str(DWORD version);
|
||||
|
||||
extern LONG msi_reg_set_val_str( HKEY hkey, LPCWSTR name, LPCWSTR value );
|
||||
extern LONG msi_reg_set_val_multi_str( HKEY hkey, LPCWSTR name, LPCWSTR value );
|
||||
|
@ -973,14 +970,12 @@ extern BOOL create_full_pathW(const WCHAR *path);
|
|||
extern BOOL ACTION_VerifyComponentForAction(const MSICOMPONENT*, INSTALLSTATE);
|
||||
extern BOOL ACTION_VerifyFeatureForAction(const 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(const MSIPACKAGE *, LPCWSTR);
|
||||
extern WCHAR* generate_error_string(MSIPACKAGE *, UINT, DWORD, ... );
|
||||
extern UINT msi_create_component_directories( MSIPACKAGE *package );
|
||||
extern void msi_ui_error( DWORD msg_id, DWORD type );
|
||||
extern UINT msi_set_last_used_source(LPCWSTR product, LPCWSTR usersid,
|
||||
MSIINSTALLCONTEXT context, DWORD options, LPCWSTR value);
|
||||
|
||||
|
@ -1011,8 +1006,6 @@ extern VOID ControlEvent_CleanupDialogSubscriptions(MSIPACKAGE *package, LPWSTR
|
|||
extern VOID ControlEvent_CleanupSubscriptions(MSIPACKAGE *package);
|
||||
extern VOID ControlEvent_SubscribeToEvent(MSIPACKAGE *package, msi_dialog *dialog,
|
||||
LPCWSTR event, LPCWSTR control, LPCWSTR attribute);
|
||||
extern VOID ControlEvent_UnSubscribeToEvent( MSIPACKAGE *package, LPCWSTR event,
|
||||
LPCWSTR control, LPCWSTR attribute );
|
||||
|
||||
/* OLE automation */
|
||||
extern HRESULT create_msiserver(IUnknown *pOuter, LPVOID *ppObj);
|
||||
|
|
|
@ -392,17 +392,6 @@ DWORD msi_version_str_to_dword(LPCWSTR p)
|
|||
return MAKELONG(build, MAKEWORD(minor, major));
|
||||
}
|
||||
|
||||
LPWSTR msi_version_dword_to_str(DWORD version)
|
||||
{
|
||||
static const WCHAR fmt[] = { '%','u','.','%','u','.','%','u',0 };
|
||||
LPWSTR str = msi_alloc(20);
|
||||
sprintfW(str, fmt,
|
||||
(version&0xff000000)>>24,
|
||||
(version&0x00ff0000)>>16,
|
||||
version&0x0000ffff);
|
||||
return str;
|
||||
}
|
||||
|
||||
LONG msi_reg_set_val_str( HKEY hkey, LPCWSTR name, LPCWSTR value )
|
||||
{
|
||||
static const WCHAR emptyW[] = {0};
|
||||
|
|
|
@ -327,45 +327,6 @@ const WCHAR *msi_string_lookup_id( const string_table *st, UINT id )
|
|||
return st->strings[id].str;
|
||||
}
|
||||
|
||||
/*
|
||||
* msi_id2stringW
|
||||
*
|
||||
* [in] st - pointer to the string table
|
||||
* [in] id - id of the string to retrieve
|
||||
* [out] buffer - destination of the string
|
||||
* [in/out] sz - number of bytes available in the buffer on input
|
||||
* number of bytes used on output
|
||||
*
|
||||
* The size includes the terminating nul character. Short buffers
|
||||
* will be filled, but not nul terminated.
|
||||
*/
|
||||
UINT msi_id2stringW( const string_table *st, UINT id, LPWSTR buffer, UINT *sz )
|
||||
{
|
||||
UINT len;
|
||||
const WCHAR *str;
|
||||
|
||||
TRACE("Finding string %d of %d\n", id, st->maxcount);
|
||||
|
||||
str = msi_string_lookup_id( st, id );
|
||||
if( !str )
|
||||
return ERROR_FUNCTION_FAILED;
|
||||
|
||||
len = strlenW( str ) + 1;
|
||||
|
||||
if( !buffer )
|
||||
{
|
||||
*sz = len;
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
if( *sz < len )
|
||||
*sz = len;
|
||||
memcpy( buffer, str, (*sz)*sizeof(WCHAR) );
|
||||
*sz = len;
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* msi_id2stringA
|
||||
*
|
||||
|
@ -437,24 +398,6 @@ UINT msi_string2idW( const string_table *st, LPCWSTR str, UINT *id )
|
|||
return ERROR_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
UINT msi_strcmp( const string_table *st, UINT lval, UINT rval, UINT *res )
|
||||
{
|
||||
const WCHAR *l_str, *r_str;
|
||||
|
||||
l_str = msi_string_lookup_id( st, lval );
|
||||
if( !l_str )
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
|
||||
r_str = msi_string_lookup_id( st, rval );
|
||||
if( !r_str )
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
|
||||
/* does this do the right thing for all UTF-8 strings? */
|
||||
*res = strcmpW( l_str, r_str );
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
static void string_totalsize( const string_table *st, UINT *datasize, UINT *poolsize )
|
||||
{
|
||||
UINT i, len, holesize;
|
||||
|
|
Loading…
Reference in New Issue