Commit 5f3ac30b authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

msi: Remove superfluous pointer casts.

parent 20c70ed8
...@@ -887,7 +887,7 @@ typedef struct { ...@@ -887,7 +887,7 @@ typedef struct {
static UINT ITERATE_Actions(MSIRECORD *row, LPVOID param) static UINT ITERATE_Actions(MSIRECORD *row, LPVOID param)
{ {
iterate_action_param *iap= (iterate_action_param*)param; iterate_action_param *iap = param;
UINT rc; UINT rc;
LPCWSTR cond, action; LPCWSTR cond, action;
...@@ -1125,7 +1125,7 @@ UINT ACTION_PerformUIAction(MSIPACKAGE *package, const WCHAR *action, UINT scrip ...@@ -1125,7 +1125,7 @@ UINT ACTION_PerformUIAction(MSIPACKAGE *package, const WCHAR *action, UINT scrip
static UINT ITERATE_CreateFolders(MSIRECORD *row, LPVOID param) static UINT ITERATE_CreateFolders(MSIRECORD *row, LPVOID param)
{ {
MSIPACKAGE *package = (MSIPACKAGE*)param; MSIPACKAGE *package = param;
LPCWSTR dir; LPCWSTR dir;
LPWSTR full_path; LPWSTR full_path;
MSIRECORD *uirow; MSIRECORD *uirow;
...@@ -1307,7 +1307,7 @@ static UINT add_feature_child( MSIFEATURE *parent, MSIFEATURE *child ) ...@@ -1307,7 +1307,7 @@ static UINT add_feature_child( MSIFEATURE *parent, MSIFEATURE *child )
static UINT iterate_load_featurecomponents(MSIRECORD *row, LPVOID param) static UINT iterate_load_featurecomponents(MSIRECORD *row, LPVOID param)
{ {
_ilfs* ilfs= (_ilfs*)param; _ilfs* ilfs = param;
LPCWSTR component; LPCWSTR component;
MSICOMPONENT *comp; MSICOMPONENT *comp;
...@@ -1345,7 +1345,7 @@ static MSIFEATURE *find_feature_by_name( MSIPACKAGE *package, LPCWSTR name ) ...@@ -1345,7 +1345,7 @@ static MSIFEATURE *find_feature_by_name( MSIPACKAGE *package, LPCWSTR name )
static UINT load_feature(MSIRECORD * row, LPVOID param) static UINT load_feature(MSIRECORD * row, LPVOID param)
{ {
MSIPACKAGE* package = (MSIPACKAGE*)param; MSIPACKAGE* package = param;
MSIFEATURE* feature; MSIFEATURE* feature;
static const WCHAR Query1[] = static const WCHAR Query1[] =
{'S','E','L','E','C','T',' ', {'S','E','L','E','C','T',' ',
...@@ -1404,7 +1404,7 @@ static UINT load_feature(MSIRECORD * row, LPVOID param) ...@@ -1404,7 +1404,7 @@ static UINT load_feature(MSIRECORD * row, LPVOID param)
static UINT find_feature_children(MSIRECORD * row, LPVOID param) static UINT find_feature_children(MSIRECORD * row, LPVOID param)
{ {
MSIPACKAGE* package = (MSIPACKAGE*)param; MSIPACKAGE* package = param;
MSIFEATURE *parent, *child; MSIFEATURE *parent, *child;
child = find_feature_by_name( package, MSI_RecordGetString( row, 1 ) ); child = find_feature_by_name( package, MSI_RecordGetString( row, 1 ) );
...@@ -1497,7 +1497,7 @@ done: ...@@ -1497,7 +1497,7 @@ done:
static UINT load_file(MSIRECORD *row, LPVOID param) static UINT load_file(MSIRECORD *row, LPVOID param)
{ {
MSIPACKAGE* package = (MSIPACKAGE*)param; MSIPACKAGE* package = param;
LPCWSTR component; LPCWSTR component;
MSIFILE *file; MSIFILE *file;
...@@ -2033,7 +2033,7 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package) ...@@ -2033,7 +2033,7 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package)
static UINT ITERATE_CostFinalizeDirectories(MSIRECORD *row, LPVOID param) static UINT ITERATE_CostFinalizeDirectories(MSIRECORD *row, LPVOID param)
{ {
MSIPACKAGE *package = (MSIPACKAGE*)param; MSIPACKAGE *package = param;
LPCWSTR name; LPCWSTR name;
LPWSTR path; LPWSTR path;
MSIFOLDER *f; MSIFOLDER *f;
...@@ -2058,7 +2058,7 @@ static UINT ITERATE_CostFinalizeDirectories(MSIRECORD *row, LPVOID param) ...@@ -2058,7 +2058,7 @@ static UINT ITERATE_CostFinalizeDirectories(MSIRECORD *row, LPVOID param)
static UINT ITERATE_CostFinalizeConditions(MSIRECORD *row, LPVOID param) static UINT ITERATE_CostFinalizeConditions(MSIRECORD *row, LPVOID param)
{ {
MSIPACKAGE *package = (MSIPACKAGE*)param; MSIPACKAGE *package = param;
LPCWSTR name; LPCWSTR name;
MSIFEATURE *feature; MSIFEATURE *feature;
...@@ -2391,7 +2391,7 @@ static LPSTR parse_value(MSIPACKAGE *package, LPCWSTR value, DWORD *type, ...@@ -2391,7 +2391,7 @@ static LPSTR parse_value(MSIPACKAGE *package, LPCWSTR value, DWORD *type,
static UINT ITERATE_WriteRegistryValues(MSIRECORD *row, LPVOID param) static UINT ITERATE_WriteRegistryValues(MSIRECORD *row, LPVOID param)
{ {
MSIPACKAGE *package = (MSIPACKAGE*)param; MSIPACKAGE *package = param;
static const WCHAR szHCR[] = static const WCHAR szHCR[] =
{'H','K','E','Y','_','C','L','A','S','S','E','S','_', {'H','K','E','Y','_','C','L','A','S','S','E','S','_',
'R','O','O','T','\\',0}; 'R','O','O','T','\\',0};
...@@ -2640,7 +2640,7 @@ static UINT ACTION_InstallValidate(MSIPACKAGE *package) ...@@ -2640,7 +2640,7 @@ static UINT ACTION_InstallValidate(MSIPACKAGE *package)
static UINT ITERATE_LaunchConditions(MSIRECORD *row, LPVOID param) static UINT ITERATE_LaunchConditions(MSIRECORD *row, LPVOID param)
{ {
MSIPACKAGE* package = (MSIPACKAGE*)param; MSIPACKAGE* package = param;
LPCWSTR cond = NULL; LPCWSTR cond = NULL;
LPCWSTR message = NULL; LPCWSTR message = NULL;
UINT r; UINT r;
...@@ -3052,7 +3052,7 @@ static BOOL CALLBACK Typelib_EnumResNameProc( HMODULE hModule, LPCWSTR lpszType, ...@@ -3052,7 +3052,7 @@ static BOOL CALLBACK Typelib_EnumResNameProc( HMODULE hModule, LPCWSTR lpszType,
static UINT ITERATE_RegisterTypeLibraries(MSIRECORD *row, LPVOID param) static UINT ITERATE_RegisterTypeLibraries(MSIRECORD *row, LPVOID param)
{ {
MSIPACKAGE* package = (MSIPACKAGE*)param; MSIPACKAGE* package = param;
LPCWSTR component; LPCWSTR component;
MSICOMPONENT *comp; MSICOMPONENT *comp;
MSIFILE *file; MSIFILE *file;
...@@ -3168,7 +3168,7 @@ static UINT ACTION_RegisterTypeLibraries(MSIPACKAGE *package) ...@@ -3168,7 +3168,7 @@ static UINT ACTION_RegisterTypeLibraries(MSIPACKAGE *package)
static UINT ITERATE_CreateShortcuts(MSIRECORD *row, LPVOID param) static UINT ITERATE_CreateShortcuts(MSIRECORD *row, LPVOID param)
{ {
MSIPACKAGE *package = (MSIPACKAGE*)param; MSIPACKAGE *package = param;
LPWSTR target_file, target_folder, filename; LPWSTR target_file, target_folder, filename;
LPCWSTR buffer, extension; LPCWSTR buffer, extension;
MSICOMPONENT *comp; MSICOMPONENT *comp;
...@@ -3338,7 +3338,7 @@ static UINT ACTION_CreateShortcuts(MSIPACKAGE *package) ...@@ -3338,7 +3338,7 @@ static UINT ACTION_CreateShortcuts(MSIPACKAGE *package)
static UINT ITERATE_PublishIcon(MSIRECORD *row, LPVOID param) static UINT ITERATE_PublishIcon(MSIRECORD *row, LPVOID param)
{ {
MSIPACKAGE* package = (MSIPACKAGE*)param; MSIPACKAGE* package = param;
HANDLE the_file; HANDLE the_file;
LPWSTR FilePath; LPWSTR FilePath;
LPCWSTR FileName; LPCWSTR FileName;
...@@ -3708,7 +3708,7 @@ end: ...@@ -3708,7 +3708,7 @@ end:
static UINT ITERATE_WriteIniValues(MSIRECORD *row, LPVOID param) static UINT ITERATE_WriteIniValues(MSIRECORD *row, LPVOID param)
{ {
MSIPACKAGE *package = (MSIPACKAGE*)param; MSIPACKAGE *package = param;
LPCWSTR component, section, key, value, identifier, dirproperty; LPCWSTR component, section, key, value, identifier, dirproperty;
LPWSTR deformated_section, deformated_key, deformated_value; LPWSTR deformated_section, deformated_key, deformated_value;
LPWSTR folder, filename, fullname = NULL; LPWSTR folder, filename, fullname = NULL;
...@@ -3834,7 +3834,7 @@ static UINT ACTION_WriteIniValues(MSIPACKAGE *package) ...@@ -3834,7 +3834,7 @@ static UINT ACTION_WriteIniValues(MSIPACKAGE *package)
static UINT ITERATE_SelfRegModules(MSIRECORD *row, LPVOID param) static UINT ITERATE_SelfRegModules(MSIRECORD *row, LPVOID param)
{ {
MSIPACKAGE *package = (MSIPACKAGE*)param; MSIPACKAGE *package = param;
LPCWSTR filename; LPCWSTR filename;
LPWSTR FullName; LPWSTR FullName;
MSIFILE *file; MSIFILE *file;
...@@ -4544,7 +4544,7 @@ static UINT ACTION_ExecuteAction(MSIPACKAGE *package) ...@@ -4544,7 +4544,7 @@ static UINT ACTION_ExecuteAction(MSIPACKAGE *package)
static UINT ITERATE_PublishComponent(MSIRECORD *rec, LPVOID param) static UINT ITERATE_PublishComponent(MSIRECORD *rec, LPVOID param)
{ {
MSIPACKAGE *package = (MSIPACKAGE*)param; MSIPACKAGE *package = param;
LPCWSTR compgroupid=NULL; LPCWSTR compgroupid=NULL;
LPCWSTR feature=NULL; LPCWSTR feature=NULL;
LPCWSTR text = NULL; LPCWSTR text = NULL;
...@@ -4640,7 +4640,7 @@ static UINT ACTION_PublishComponents(MSIPACKAGE *package) ...@@ -4640,7 +4640,7 @@ static UINT ACTION_PublishComponents(MSIPACKAGE *package)
static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param) static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param)
{ {
MSIPACKAGE *package = (MSIPACKAGE*)param; MSIPACKAGE *package = param;
MSIRECORD *row; MSIRECORD *row;
MSIFILE *file; MSIFILE *file;
SC_HANDLE hscm, service = NULL; SC_HANDLE hscm, service = NULL;
...@@ -4781,7 +4781,7 @@ static LPCWSTR *msi_service_args_to_vector(LPWSTR args, DWORD *numargs) ...@@ -4781,7 +4781,7 @@ static LPCWSTR *msi_service_args_to_vector(LPWSTR args, DWORD *numargs)
static UINT ITERATE_StartService(MSIRECORD *rec, LPVOID param) static UINT ITERATE_StartService(MSIRECORD *rec, LPVOID param)
{ {
MSIPACKAGE *package = (MSIPACKAGE *)param; MSIPACKAGE *package = param;
MSICOMPONENT *comp; MSICOMPONENT *comp;
SC_HANDLE scm, service = NULL; SC_HANDLE scm, service = NULL;
LPCWSTR name, *vector = NULL; LPCWSTR name, *vector = NULL;
...@@ -4894,7 +4894,7 @@ error: ...@@ -4894,7 +4894,7 @@ error:
static UINT ITERATE_StopService(MSIRECORD *rec, LPVOID param) static UINT ITERATE_StopService(MSIRECORD *rec, LPVOID param)
{ {
MSIPACKAGE *package = (MSIPACKAGE *)param; MSIPACKAGE *package = param;
MSICOMPONENT *comp; MSICOMPONENT *comp;
SERVICE_STATUS status; SERVICE_STATUS status;
SERVICE_STATUS_PROCESS ssp; SERVICE_STATUS_PROCESS ssp;
...@@ -4991,7 +4991,7 @@ static MSIFILE *msi_find_file( MSIPACKAGE *package, LPCWSTR filename ) ...@@ -4991,7 +4991,7 @@ static MSIFILE *msi_find_file( MSIPACKAGE *package, LPCWSTR filename )
static UINT ITERATE_InstallODBCDriver( MSIRECORD *rec, LPVOID param ) static UINT ITERATE_InstallODBCDriver( MSIRECORD *rec, LPVOID param )
{ {
MSIPACKAGE *package = (MSIPACKAGE*)param; MSIPACKAGE *package = param;
LPWSTR driver, driver_path, ptr; LPWSTR driver, driver_path, ptr;
WCHAR outpath[MAX_PATH]; WCHAR outpath[MAX_PATH];
MSIFILE *driver_file, *setup_file; MSIFILE *driver_file, *setup_file;
...@@ -5057,7 +5057,7 @@ static UINT ITERATE_InstallODBCDriver( MSIRECORD *rec, LPVOID param ) ...@@ -5057,7 +5057,7 @@ static UINT ITERATE_InstallODBCDriver( MSIRECORD *rec, LPVOID param )
static UINT ITERATE_InstallODBCTranslator( MSIRECORD *rec, LPVOID param ) static UINT ITERATE_InstallODBCTranslator( MSIRECORD *rec, LPVOID param )
{ {
MSIPACKAGE *package = (MSIPACKAGE*)param; MSIPACKAGE *package = param;
LPWSTR translator, translator_path, ptr; LPWSTR translator, translator_path, ptr;
WCHAR outpath[MAX_PATH]; WCHAR outpath[MAX_PATH];
MSIFILE *translator_file, *setup_file; MSIFILE *translator_file, *setup_file;
...@@ -5606,7 +5606,7 @@ static BOOL move_files_wildcard(LPWSTR source, LPWSTR dest, int options) ...@@ -5606,7 +5606,7 @@ static BOOL move_files_wildcard(LPWSTR source, LPWSTR dest, int options)
{ {
file = LIST_ENTRY(list_head(&files.entry), FILE_LIST, entry); file = LIST_ENTRY(list_head(&files.entry), FILE_LIST, entry);
msi_move_file((LPCWSTR)file->source, (LPCWSTR)file->dest, options); msi_move_file(file->source, file->dest, options);
list_remove(&file->entry); list_remove(&file->entry);
free_file_entry(file); free_file_entry(file);
...@@ -5866,7 +5866,7 @@ typedef struct tagASSEMBLY_NAME ...@@ -5866,7 +5866,7 @@ typedef struct tagASSEMBLY_NAME
static UINT parse_assembly_name(MSIRECORD *rec, LPVOID param) static UINT parse_assembly_name(MSIRECORD *rec, LPVOID param)
{ {
ASSEMBLY_NAME *asmname = (ASSEMBLY_NAME *)param; ASSEMBLY_NAME *asmname = param;
LPCWSTR name = MSI_RecordGetString(rec, 2); LPCWSTR name = MSI_RecordGetString(rec, 2);
LPWSTR val = msi_dup_record_field(rec, 3); LPWSTR val = msi_dup_record_field(rec, 3);
...@@ -5986,7 +5986,7 @@ done: ...@@ -5986,7 +5986,7 @@ done:
static UINT load_assembly(MSIRECORD *rec, LPVOID param) static UINT load_assembly(MSIRECORD *rec, LPVOID param)
{ {
ASSEMBLY_LIST *list = (ASSEMBLY_LIST *)param; ASSEMBLY_LIST *list = param;
MSIASSEMBLY *assembly; MSIASSEMBLY *assembly;
assembly = msi_alloc_zero(sizeof(MSIASSEMBLY)); assembly = msi_alloc_zero(sizeof(MSIASSEMBLY));
...@@ -6091,7 +6091,7 @@ static BOOL installassembly_cb(MSIPACKAGE *package, LPCWSTR file, DWORD action, ...@@ -6091,7 +6091,7 @@ static BOOL installassembly_cb(MSIPACKAGE *package, LPCWSTR file, DWORD action,
{ {
MSIASSEMBLY *assembly; MSIASSEMBLY *assembly;
WCHAR temppath[MAX_PATH]; WCHAR temppath[MAX_PATH];
struct list *assemblies = (struct list *)user; struct list *assemblies = user;
UINT r; UINT r;
if (!find_assembly(assemblies, file, &assembly)) if (!find_assembly(assemblies, file, &assembly))
......
...@@ -639,8 +639,7 @@ static UINT ACTION_FileVersionMatches(const MSISIGNATURE *sig, LPCWSTR filePath, ...@@ -639,8 +639,7 @@ static UINT ACTION_FileVersionMatches(const MSISIGNATURE *sig, LPCWSTR filePath,
VerQueryValueW(buf, rootW, &subBlock, &versionLen); VerQueryValueW(buf, rootW, &subBlock, &versionLen);
if (subBlock) if (subBlock)
{ {
VS_FIXEDFILEINFO *info = VS_FIXEDFILEINFO *info = subBlock;
(VS_FIXEDFILEINFO *)subBlock;
TRACE("Comparing file version %d.%d.%d.%d:\n", TRACE("Comparing file version %d.%d.%d.%d:\n",
HIWORD(info->dwFileVersionMS), HIWORD(info->dwFileVersionMS),
......
...@@ -486,7 +486,7 @@ static MSIEXTENSION *load_given_extension( MSIPACKAGE *package, LPCWSTR name ) ...@@ -486,7 +486,7 @@ static MSIEXTENSION *load_given_extension( MSIPACKAGE *package, LPCWSTR name )
static UINT iterate_load_verb(MSIRECORD *row, LPVOID param) static UINT iterate_load_verb(MSIRECORD *row, LPVOID param)
{ {
MSIPACKAGE* package = (MSIPACKAGE*)param; MSIPACKAGE* package = param;
MSIVERB *verb; MSIVERB *verb;
LPCWSTR buffer; LPCWSTR buffer;
MSIEXTENSION *extension; MSIEXTENSION *extension;
...@@ -527,7 +527,7 @@ static UINT iterate_all_classes(MSIRECORD *rec, LPVOID param) ...@@ -527,7 +527,7 @@ static UINT iterate_all_classes(MSIRECORD *rec, LPVOID param)
LPCWSTR clsid; LPCWSTR clsid;
LPCWSTR context; LPCWSTR context;
LPCWSTR buffer; LPCWSTR buffer;
MSIPACKAGE* package =(MSIPACKAGE*)param; MSIPACKAGE* package = param;
MSICLASS *cls; MSICLASS *cls;
BOOL match = FALSE; BOOL match = FALSE;
...@@ -577,7 +577,7 @@ static UINT iterate_all_extensions(MSIRECORD *rec, LPVOID param) ...@@ -577,7 +577,7 @@ static UINT iterate_all_extensions(MSIRECORD *rec, LPVOID param)
MSICOMPONENT *comp; MSICOMPONENT *comp;
LPCWSTR buffer; LPCWSTR buffer;
LPCWSTR extension; LPCWSTR extension;
MSIPACKAGE* package =(MSIPACKAGE*)param; MSIPACKAGE* package = param;
BOOL match = FALSE; BOOL match = FALSE;
MSIEXTENSION *ext; MSIEXTENSION *ext;
...@@ -622,7 +622,7 @@ static VOID load_all_extensions(MSIPACKAGE *package) ...@@ -622,7 +622,7 @@ static VOID load_all_extensions(MSIPACKAGE *package)
static UINT iterate_all_progids(MSIRECORD *rec, LPVOID param) static UINT iterate_all_progids(MSIRECORD *rec, LPVOID param)
{ {
LPCWSTR buffer; LPCWSTR buffer;
MSIPACKAGE* package =(MSIPACKAGE*)param; MSIPACKAGE* package = param;
buffer = MSI_RecordGetString(rec,1); buffer = MSI_RecordGetString(rec,1);
load_given_progid(package,buffer); load_given_progid(package,buffer);
...@@ -666,7 +666,7 @@ static VOID load_all_verbs(MSIPACKAGE *package) ...@@ -666,7 +666,7 @@ static VOID load_all_verbs(MSIPACKAGE *package)
static UINT iterate_all_mimes(MSIRECORD *rec, LPVOID param) static UINT iterate_all_mimes(MSIRECORD *rec, LPVOID param)
{ {
LPCWSTR buffer; LPCWSTR buffer;
MSIPACKAGE* package =(MSIPACKAGE*)param; MSIPACKAGE* package = param;
buffer = MSI_RecordGetString(rec,1); buffer = MSI_RecordGetString(rec,1);
load_given_mime(package,buffer); load_given_mime(package,buffer);
......
...@@ -1202,7 +1202,7 @@ done: ...@@ -1202,7 +1202,7 @@ done:
static UINT merge_diff_row(MSIRECORD *rec, LPVOID param) static UINT merge_diff_row(MSIRECORD *rec, LPVOID param)
{ {
MERGEDATA *data = (MERGEDATA *)param; MERGEDATA *data = param;
MERGETABLE *table = data->curtable; MERGETABLE *table = data->curtable;
MERGEROW *mergerow; MERGEROW *mergerow;
MSIQUERY *dbview; MSIQUERY *dbview;
...@@ -1257,7 +1257,7 @@ done: ...@@ -1257,7 +1257,7 @@ done:
static UINT merge_diff_tables(MSIRECORD *rec, LPVOID param) static UINT merge_diff_tables(MSIRECORD *rec, LPVOID param)
{ {
MERGEDATA *data = (MERGEDATA *)param; MERGEDATA *data = param;
MERGETABLE *table; MERGETABLE *table;
MSIQUERY *dbview; MSIQUERY *dbview;
MSIQUERY *mergeview = NULL; MSIQUERY *mergeview = NULL;
...@@ -1562,7 +1562,7 @@ static HRESULT WINAPI mrd_IsTablePersistent( IWineMsiRemoteDatabase *iface, ...@@ -1562,7 +1562,7 @@ static HRESULT WINAPI mrd_IsTablePersistent( IWineMsiRemoteDatabase *iface,
BSTR table, MSICONDITION *persistent ) BSTR table, MSICONDITION *persistent )
{ {
msi_remote_database_impl *This = mrd_from_IWineMsiRemoteDatabase( iface ); msi_remote_database_impl *This = mrd_from_IWineMsiRemoteDatabase( iface );
*persistent = MsiDatabaseIsTablePersistentW(This->database, (LPWSTR)table); *persistent = MsiDatabaseIsTablePersistentW(This->database, table);
return S_OK; return S_OK;
} }
...@@ -1570,7 +1570,7 @@ static HRESULT WINAPI mrd_GetPrimaryKeys( IWineMsiRemoteDatabase *iface, ...@@ -1570,7 +1570,7 @@ static HRESULT WINAPI mrd_GetPrimaryKeys( IWineMsiRemoteDatabase *iface,
BSTR table, MSIHANDLE *keys ) BSTR table, MSIHANDLE *keys )
{ {
msi_remote_database_impl *This = mrd_from_IWineMsiRemoteDatabase( iface ); msi_remote_database_impl *This = mrd_from_IWineMsiRemoteDatabase( iface );
UINT r = MsiDatabaseGetPrimaryKeysW(This->database, (LPWSTR)table, keys); UINT r = MsiDatabaseGetPrimaryKeysW(This->database, table, keys);
return HRESULT_FROM_WIN32(r); return HRESULT_FROM_WIN32(r);
} }
...@@ -1586,7 +1586,7 @@ static HRESULT WINAPI mrd_OpenView( IWineMsiRemoteDatabase *iface, ...@@ -1586,7 +1586,7 @@ static HRESULT WINAPI mrd_OpenView( IWineMsiRemoteDatabase *iface,
BSTR query, MSIHANDLE *view ) BSTR query, MSIHANDLE *view )
{ {
msi_remote_database_impl *This = mrd_from_IWineMsiRemoteDatabase( iface ); msi_remote_database_impl *This = mrd_from_IWineMsiRemoteDatabase( iface );
UINT r = MsiDatabaseOpenViewW(This->database, (LPWSTR)query, view); UINT r = MsiDatabaseOpenViewW(This->database, query, view);
return HRESULT_FROM_WIN32(r); return HRESULT_FROM_WIN32(r);
} }
......
...@@ -1725,7 +1725,7 @@ static UINT msi_dialog_pathedit_control( msi_dialog *dialog, MSIRECORD *rec ) ...@@ -1725,7 +1725,7 @@ static UINT msi_dialog_pathedit_control( msi_dialog *dialog, MSIRECORD *rec )
/* radio buttons are a bit different from normal controls */ /* radio buttons are a bit different from normal controls */
static UINT msi_dialog_create_radiobutton( MSIRECORD *rec, LPVOID param ) static UINT msi_dialog_create_radiobutton( MSIRECORD *rec, LPVOID param )
{ {
radio_button_group_descr *group = (radio_button_group_descr *)param; radio_button_group_descr *group = param;
msi_dialog *dialog = group->dialog; msi_dialog *dialog = group->dialog;
msi_control *control; msi_control *control;
LPCWSTR prop, text, name; LPCWSTR prop, text, name;
...@@ -3032,7 +3032,7 @@ static LRESULT msi_dialog_oncreate( HWND hwnd, LPCREATESTRUCTW cs ) ...@@ -3032,7 +3032,7 @@ static LRESULT msi_dialog_oncreate( HWND hwnd, LPCREATESTRUCTW cs )
'D','e','f','a','u','l','t','U','I','F','o','n','t',0 }; 'D','e','f','a','u','l','t','U','I','F','o','n','t',0 };
static const WCHAR dfv[] = { static const WCHAR dfv[] = {
'M','S',' ','S','h','e','l','l',' ','D','l','g',0 }; 'M','S',' ','S','h','e','l','l',' ','D','l','g',0 };
msi_dialog *dialog = (msi_dialog*) cs->lpCreateParams; msi_dialog *dialog = cs->lpCreateParams;
MSIRECORD *rec = NULL; MSIRECORD *rec = NULL;
LPWSTR title = NULL; LPWSTR title = NULL;
RECT pos; RECT pos;
...@@ -3152,7 +3152,7 @@ struct rec_list ...@@ -3152,7 +3152,7 @@ struct rec_list
static UINT add_rec_to_list( MSIRECORD *rec, LPVOID param ) static UINT add_rec_to_list( MSIRECORD *rec, LPVOID param )
{ {
struct rec_list *add_rec; struct rec_list *add_rec;
struct list *records = (struct list *)param; struct list *records = param;
msiobj_addref( &rec->hdr ); msiobj_addref( &rec->hdr );
......
...@@ -323,7 +323,7 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package) ...@@ -323,7 +323,7 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
static UINT ITERATE_DuplicateFiles(MSIRECORD *row, LPVOID param) static UINT ITERATE_DuplicateFiles(MSIRECORD *row, LPVOID param)
{ {
MSIPACKAGE *package = (MSIPACKAGE*)param; MSIPACKAGE *package = param;
WCHAR dest_name[0x100]; WCHAR dest_name[0x100];
LPWSTR dest_path, dest; LPWSTR dest_path, dest;
LPCWSTR file_key, component; LPCWSTR file_key, component;
...@@ -468,7 +468,7 @@ static BOOL verify_comp_for_removal(MSICOMPONENT *comp, UINT install_mode) ...@@ -468,7 +468,7 @@ static BOOL verify_comp_for_removal(MSICOMPONENT *comp, UINT install_mode)
static UINT ITERATE_RemoveFiles(MSIRECORD *row, LPVOID param) static UINT ITERATE_RemoveFiles(MSIRECORD *row, LPVOID param)
{ {
MSIPACKAGE *package = (MSIPACKAGE*)param; MSIPACKAGE *package = param;
MSICOMPONENT *comp; MSICOMPONENT *comp;
LPCWSTR component, filename, dirprop; LPCWSTR component, filename, dirprop;
UINT install_mode; UINT install_mode;
......
...@@ -170,7 +170,7 @@ end: ...@@ -170,7 +170,7 @@ end:
static UINT ITERATE_RegisterFonts(MSIRECORD *row, LPVOID param) static UINT ITERATE_RegisterFonts(MSIRECORD *row, LPVOID param)
{ {
MSIPACKAGE *package = (MSIPACKAGE*)param; MSIPACKAGE *package = param;
LPWSTR name; LPWSTR name;
LPCWSTR filename; LPCWSTR filename;
MSIFILE *file; MSIFILE *file;
......
...@@ -174,7 +174,7 @@ void *msihandle2msiinfo(MSIHANDLE handle, UINT type) ...@@ -174,7 +174,7 @@ void *msihandle2msiinfo(MSIHANDLE handle, UINT type)
out: out:
LeaveCriticalSection( &MSI_handle_cs ); LeaveCriticalSection( &MSI_handle_cs );
return (void*) ret; return ret;
} }
IUnknown *msi_get_remote( MSIHANDLE handle ) IUnknown *msi_get_remote( MSIHANDLE handle )
......
...@@ -260,7 +260,7 @@ static UINT CDECL msi_media_get_disk_info(MSIPACKAGE *package, MSIMEDIAINFO *mi) ...@@ -260,7 +260,7 @@ static UINT CDECL msi_media_get_disk_info(MSIPACKAGE *package, MSIMEDIAINFO *mi)
static INT_PTR cabinet_partial_file(FDINOTIFICATIONTYPE fdint, static INT_PTR cabinet_partial_file(FDINOTIFICATIONTYPE fdint,
PFDINOTIFICATION pfdin) PFDINOTIFICATION pfdin)
{ {
MSICABDATA *data = (MSICABDATA *)pfdin->pv; MSICABDATA *data = pfdin->pv;
data->mi->is_continuous = FALSE; data->mi->is_continuous = FALSE;
return 0; return 0;
} }
...@@ -268,7 +268,7 @@ static INT_PTR cabinet_partial_file(FDINOTIFICATIONTYPE fdint, ...@@ -268,7 +268,7 @@ static INT_PTR cabinet_partial_file(FDINOTIFICATIONTYPE fdint,
static INT_PTR cabinet_next_cabinet(FDINOTIFICATIONTYPE fdint, static INT_PTR cabinet_next_cabinet(FDINOTIFICATIONTYPE fdint,
PFDINOTIFICATION pfdin) PFDINOTIFICATION pfdin)
{ {
MSICABDATA *data = (MSICABDATA *)pfdin->pv; MSICABDATA *data = pfdin->pv;
MSIMEDIAINFO *mi = data->mi; MSIMEDIAINFO *mi = data->mi;
LPWSTR cab = strdupAtoW(pfdin->psz1); LPWSTR cab = strdupAtoW(pfdin->psz1);
INT_PTR res = -1; INT_PTR res = -1;
...@@ -314,7 +314,7 @@ done: ...@@ -314,7 +314,7 @@ done:
static INT_PTR cabinet_copy_file(FDINOTIFICATIONTYPE fdint, static INT_PTR cabinet_copy_file(FDINOTIFICATIONTYPE fdint,
PFDINOTIFICATION pfdin) PFDINOTIFICATION pfdin)
{ {
MSICABDATA *data = (MSICABDATA*)pfdin->pv; MSICABDATA *data = pfdin->pv;
HANDLE handle = 0; HANDLE handle = 0;
LPWSTR path = NULL; LPWSTR path = NULL;
DWORD attrs; DWORD attrs;
...@@ -349,7 +349,7 @@ done: ...@@ -349,7 +349,7 @@ done:
static INT_PTR cabinet_close_file_info(FDINOTIFICATIONTYPE fdint, static INT_PTR cabinet_close_file_info(FDINOTIFICATIONTYPE fdint,
PFDINOTIFICATION pfdin) PFDINOTIFICATION pfdin)
{ {
MSICABDATA *data = (MSICABDATA*)pfdin->pv; MSICABDATA *data = pfdin->pv;
FILETIME ft; FILETIME ft;
FILETIME ftLocal; FILETIME ftLocal;
HANDLE handle = (HANDLE)pfdin->hf; HANDLE handle = (HANDLE)pfdin->hf;
......
...@@ -201,19 +201,19 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) ...@@ -201,19 +201,19 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
if ( IsEqualCLSID (rclsid, &CLSID_IMsiServerX2) ) if ( IsEqualCLSID (rclsid, &CLSID_IMsiServerX2) )
{ {
*ppv = (LPVOID) &MsiServer_CF; *ppv = &MsiServer_CF;
return S_OK; return S_OK;
} }
if ( IsEqualCLSID (rclsid, &CLSID_IWineMsiRemoteCustomAction) ) if ( IsEqualCLSID (rclsid, &CLSID_IWineMsiRemoteCustomAction) )
{ {
*ppv = (LPVOID) &WineMsiCustomRemote_CF; *ppv = &WineMsiCustomRemote_CF;
return S_OK; return S_OK;
} }
if ( IsEqualCLSID (rclsid, &CLSID_IWineMsiRemotePackage) ) if ( IsEqualCLSID (rclsid, &CLSID_IWineMsiRemotePackage) )
{ {
*ppv = (LPVOID) &WineMsiRemotePackage_CF; *ppv = &WineMsiRemotePackage_CF;
return S_OK; return S_OK;
} }
......
...@@ -1692,7 +1692,7 @@ static HRESULT WINAPI mrp_GetProperty( IWineMsiRemotePackage *iface, BSTR proper ...@@ -1692,7 +1692,7 @@ static HRESULT WINAPI mrp_GetProperty( IWineMsiRemotePackage *iface, BSTR proper
static HRESULT WINAPI mrp_SetProperty( IWineMsiRemotePackage *iface, BSTR property, BSTR value ) static HRESULT WINAPI mrp_SetProperty( IWineMsiRemotePackage *iface, BSTR property, BSTR value )
{ {
msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface ); msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface );
UINT r = MsiSetPropertyW(This->package, (LPWSTR)property, (LPWSTR)value); UINT r = MsiSetPropertyW(This->package, property, value);
return HRESULT_FROM_WIN32(r); return HRESULT_FROM_WIN32(r);
} }
...@@ -1706,14 +1706,14 @@ static HRESULT WINAPI mrp_ProcessMessage( IWineMsiRemotePackage *iface, INSTALLM ...@@ -1706,14 +1706,14 @@ static HRESULT WINAPI mrp_ProcessMessage( IWineMsiRemotePackage *iface, INSTALLM
static HRESULT WINAPI mrp_DoAction( IWineMsiRemotePackage *iface, BSTR action ) static HRESULT WINAPI mrp_DoAction( IWineMsiRemotePackage *iface, BSTR action )
{ {
msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface ); msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface );
UINT r = MsiDoActionW(This->package, (LPWSTR)action); UINT r = MsiDoActionW(This->package, action);
return HRESULT_FROM_WIN32(r); return HRESULT_FROM_WIN32(r);
} }
static HRESULT WINAPI mrp_Sequence( IWineMsiRemotePackage *iface, BSTR table, int sequence ) static HRESULT WINAPI mrp_Sequence( IWineMsiRemotePackage *iface, BSTR table, int sequence )
{ {
msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface ); msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface );
UINT r = MsiSequenceW(This->package, (LPWSTR)table, sequence); UINT r = MsiSequenceW(This->package, table, sequence);
return HRESULT_FROM_WIN32(r); return HRESULT_FROM_WIN32(r);
} }
...@@ -1727,7 +1727,7 @@ static HRESULT WINAPI mrp_GetTargetPath( IWineMsiRemotePackage *iface, BSTR fold ...@@ -1727,7 +1727,7 @@ static HRESULT WINAPI mrp_GetTargetPath( IWineMsiRemotePackage *iface, BSTR fold
static HRESULT WINAPI mrp_SetTargetPath( IWineMsiRemotePackage *iface, BSTR folder, BSTR value) static HRESULT WINAPI mrp_SetTargetPath( IWineMsiRemotePackage *iface, BSTR folder, BSTR value)
{ {
msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface ); msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface );
UINT r = MsiSetTargetPathW(This->package, (LPWSTR)folder, (LPWSTR)value); UINT r = MsiSetTargetPathW(This->package, folder, value);
return HRESULT_FROM_WIN32(r); return HRESULT_FROM_WIN32(r);
} }
...@@ -1749,14 +1749,14 @@ static HRESULT WINAPI mrp_GetFeatureState( IWineMsiRemotePackage *iface, BSTR fe ...@@ -1749,14 +1749,14 @@ static HRESULT WINAPI mrp_GetFeatureState( IWineMsiRemotePackage *iface, BSTR fe
INSTALLSTATE *installed, INSTALLSTATE *action ) INSTALLSTATE *installed, INSTALLSTATE *action )
{ {
msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface ); msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface );
UINT r = MsiGetFeatureStateW(This->package, (LPWSTR)feature, installed, action); UINT r = MsiGetFeatureStateW(This->package, feature, installed, action);
return HRESULT_FROM_WIN32(r); return HRESULT_FROM_WIN32(r);
} }
static HRESULT WINAPI mrp_SetFeatureState( IWineMsiRemotePackage *iface, BSTR feature, INSTALLSTATE state ) static HRESULT WINAPI mrp_SetFeatureState( IWineMsiRemotePackage *iface, BSTR feature, INSTALLSTATE state )
{ {
msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface ); msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface );
UINT r = MsiSetFeatureStateW(This->package, (LPWSTR)feature, state); UINT r = MsiSetFeatureStateW(This->package, feature, state);
return HRESULT_FROM_WIN32(r); return HRESULT_FROM_WIN32(r);
} }
...@@ -1764,14 +1764,14 @@ static HRESULT WINAPI mrp_GetComponentState( IWineMsiRemotePackage *iface, BSTR ...@@ -1764,14 +1764,14 @@ static HRESULT WINAPI mrp_GetComponentState( IWineMsiRemotePackage *iface, BSTR
INSTALLSTATE *installed, INSTALLSTATE *action ) INSTALLSTATE *installed, INSTALLSTATE *action )
{ {
msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface ); msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface );
UINT r = MsiGetComponentStateW(This->package, (LPWSTR)component, installed, action); UINT r = MsiGetComponentStateW(This->package, component, installed, action);
return HRESULT_FROM_WIN32(r); return HRESULT_FROM_WIN32(r);
} }
static HRESULT WINAPI mrp_SetComponentState( IWineMsiRemotePackage *iface, BSTR component, INSTALLSTATE state ) static HRESULT WINAPI mrp_SetComponentState( IWineMsiRemotePackage *iface, BSTR component, INSTALLSTATE state )
{ {
msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface ); msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface );
UINT r = MsiSetComponentStateW(This->package, (LPWSTR)component, state); UINT r = MsiSetComponentStateW(This->package, component, state);
return HRESULT_FROM_WIN32(r); return HRESULT_FROM_WIN32(r);
} }
...@@ -1809,7 +1809,7 @@ static HRESULT WINAPI mrp_FormatRecord( IWineMsiRemotePackage *iface, MSIHANDLE ...@@ -1809,7 +1809,7 @@ static HRESULT WINAPI mrp_FormatRecord( IWineMsiRemotePackage *iface, MSIHANDLE
static HRESULT WINAPI mrp_EvaluateCondition( IWineMsiRemotePackage *iface, BSTR condition ) static HRESULT WINAPI mrp_EvaluateCondition( IWineMsiRemotePackage *iface, BSTR condition )
{ {
msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface ); msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface );
UINT r = MsiEvaluateConditionW(This->package, (LPWSTR)condition); UINT r = MsiEvaluateConditionW(This->package, condition);
return HRESULT_FROM_WIN32(r); return HRESULT_FROM_WIN32(r);
} }
......
...@@ -475,7 +475,7 @@ static UINT get_user_sid(LPWSTR *usersid) ...@@ -475,7 +475,7 @@ static UINT get_user_sid(LPWSTR *usersid)
return ERROR_FUNCTION_FAILED; return ERROR_FUNCTION_FAILED;
size = sizeof(buf); size = sizeof(buf);
if (!GetTokenInformation(token, TokenUser, (void *)buf, size, &size)) { if (!GetTokenInformation(token, TokenUser, buf, size, &size)) {
CloseHandle(token); CloseHandle(token);
return ERROR_FUNCTION_FAILED; return ERROR_FUNCTION_FAILED;
} }
......
...@@ -101,7 +101,7 @@ static void append_productcode(MSIPACKAGE* package, LPCWSTR action_property, ...@@ -101,7 +101,7 @@ static void append_productcode(MSIPACKAGE* package, LPCWSTR action_property,
static UINT ITERATE_FindRelatedProducts(MSIRECORD *rec, LPVOID param) static UINT ITERATE_FindRelatedProducts(MSIRECORD *rec, LPVOID param)
{ {
MSIPACKAGE *package = (MSIPACKAGE*)param; MSIPACKAGE *package = param;
WCHAR product[GUID_SIZE]; WCHAR product[GUID_SIZE];
DWORD index = 0; DWORD index = 0;
DWORD attributes = 0; DWORD attributes = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment