Signed-off-by: Michael Stefaniuc mstefani@winehq.org --- Empty strings, single WCHAR strings and szDotDot as it was in the way.
Starting to nibble at msi else the change would be huge and unreviewable.
dlls/msi/action.c | 44 ++++++++++++++--------------- dlls/msi/appsearch.c | 14 ++++----- dlls/msi/assembly.c | 3 +- dlls/msi/automation.c | 3 +- dlls/msi/classes.c | 7 ++--- dlls/msi/cond.y | 4 +-- dlls/msi/custom.c | 2 +- dlls/msi/database.c | 13 ++++----- dlls/msi/dialog.c | 24 +++++++--------- dlls/msi/files.c | 7 ++--- dlls/msi/install.c | 2 +- dlls/msi/msi.c | 25 ++++++++-------- dlls/msi/msipriv.h | 9 ------ dlls/msi/msiquery.c | 8 +++--- dlls/msi/package.c | 66 +++++++++++++++++++++---------------------- dlls/msi/registry.c | 4 +-- dlls/msi/select.c | 4 +-- dlls/msi/source.c | 6 ++-- dlls/msi/string.c | 2 +- dlls/msi/table.c | 4 +-- dlls/msi/upgrade.c | 2 +- 21 files changed, 115 insertions(+), 138 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c index d02860e4d71..6fcdf275415 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -1467,9 +1467,9 @@ static UINT load_folder( MSIRECORD *row, LPVOID param ) src_long = folder_split_path( src_short, '|' );
/* check for no-op dirs */ - if (tgt_short && !wcscmp( szDot, tgt_short )) + if (tgt_short && !wcscmp( L".", tgt_short )) tgt_short = szEmpty; - if (src_short && !wcscmp( szDot, src_short )) + if (src_short && !wcscmp( L".", src_short )) src_short = szEmpty;
if (!tgt_long) @@ -1553,7 +1553,7 @@ static UINT load_all_folders( MSIPACKAGE *package )
static UINT ACTION_CostInitialize(MSIPACKAGE *package) { - msi_set_property( package->db, szCostingComplete, szZero, -1 ); + msi_set_property( package->db, szCostingComplete, L"0", -1 ); msi_set_property( package->db, szRootDrive, szCRoot, -1 );
load_all_folders( package ); @@ -1772,7 +1772,7 @@ static BOOL process_overrides( MSIPACKAGE *package, int level ) ret |= process_state_property( package, level, szAdvertise, INSTALLSTATE_ADVERTISED );
if (ret) - msi_set_property( package->db, szPreselected, szOne, -1 ); + msi_set_property( package->db, szPreselected, L"1", -1 );
return ret; } @@ -2207,7 +2207,7 @@ WCHAR *msi_build_directory_name( DWORD count, ... ) const WCHAR *str = va_arg( va, const WCHAR * ); if (!str) continue; lstrcatW( dir, str ); - if ( i + 1 != count && dir[0] && dir[lstrlenW( dir ) - 1] != '\') lstrcatW( dir, szBackSlash ); + if ( i + 1 != count && dir[0] && dir[lstrlenW( dir ) - 1] != '\') lstrcatW( dir, L"\" ); } va_end( va ); return dir; @@ -2474,10 +2474,10 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package) TRACE("Calculating file cost\n"); calculate_file_cost( package );
- msi_set_property( package->db, szCostingComplete, szOne, -1 ); + msi_set_property( package->db, szCostingComplete, L"1", -1 ); /* set default run level if not set */ level = msi_dup_property( package->db, szInstallLevel ); - if (!level) msi_set_property( package->db, szInstallLevel, szOne, -1 ); + if (!level) msi_set_property( package->db, szInstallLevel, L"1", -1 ); msi_free(level);
if ((rc = MSI_SetFeatureStates( package ))) return rc; @@ -2514,8 +2514,8 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package) }
/* FIXME: check volume disk space */ - msi_set_property( package->db, szOutOfDiskSpace, szZero, -1 ); - msi_set_property( package->db, szOutOfNoRbDiskSpace, szZero, -1 ); + msi_set_property( package->db, szOutOfDiskSpace, L"0", -1 ); + msi_set_property( package->db, szOutOfNoRbDiskSpace, L"0", -1 );
return ERROR_SUCCESS; } @@ -4244,13 +4244,13 @@ static UINT msi_publish_sourcelist(MSIPACKAGE *package, HKEY hkey)
r = MsiSourceListSetInfoW(package->ProductCode, NULL, package->Context, MSICODE_PRODUCT, - INSTALLPROPERTY_MEDIAPACKAGEPATHW, szEmpty); + INSTALLPROPERTY_MEDIAPACKAGEPATHW, L""); if (r != ERROR_SUCCESS) return r;
r = MsiSourceListSetInfoW(package->ProductCode, NULL, package->Context, MSICODE_PRODUCT, - INSTALLPROPERTY_DISKPROMPTW, szEmpty); + INSTALLPROPERTY_DISKPROMPTW, L""); if (r != ERROR_SUCCESS) return r;
@@ -4285,7 +4285,6 @@ static UINT msi_publish_product_properties(MSIPACKAGE *package, HKEY hkey) {'A','d','v','e','r','t','i','s','e','F','l','a','g','s',0}; static const WCHAR szClients[] = {'C','l','i','e','n','t','s',0}; - static const WCHAR szColon[] = {':',0}; WCHAR *buffer, *ptr, *guids, packcode[SQUASHED_GUID_SIZE]; DWORD langid;
@@ -4319,7 +4318,7 @@ static UINT msi_publish_product_properties(MSIPACKAGE *package, HKEY hkey) msi_reg_set_val_dword(hkey, szAssignment, 0); msi_reg_set_val_dword(hkey, szAdvertiseFlags, 0x184); msi_reg_set_val_dword(hkey, INSTALLPROPERTY_INSTANCETYPEW, 0); - msi_reg_set_val_str(hkey, szClients, szColon); + msi_reg_set_val_str(hkey, szClients, L":");
if (!(guids = msi_get_package_code(package->db))) return ERROR_OUTOFMEMORY; if ((ptr = wcschr(guids, ';'))) *ptr = 0; @@ -5064,8 +5063,7 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
if (feature->Feature_Parent) { - static const WCHAR sep[] = {'\2',0}; - lstrcatW(data,sep); + lstrcatW(data, L"\2"); lstrcatW(data,feature->Feature_Parent); }
@@ -5078,8 +5076,8 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package) if (!absent) { size += sizeof(WCHAR); - RegSetValueExW(hkey,feature->Feature,0,REG_SZ, - (const BYTE*)(feature->Feature_Parent ? feature->Feature_Parent : szEmpty),size); + RegSetValueExW(hkey, feature->Feature, 0, REG_SZ, + (const BYTE*)(feature->Feature_Parent ? feature->Feature_Parent : L""), size); } else { @@ -6156,7 +6154,7 @@ static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param) }
lstrcpyW(image_path, file->TargetPath); - lstrcatW(image_path, szSpace); + lstrcatW(image_path, L" "); lstrcatW(image_path, args); } service = CreateServiceW(hscm, name, disp, GENERIC_ALL, serv_type, @@ -7160,7 +7158,7 @@ static UINT env_parse_flags( LPCWSTR *name, LPCWSTR *value, DWORD *flags ) LPCWSTR ptr = *value; if (!wcsncmp(ptr, prefix, prefix_len)) { - if (ptr[prefix_len] == szSemiColon[0]) + if (ptr[prefix_len] == L';') { *flags |= ENV_MOD_APPEND; *value += lstrlenW(prefix); @@ -7175,7 +7173,7 @@ static UINT env_parse_flags( LPCWSTR *name, LPCWSTR *value, DWORD *flags ) ptr += lstrlenW(ptr) - prefix_len; if (!wcscmp( ptr, prefix )) { - if ((ptr-1) > *value && *(ptr-1) == szSemiColon[0]) + if ((ptr-1) > *value && *(ptr-1) == L';') { *flags |= ENV_MOD_PREFIX; /* the "[~]" will be removed by deformat_string */; @@ -7642,7 +7640,7 @@ static UINT ACTION_DisableRollback( MSIPACKAGE *package ) { TRACE("%p\n", package);
- msi_set_property( package->db, szRollbackDisabled, szOne, -1 ); + msi_set_property( package->db, szRollbackDisabled, L"1", -1 ); return ERROR_SUCCESS; }
@@ -8171,7 +8169,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath, msi_free(dir); dir = msi_alloc(MAX_PATH * sizeof(WCHAR)); GetCurrentDirectoryW(MAX_PATH, dir); - lstrcatW(dir, szBackSlash); + lstrcatW(dir, L"\"); file = szPackagePath; }
@@ -8219,7 +8217,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath, if (msi_get_property_int( package->db, szDisableRollback, 0 )) { TRACE("disabling rollback\n"); - msi_set_property( package->db, szRollbackDisabled, szOne, -1 ); + msi_set_property( package->db, szRollbackDisabled, L"1", -1 ); }
rc = ACTION_PerformAction(package, action); diff --git a/dlls/msi/appsearch.c b/dlls/msi/appsearch.c index dd58ccad702..f2f23a0663d 100644 --- a/dlls/msi/appsearch.c +++ b/dlls/msi/appsearch.c @@ -195,7 +195,7 @@ static WCHAR *search_file( MSIPACKAGE *package, WCHAR *path, MSISIGNATURE *sig ) if (!size) goto done;
- if (!VerQueryValueW(buffer, szBackSlash, (LPVOID)&info, &size) || !info) + if (!VerQueryValueW(buffer, L"\", (void *)&info, &size) || !info) goto done;
if (sig->MinVersionLS || sig->MinVersionMS) @@ -694,7 +694,7 @@ static UINT file_version_matches( MSIPACKAGE *package, const MSISIGNATURE *sig, if (!(version = msi_alloc( size ))) return ERROR_OUTOFMEMORY;
if (msi_get_file_version_info( package, filePath, size, version )) - VerQueryValueW( version, szBackSlash, (void **)&info, &len ); + VerQueryValueW( version, L"\", (void **)&info, &len );
if (info) { @@ -843,8 +843,8 @@ static UINT recurse_search_directory( MSIPACKAGE *package, WCHAR **appValue, MSI if (hFind != INVALID_HANDLE_VALUE) { if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY && - wcscmp( findData.cFileName, szDot ) && - wcscmp( findData.cFileName, szDotDot )) + wcscmp( findData.cFileName, L"." ) && + wcscmp( findData.cFileName, L".." )) { lstrcpyW(subpath, dir); PathAppendW(subpath, findData.cFileName); @@ -853,8 +853,8 @@ static UINT recurse_search_directory( MSIPACKAGE *package, WCHAR **appValue, MSI
while (rc == ERROR_SUCCESS && !*appValue && msi_find_next_file( package, hFind, &findData )) { - if (!wcscmp( findData.cFileName, szDot ) || - !wcscmp( findData.cFileName, szDotDot )) + if (!wcscmp( findData.cFileName, L"." ) || + !wcscmp( findData.cFileName, L".." )) continue;
lstrcpyW(subpath, dir); @@ -1146,7 +1146,7 @@ static UINT ITERATE_CCPSearch(MSIRECORD *row, LPVOID param) if (value) { TRACE("Found signature %s\n", debugstr_w(signature)); - msi_set_property( package->db, success, szOne, -1 ); + msi_set_property( package->db, success, L"1", -1 ); msi_free(value); r = ERROR_NO_MORE_ITEMS; } diff --git a/dlls/msi/assembly.c b/dlls/msi/assembly.c index bd694333d2a..fecb9a86008 100644 --- a/dlls/msi/assembly.c +++ b/dlls/msi/assembly.c @@ -187,7 +187,6 @@ static UINT get_assembly_name_attribute( MSIRECORD *rec, LPVOID param )
static WCHAR *get_assembly_display_name( MSIDATABASE *db, const WCHAR *comp, MSIASSEMBLY *assembly ) { - static const WCHAR commaW[] = {',',0}; static const WCHAR queryW[] = { 'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ', '`','M','s','i','A','s','s','e','m','b','l','y','N','a','m','e','`',' ', @@ -224,7 +223,7 @@ static WCHAR *get_assembly_display_name( MSIDATABASE *db, const WCHAR *comp, MSI for (i = 0; i < name.count; i++) { lstrcatW( display_name, name.attrs[i] ); - if (i < name.count - 1) lstrcatW( display_name, commaW ); + if (i < name.count - 1) lstrcatW( display_name, L"," ); } }
diff --git a/dlls/msi/automation.c b/dlls/msi/automation.c index 87c7815094a..6a6a98e2aec 100644 --- a/dlls/msi/automation.c +++ b/dlls/msi/automation.c @@ -376,7 +376,6 @@ static HRESULT WINAPI AutomationObject_Invoke( else if (pExcepInfo && (hr == DISP_E_PARAMNOTFOUND || hr == DISP_E_EXCEPTION)) { - static const WCHAR szComma[] = { ',',0 }; static const WCHAR szExceptionSource[] = {'M','s','i',' ','A','P','I',' ','E','r','r','o','r',0}; WCHAR szExceptionDescription[MAX_PATH]; BSTR bstrParamNames[MAX_FUNC_PARAMS]; @@ -395,7 +394,7 @@ static HRESULT WINAPI AutomationObject_Invoke( { if (bFirst) bFirst = FALSE; else { - lstrcpyW(&szExceptionDescription[lstrlenW(szExceptionDescription)], szComma); + lstrcpyW(&szExceptionDescription[lstrlenW(szExceptionDescription)], L","); } lstrcpyW(&szExceptionDescription[lstrlenW(szExceptionDescription)], bstrParamNames[i]); SysFreeString(bstrParamNames[i]); diff --git a/dlls/msi/classes.c b/dlls/msi/classes.c index 4e0c1a68098..8a4c84adace 100644 --- a/dlls/msi/classes.c +++ b/dlls/msi/classes.c @@ -709,7 +709,6 @@ static UINT register_appid(const MSIAPPID *appid, LPCWSTR app ) {'D','l','l','S','u','r','r','o','g','a','t','e',0}; static const WCHAR szActivate[] = {'A','c','t','i','v','a','t','e','A','s','S','t','o','r','a','g','e',0}; - static const WCHAR szY[] = {'Y',0}; static const WCHAR szRunAs[] = {'R','u','n','A','s',0}; static const WCHAR szUser[] = {'I','n','t','e','r','a','c','t','i','v','e',' ','U','s','e','r',0}; @@ -734,7 +733,7 @@ static UINT register_appid(const MSIAPPID *appid, LPCWSTR app ) msi_reg_set_val_str( hkey3, szDLL, appid->DllSurrogate );
if (appid->ActivateAtStorage) - msi_reg_set_val_str( hkey3, szActivate, szY ); + msi_reg_set_val_str( hkey3, szActivate, L"Y" );
if (appid->RunAsInteractiveUser) msi_reg_set_val_str( hkey3, szRunAs, szUser ); @@ -830,7 +829,7 @@ UINT ACTION_RegisterClassInfo(MSIPACKAGE *package)
if (cls->Argument) { - lstrcatW( argument, szSpace ); + lstrcatW( argument, L" " ); lstrcatW( argument, cls->Argument ); }
@@ -1225,7 +1224,7 @@ static UINT register_verb(MSIPACKAGE *package, LPCWSTR progid, lstrcpyW(command,advertise); if (verb->Argument) { - lstrcatW(command,szSpace); + lstrcatW(command, L" "); lstrcatW(command,verb->Argument); }
diff --git a/dlls/msi/cond.y b/dlls/msi/cond.y index 1a79de31bf8..607e22dba32 100644 --- a/dlls/msi/cond.y +++ b/dlls/msi/cond.y @@ -501,8 +501,8 @@ static INT compare_string( LPCWSTR a, INT operator, LPCWSTR b, BOOL convert ) return compare_substring( a, operator, b );
/* null and empty string are equivalent */ - if (!a) a = szEmpty; - if (!b) b = szEmpty; + if (!a) a = L""; + if (!b) b = L"";
if (convert && str_is_number(a) && str_is_number(b)) return compare_int( wcstol(a, NULL, 10), operator, wcstol(b, NULL, 10) ); diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c index e2379424878..2e0aa78d11c 100644 --- a/dlls/msi/custom.c +++ b/dlls/msi/custom.c @@ -1451,7 +1451,7 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, const WCHAR *action) else if (actiondata) msi_set_property( package->db, szCustomActionData, actiondata, -1 ); else - msi_set_property( package->db, szCustomActionData, szEmpty, -1 ); + msi_set_property( package->db, szCustomActionData, L"", -1 );
msi_free(actiondata); } diff --git a/dlls/msi/database.c b/dlls/msi/database.c index f7c70aeead7..e3b498891bb 100644 --- a/dlls/msi/database.c +++ b/dlls/msi/database.c @@ -257,7 +257,7 @@ UINT MSI_OpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIDATABASE **pdb) if (!wcschr( save_path, '\' )) { GetCurrentDirectoryW( MAX_PATH, path ); - lstrcatW( path, szBackSlash ); + lstrcatW( path, L"\" ); lstrcatW( path, save_path ); } else @@ -771,13 +771,13 @@ static UINT MSI_DatabaseImport(MSIDATABASE *db, LPCWSTR folder, LPCWSTR file) if( folder == NULL || file == NULL ) return ERROR_INVALID_PARAMETER;
- len = lstrlenW(folder) + lstrlenW(szBackSlash) + lstrlenW(file) + 1; + len = lstrlenW(folder) + lstrlenW(L"\") + lstrlenW(file) + 1; path = msi_alloc( len * sizeof(WCHAR) ); if (!path) return ERROR_OUTOFMEMORY;
lstrcpyW( path, folder ); - lstrcatW( path, szBackSlash ); + lstrcatW( path, L"\" ); lstrcatW( path, file );
data = msi_read_text_archive( path, &len ); @@ -1102,7 +1102,7 @@ static UINT MSI_DatabaseExport( MSIDATABASE *db, LPCWSTR table, LPCWSTR folder, return ERROR_OUTOFMEMORY;
lstrcpyW( filename, folder ); - lstrcatW( filename, szBackSlash ); + lstrcatW( filename, L"\" ); lstrcatW( filename, file );
handle = CreateFileW( filename, GENERIC_READ | GENERIC_WRITE, 0, @@ -1424,15 +1424,14 @@ static LPWSTR get_key_value(MSIQUERY *view, LPCWSTR key, MSIRECORD *rec) if (MSI_RecordGetString(rec, i)) /* check record field is a string */ { /* quote string record fields */ - static const WCHAR szQuote[] = {''', 0}; sz += 2; val = msi_alloc(sz*sizeof(WCHAR)); if (!val) return NULL;
- lstrcpyW(val, szQuote); + lstrcpyW(val, L"'"); r = MSI_RecordGetStringW(rec, i, val+1, &sz); - lstrcpyW(val+1+sz, szQuote); + lstrcpyW(val+1+sz, L"'"); } else { diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c index 81b0d3dba02..206fedb61c9 100644 --- a/dlls/msi/dialog.c +++ b/dlls/msi/dialog.c @@ -627,7 +627,7 @@ static void dialog_handle_event( msi_dialog *dialog, const WCHAR *control, font = msi_dialog_get_style( font_text, &text ); deformat_string( dialog->package, text, &text_fmt ); if (text_fmt) text = text_fmt; - else text = szEmpty; + else text = L"";
SetWindowTextW( ctrl->hwnd, text );
@@ -1179,7 +1179,6 @@ static UINT msi_dialog_get_checkbox_state( msi_dialog *dialog, msi_control *cont
static void msi_dialog_set_checkbox_state( msi_dialog *dialog, msi_control *control, UINT state ) { - static const WCHAR szState[] = {'1',0}; LPCWSTR val;
/* if uncheck then the property is set to NULL */ @@ -1193,7 +1192,7 @@ static void msi_dialog_set_checkbox_state( msi_dialog *dialog, msi_control *cont if (control->value && control->value[0]) val = control->value; else - val = szState; + val = L"1";
msi_dialog_set_property( dialog->package, control->property, val ); } @@ -2986,7 +2985,6 @@ static UINT msi_dialog_directory_combo( msi_dialog *dialog, MSIRECORD *rec )
static void msi_dialog_update_directory_list( msi_dialog *dialog, msi_control *control ) { - static const WCHAR asterisk[] = {'*',0}; WCHAR dir_spec[MAX_PATH], *path; WIN32_FIND_DATAW wfd; LVITEMW item; @@ -3000,7 +2998,7 @@ static void msi_dialog_update_directory_list( msi_dialog *dialog, msi_control *c
if (!(path = get_path_property( dialog, control ))) return; lstrcpyW( dir_spec, path ); - lstrcatW( dir_spec, asterisk ); + lstrcatW( dir_spec, L"*" );
file = FindFirstFileW( dir_spec, &wfd ); if (file == INVALID_HANDLE_VALUE) @@ -3014,7 +3012,7 @@ static void msi_dialog_update_directory_list( msi_dialog *dialog, msi_control *c if ( wfd.dwFileAttributes != FILE_ATTRIBUTE_DIRECTORY ) continue;
- if ( !wcscmp( wfd.cFileName, szDot ) || !wcscmp( wfd.cFileName, szDotDot ) ) + if ( !wcscmp( wfd.cFileName, L"." ) || !wcscmp( wfd.cFileName, L".." ) ) continue;
item.mask = LVIF_TEXT; @@ -3162,7 +3160,7 @@ static UINT msi_dialog_dirlist_handler( msi_dialog *dialog, msi_control *control lstrcpyW( new_path, path ); lstrcatW( new_path, text ); if (nmhdr->code == LVN_ENDLABELEDITW) CreateDirectoryW( new_path, NULL ); - lstrcatW( new_path, szBackSlash ); + lstrcatW( new_path, L"\" );
msi_dialog_set_property( dialog->package, prop, new_path );
@@ -3234,8 +3232,6 @@ static void msi_dialog_vcl_add_columns( msi_dialog *dialog, msi_control *control LVCOLUMNW lvc; DWORD count = 0;
- static const WCHAR negative[] = {'-',0}; - if (!text) return;
while ((begin = wcschr( begin, '{' )) && count < 5) @@ -3251,7 +3247,7 @@ static void msi_dialog_vcl_add_columns( msi_dialog *dialog, msi_control *control begin += end - begin + 1;
/* empty braces or '0' hides the column */ - if ( !num[0] || !wcscmp( num, szZero ) ) + if ( !num[0] || !wcscmp( num, L"0" ) ) { count++; msi_free( num ); @@ -3261,7 +3257,7 @@ static void msi_dialog_vcl_add_columns( msi_dialog *dialog, msi_control *control /* the width must be a positive number * if a width is invalid, all remaining columns are hidden */ - if ( !wcsncmp( num, negative, 1 ) || !str_is_number( num ) ) { + if ( !wcsncmp( num, L"-", 1 ) || !str_is_number( num ) ) { msi_free( num ); return; } @@ -4573,7 +4569,7 @@ static UINT event_add_local( msi_dialog *dialog, const WCHAR *argument ) if (!wcscmp( argument, feature->Feature ) || !wcscmp( argument, szAll )) { if (feature->ActionRequest != INSTALLSTATE_LOCAL) - msi_set_property( dialog->package->db, szPreselected, szOne, -1 ); + msi_set_property( dialog->package->db, szPreselected, L"1", -1 ); MSI_SetFeatureStateW( dialog->package, feature->Feature, INSTALLSTATE_LOCAL ); } } @@ -4589,7 +4585,7 @@ static UINT event_remove( msi_dialog *dialog, const WCHAR *argument ) if (!wcscmp( argument, feature->Feature ) || !wcscmp( argument, szAll )) { if (feature->ActionRequest != INSTALLSTATE_ABSENT) - msi_set_property( dialog->package->db, szPreselected, szOne, -1 ); + msi_set_property( dialog->package->db, szPreselected, L"1", -1 ); MSI_SetFeatureStateW( dialog->package, feature->Feature, INSTALLSTATE_ABSENT ); } } @@ -4605,7 +4601,7 @@ static UINT event_add_source( msi_dialog *dialog, const WCHAR *argument ) if (!wcscmp( argument, feature->Feature ) || !wcscmp( argument, szAll )) { if (feature->ActionRequest != INSTALLSTATE_SOURCE) - msi_set_property( dialog->package->db, szPreselected, szOne, -1 ); + msi_set_property( dialog->package->db, szPreselected, L"1", -1 ); MSI_SetFeatureStateW( dialog->package, feature->Feature, INSTALLSTATE_SOURCE ); } } diff --git a/dlls/msi/files.c b/dlls/msi/files.c index aba714b317d..b88dfd04182 100644 --- a/dlls/msi/files.c +++ b/dlls/msi/files.c @@ -160,7 +160,6 @@ DWORD msi_get_file_version_info( MSIPACKAGE *package, const WCHAR *path, DWORD b
VS_FIXEDFILEINFO *msi_get_disk_file_version( MSIPACKAGE *package, const WCHAR *filename ) { - static const WCHAR name[] = {'\',0}; VS_FIXEDFILEINFO *ptr, *ret; DWORD version_size, size; void *version; @@ -170,7 +169,7 @@ VS_FIXEDFILEINFO *msi_get_disk_file_version( MSIPACKAGE *package, const WCHAR *f
msi_get_file_version_info( package, filename, version_size, version );
- if (!VerQueryValueW( version, name, (void **)&ptr, &size )) + if (!VerQueryValueW( version, L"\", (void **)&ptr, &size )) { msi_free( version ); return NULL; @@ -1129,7 +1128,7 @@ static UINT ITERATE_MoveFiles( MSIRECORD *rec, LPVOID param )
lstrcpyW(source, sourcedir); if (source[lstrlenW(source) - 1] != '\') - lstrcatW(source, szBackSlash); + lstrcatW(source, L"\"); lstrcatW(source, sourcename); }
@@ -1167,7 +1166,7 @@ static UINT ITERATE_MoveFiles( MSIRECORD *rec, LPVOID param )
lstrcpyW(dest, destdir); if (dest[lstrlenW(dest) - 1] != '\') - lstrcatW(dest, szBackSlash); + lstrcatW(dest, L"\");
if (destname) lstrcatW(dest, destname); diff --git a/dlls/msi/install.c b/dlls/msi/install.c index 4277b51804f..5369fc0072e 100644 --- a/dlls/msi/install.c +++ b/dlls/msi/install.c @@ -1030,7 +1030,7 @@ UINT WINAPI MsiSetFeatureAttributesW( MSIHANDLE handle, LPCWSTR name, DWORD attr return ERROR_INVALID_HANDLE;
costing = msi_dup_property( package->db, szCostingComplete ); - if (!costing || !wcscmp( costing, szOne )) + if (!costing || !wcscmp( costing, L"1" )) { msi_free( costing ); msiobj_release( &package->hdr ); diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index 6387b0a9372..1fbef93d87a 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -377,7 +377,6 @@ static UINT MSI_ApplyPatchW(LPCWSTR szPatchPackage, LPCWSTR szProductCode, LPCWS BOOL succeeded = FALSE;
static const WCHAR fmt[] = {'%','s',' ','P','A','T','C','H','=','"','%','s','"',0}; - static const WCHAR empty[] = {0};
if (!szPatchPackage || !szPatchPackage[0]) return ERROR_INVALID_PARAMETER; @@ -386,7 +385,7 @@ static UINT MSI_ApplyPatchW(LPCWSTR szPatchPackage, LPCWSTR szProductCode, LPCWS return r;
if (!szCommandLine) - cmd_ptr = empty; + cmd_ptr = L"";
size = lstrlenW(cmd_ptr) + lstrlenW(fmt) + lstrlenW(szPatchPackage) + 1; cmd = msi_alloc(size * sizeof(WCHAR)); @@ -1426,7 +1425,6 @@ UINT WINAPI MsiGetProductInfoExW(LPCWSTR szProductCode, LPCWSTR szUserSid, MSIINSTALLCONTEXT dwContext, LPCWSTR szProperty, LPWSTR szValue, LPDWORD pcchValue) { - static const WCHAR five[] = {'5',0}; static const WCHAR displayname[] = { 'D','i','s','p','l','a','y','N','a','m','e',0}; static const WCHAR displayversion[] = { @@ -1528,7 +1526,7 @@ UINT WINAPI MsiGetProductInfoExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
val = reg_get_value(props, szProperty, &type); if (!val) - val = strdupW(szEmpty); + val = strdupW(L"");
r = msi_copy_outval(val, szValue, pcchValue); } @@ -1553,7 +1551,7 @@ UINT WINAPI MsiGetProductInfoExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
val = reg_get_value(hkey, szProperty, &type); if (!val) - val = strdupW(szEmpty); + val = strdupW(L"");
r = msi_copy_outval(val, szValue, pcchValue); } @@ -1568,10 +1566,10 @@ UINT WINAPI MsiGetProductInfoExW(LPCWSTR szProductCode, LPCWSTR szUserSid, goto done;
msi_free(val); - val = strdupW(five); + val = strdupW(L"5"); } else - val = strdupW(szOne); + val = strdupW(L"1");
r = msi_copy_outval(val, szValue, pcchValue); goto done; @@ -1579,13 +1577,13 @@ UINT WINAPI MsiGetProductInfoExW(LPCWSTR szProductCode, LPCWSTR szUserSid, else if (props && (val = reg_get_value(props, package, &type))) { msi_free(val); - val = strdupW(five); + val = strdupW(L"5"); r = msi_copy_outval(val, szValue, pcchValue); goto done; }
if (prod || managed) - val = strdupW(szOne); + val = strdupW(L"1"); else goto done;
@@ -1597,7 +1595,7 @@ UINT WINAPI MsiGetProductInfoExW(LPCWSTR szProductCode, LPCWSTR szUserSid, goto done;
/* FIXME */ - val = strdupW(szEmpty); + val = strdupW(L""); r = msi_copy_outval(val, szValue, pcchValue); } else @@ -1802,7 +1800,7 @@ UINT WINAPI MsiGetPatchInfoExW(LPCWSTR szPatchCode, LPCWSTR szProductCode,
val = reg_get_value(datakey, szProperty, &type); if (!val) - val = strdupW(szEmpty); + val = strdupW(L"");
r = ERROR_SUCCESS;
@@ -3214,7 +3212,6 @@ end: static UINT get_file_version( const WCHAR *path, WCHAR *verbuf, DWORD *verlen, WCHAR *langbuf, DWORD *langlen ) { - static const WCHAR szVersionResource[] = {'\',0}; static const WCHAR szVersionFormat[] = {'%','d','.','%','d','.','%','d','.','%','d',0}; static const WCHAR szLangFormat[] = {'%','d',0}; UINT ret = ERROR_MORE_DATA; @@ -3244,7 +3241,7 @@ static UINT get_file_version( const WCHAR *path, WCHAR *verbuf, DWORD *verlen, } if (verlen) { - if (VerQueryValueW( version, szVersionResource, (LPVOID *)&ffi, &len ) && len > 0) + if (VerQueryValueW( version, L"\", (void **)&ffi, &len ) && len > 0) { swprintf( tmp, ARRAY_SIZE(tmp), szVersionFormat, HIWORD(ffi->dwFileVersionMS), LOWORD(ffi->dwFileVersionMS), @@ -3658,7 +3655,7 @@ static USERINFOSTATE MSI_GetUserInfo(LPCWSTR szProduct, if (pcchOrgNameBuf) { orgptr = org; - if (!orgptr) orgptr = szEmpty; + if (!orgptr) orgptr = L"";
r = msi_strcpy_to_awstring(orgptr, -1, lpOrgNameBuf, pcchOrgNameBuf); if (r == ERROR_MORE_DATA) diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index a1b7f033c37..c03f78a10d6 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -1144,16 +1144,7 @@ static const WCHAR szRootDrive[] = {'R','O','O','T','D','R','I','V','E',0}; static const WCHAR szTargetDir[] = {'T','A','R','G','E','T','D','I','R',0}; static const WCHAR szLocalSid[] = {'S','-','1','-','5','-','1','8',0}; static const WCHAR szAllSid[] = {'S','-','1','-','1','-','0',0}; -static const WCHAR szEmpty[] = {0}; static const WCHAR szAll[] = {'A','L','L',0}; -static const WCHAR szOne[] = {'1',0}; -static const WCHAR szZero[] = {'0',0}; -static const WCHAR szSpace[] = {' ',0}; -static const WCHAR szBackSlash[] = {'\',0}; -static const WCHAR szForwardSlash[] = {'/',0}; -static const WCHAR szDot[] = {'.',0}; -static const WCHAR szDotDot[] = {'.','.',0}; -static const WCHAR szSemiColon[] = {';',0}; static const WCHAR szPreselected[] = {'P','r','e','s','e','l','e','c','t','e','d',0}; static const WCHAR szPatches[] = {'P','a','t','c','h','e','s',0}; static const WCHAR szState[] = {'S','t','a','t','e',0}; diff --git a/dlls/msi/msiquery.c b/dlls/msi/msiquery.c index 7791ee9b91a..1a2efbe0008 100644 --- a/dlls/msi/msiquery.c +++ b/dlls/msi/msiquery.c @@ -798,7 +798,7 @@ MSIDBERROR WINAPI MsiViewGetErrorW( MSIHANDLE handle, LPWSTR buffer, LPDWORD buf } __ENDTRY;
- if (msi_strncpyW(remote_column ? remote_column : szEmpty, -1, buffer, buflen) == ERROR_MORE_DATA) + if (msi_strncpyW(remote_column ? remote_column : L"", -1, buffer, buflen) == ERROR_MORE_DATA) r = MSIDBERROR_MOREDATA;
if (remote_column) @@ -808,7 +808,7 @@ MSIDBERROR WINAPI MsiViewGetErrorW( MSIHANDLE handle, LPWSTR buffer, LPDWORD buf }
if ((r = query->view->error)) column = query->view->error_column; - else column = szEmpty; + else column = L"";
if (msi_strncpyW(column, -1, buffer, buflen) == ERROR_MORE_DATA) r = MSIDBERROR_MOREDATA; @@ -849,7 +849,7 @@ MSIDBERROR WINAPI MsiViewGetErrorA( MSIHANDLE handle, LPSTR buffer, LPDWORD bufl } __ENDTRY;
- if (msi_strncpyWtoA(remote_column ? remote_column : szEmpty, -1, buffer, buflen, FALSE) == ERROR_MORE_DATA) + if (msi_strncpyWtoA(remote_column ? remote_column : L"", -1, buffer, buflen, FALSE) == ERROR_MORE_DATA) r = MSIDBERROR_MOREDATA;
if (remote_column) @@ -859,7 +859,7 @@ MSIDBERROR WINAPI MsiViewGetErrorA( MSIHANDLE handle, LPSTR buffer, LPDWORD bufl }
if ((r = query->view->error)) column = query->view->error_column; - else column = szEmpty; + else column = L"";
if (msi_strncpyWtoA(column, -1, buffer, buflen, FALSE) == ERROR_MORE_DATA) r = MSIDBERROR_MOREDATA; diff --git a/dlls/msi/package.c b/dlls/msi/package.c index 7b64362b10d..d74b9977d7a 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -481,7 +481,7 @@ static UINT set_installed_prop( MSIPACKAGE *package ) if (r == ERROR_SUCCESS) { RegCloseKey( hkey ); - msi_set_property( package->db, szInstalled, szOne, -1 ); + msi_set_property( package->db, szInstalled, L"1", -1 ); } return r; } @@ -567,7 +567,7 @@ static LPWSTR get_fusion_filename(MSIPACKAGE *package) if (!(filename = msi_alloc(len * sizeof(WCHAR)))) return NULL;
lstrcpyW(filename, path); - lstrcatW(filename, szBackSlash); + lstrcatW(filename, L"\"); lstrcatW(filename, fusion); if (GetFileAttributesW(filename) != INVALID_FILE_ATTRIBUTES) { @@ -588,10 +588,10 @@ static LPWSTR get_fusion_filename(MSIPACKAGE *package) if (!(filename = msi_alloc(len * sizeof(WCHAR)))) return NULL;
lstrcpyW(filename, windir); - lstrcatW(filename, szBackSlash); + lstrcatW(filename, L"\"); lstrcatW(filename, subdir); lstrcatW(filename, v2050727); - lstrcatW(filename, szBackSlash); + lstrcatW(filename, L"\"); lstrcatW(filename, fusion); if (GetFileAttributesW(filename) != INVALID_FILE_ATTRIBUTES) { @@ -765,81 +765,81 @@ static VOID set_installer_properties(MSIPACKAGE *package) */
SHGetFolderPathW(NULL, CSIDL_COMMON_APPDATA, NULL, 0, pth); - lstrcatW(pth, szBackSlash); + lstrcatW(pth, L"\"); msi_set_property( package->db, szCommonAppDataFolder, pth, -1 );
SHGetFolderPathW(NULL, CSIDL_FAVORITES, NULL, 0, pth); - lstrcatW(pth, szBackSlash); + lstrcatW(pth, L"\"); msi_set_property( package->db, szFavoritesFolder, pth, -1 );
SHGetFolderPathW(NULL, CSIDL_FONTS, NULL, 0, pth); - lstrcatW(pth, szBackSlash); + lstrcatW(pth, L"\"); msi_set_property( package->db, szFontsFolder, pth, -1 );
SHGetFolderPathW(NULL, CSIDL_SENDTO, NULL, 0, pth); - lstrcatW(pth, szBackSlash); + lstrcatW(pth, L"\"); msi_set_property( package->db, szSendToFolder, pth, -1 );
SHGetFolderPathW(NULL, CSIDL_STARTMENU, NULL, 0, pth); - lstrcatW(pth, szBackSlash); + lstrcatW(pth, L"\"); msi_set_property( package->db, szStartMenuFolder, pth, -1 );
SHGetFolderPathW(NULL, CSIDL_STARTUP, NULL, 0, pth); - lstrcatW(pth, szBackSlash); + lstrcatW(pth, L"\"); msi_set_property( package->db, szStartupFolder, pth, -1 );
SHGetFolderPathW(NULL, CSIDL_TEMPLATES, NULL, 0, pth); - lstrcatW(pth, szBackSlash); + lstrcatW(pth, L"\"); msi_set_property( package->db, szTemplateFolder, pth, -1 );
SHGetFolderPathW(NULL, CSIDL_DESKTOP, NULL, 0, pth); - lstrcatW(pth, szBackSlash); + lstrcatW(pth, L"\"); msi_set_property( package->db, szDesktopFolder, pth, -1 );
/* FIXME: set to AllUsers profile path if ALLUSERS is set */ SHGetFolderPathW(NULL, CSIDL_PROGRAMS, NULL, 0, pth); - lstrcatW(pth, szBackSlash); + lstrcatW(pth, L"\"); msi_set_property( package->db, szProgramMenuFolder, pth, -1 );
SHGetFolderPathW(NULL, CSIDL_ADMINTOOLS, NULL, 0, pth); - lstrcatW(pth, szBackSlash); + lstrcatW(pth, L"\"); msi_set_property( package->db, szAdminToolsFolder, pth, -1 );
SHGetFolderPathW(NULL, CSIDL_APPDATA, NULL, 0, pth); - lstrcatW(pth, szBackSlash); + lstrcatW(pth, L"\"); msi_set_property( package->db, szAppDataFolder, pth, -1 );
SHGetFolderPathW(NULL, CSIDL_SYSTEM, NULL, 0, pth); - lstrcatW(pth, szBackSlash); + lstrcatW(pth, L"\"); msi_set_property( package->db, szSystemFolder, pth, -1 ); msi_set_property( package->db, szSystem16Folder, pth, -1 );
SHGetFolderPathW(NULL, CSIDL_LOCAL_APPDATA, NULL, 0, pth); - lstrcatW(pth, szBackSlash); + lstrcatW(pth, L"\"); msi_set_property( package->db, szLocalAppDataFolder, pth, -1 );
SHGetFolderPathW(NULL, CSIDL_MYPICTURES, NULL, 0, pth); - lstrcatW(pth, szBackSlash); + lstrcatW(pth, L"\"); msi_set_property( package->db, szMyPicturesFolder, pth, -1 );
SHGetFolderPathW(NULL, CSIDL_PERSONAL, NULL, 0, pth); - lstrcatW(pth, szBackSlash); + lstrcatW(pth, L"\"); msi_set_property( package->db, szPersonalFolder, pth, -1 );
SHGetFolderPathW(NULL, CSIDL_WINDOWS, NULL, 0, pth); - lstrcatW(pth, szBackSlash); + lstrcatW(pth, L"\"); msi_set_property( package->db, szWindowsFolder, pth, -1 ); - + SHGetFolderPathW(NULL, CSIDL_PRINTHOOD, NULL, 0, pth); - lstrcatW(pth, szBackSlash); + lstrcatW(pth, L"\"); msi_set_property( package->db, szPrintHoodFolder, pth, -1 );
SHGetFolderPathW(NULL, CSIDL_NETHOOD, NULL, 0, pth); - lstrcatW(pth, szBackSlash); + lstrcatW(pth, L"\"); msi_set_property( package->db, szNetHoodFolder, pth, -1 );
SHGetFolderPathW(NULL, CSIDL_RECENT, NULL, 0, pth); - lstrcatW(pth, szBackSlash); + lstrcatW(pth, L"\"); msi_set_property( package->db, szRecentFolder, pth, -1 );
/* Physical Memory is specified in MB. Using total amount. */ @@ -857,8 +857,8 @@ static VOID set_installer_properties(MSIPACKAGE *package) msi_set_property( package->db, szTempFolder, pth, len );
/* in a wine environment the user is always admin and privileged */ - msi_set_property( package->db, szAdminUser, szOne, -1 ); - msi_set_property( package->db, szPrivileged, szOne, -1 ); + msi_set_property( package->db, szAdminUser, L"1", -1 ); + msi_set_property( package->db, szPrivileged, L"1", -1 );
/* set the os things */ OSVersion.dwOSVersionInfoSize = sizeof(OSVersion); @@ -1084,9 +1084,9 @@ void msi_adjust_privilege_properties( MSIPACKAGE *package ) if (msi_get_property_int( package->db, szAllUsers, 0 ) == 2) { TRACE("resetting ALLUSERS property from 2 to 1\n"); - msi_set_property( package->db, szAllUsers, szOne, -1 ); + msi_set_property( package->db, szAllUsers, L"1", -1 ); } - msi_set_property( package->db, szAdminUser, szOne, -1 ); + msi_set_property( package->db, szAdminUser, L"1", -1 ); }
MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db ) @@ -1591,7 +1591,7 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, DWORD dwOptions, MSIPACKAGE **pPackage) if (msi_locate_product( product_code, &context ) == ERROR_SUCCESS) { TRACE("product already registered\n"); - msi_set_property( package->db, szProductToBeRegistered, szOne, -1 ); + msi_set_property( package->db, szProductToBeRegistered, L"1", -1 ); } msi_free(product_code);
@@ -2028,7 +2028,7 @@ INT MSI_ProcessMessage( MSIPACKAGE *package, INSTALLMESSAGE eMessageType, MSIREC template_rec = msi_dup_record_field(record, 0);
template_prefix = msi_get_error_message(package->db, eMessageType >> 24); - if (!template_prefix) template_prefix = strdupW(szEmpty); + if (!template_prefix) template_prefix = strdupW(L"");
if (!template_rec) { @@ -2060,7 +2060,7 @@ INT MSI_ProcessMessage( MSIPACKAGE *package, INSTALLMESSAGE eMessageType, MSIREC msi_free(package->LastAction); msi_free(package->LastActionTemplate); package->LastAction = msi_dup_record_field(record, 1); - if (!package->LastAction) package->LastAction = strdupW(szEmpty); + if (!package->LastAction) package->LastAction = strdupW(L""); package->LastActionTemplate = msi_dup_record_field(record, 3); break; } @@ -2408,7 +2408,7 @@ int msi_get_property_int( MSIDATABASE *db, LPCWSTR prop, int def )
UINT WINAPI MsiGetPropertyA(MSIHANDLE hinst, const char *name, char *buf, DWORD *sz) { - const WCHAR *value = szEmpty; + const WCHAR *value = L""; MSIPACKAGE *package; MSIRECORD *row; WCHAR *nameW; @@ -2480,7 +2480,7 @@ UINT WINAPI MsiGetPropertyA(MSIHANDLE hinst, const char *name, char *buf, DWORD
UINT WINAPI MsiGetPropertyW(MSIHANDLE hinst, const WCHAR *name, WCHAR *buf, DWORD *sz) { - const WCHAR *value = szEmpty; + const WCHAR *value = L""; MSIPACKAGE *package; MSIRECORD *row; int len = 0; diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c index 4d439d0b304..4c9288e315f 100644 --- a/dlls/msi/registry.c +++ b/dlls/msi/registry.c @@ -354,7 +354,7 @@ DWORD msi_version_str_to_dword(LPCWSTR p) LONG msi_reg_set_val_str( HKEY hkey, LPCWSTR name, LPCWSTR value ) { DWORD len; - if (!value) value = szEmpty; + if (!value) value = L""; len = (lstrlenW(value) + 1) * sizeof (WCHAR); return RegSetValueExW( hkey, name, 0, REG_SZ, (const BYTE *)value, len ); } @@ -1990,7 +1990,7 @@ static UINT msi_check_product_patches(LPCWSTR prodcode, LPCWSTR usersid, } else if (context == MSIINSTALLCONTEXT_MACHINE) { - usersid = szEmpty; + usersid = L"";
if (MSIREG_OpenUserDataProductKey(prodcode, context, NULL, &localprod, FALSE) == ERROR_SUCCESS && RegOpenKeyExW(localprod, szPatches, 0, KEY_READ, &localpatch) == ERROR_SUCCESS && diff --git a/dlls/msi/select.c b/dlls/msi/select.c index 3c643f37239..213141679e9 100644 --- a/dlls/msi/select.c +++ b/dlls/msi/select.c @@ -236,10 +236,10 @@ static UINT SELECT_get_column_info( struct tagMSIVIEW *view, UINT n, LPCWSTR *na n = sv->cols[ n - 1 ]; if( !n ) { - if (name) *name = szEmpty; + if (name) *name = L""; if (type) *type = MSITYPE_UNKNOWN | MSITYPE_VALID; if (temporary) *temporary = FALSE; - if (table_name) *table_name = szEmpty; + if (table_name) *table_name = L""; return ERROR_SUCCESS; } return sv->table->ops->get_column_info( sv->table, n, name, diff --git a/dlls/msi/source.c b/dlls/msi/source.c index 89c04d9f7dd..f0e680f9bc4 100644 --- a/dlls/msi/source.c +++ b/dlls/msi/source.c @@ -1108,7 +1108,7 @@ UINT WINAPI MsiSourceListAddSourceExW( LPCWSTR szProduct, LPCWSTR szUserSid, return rc; }
- postfix = (dwOptions & MSISOURCETYPE_NETWORK) ? szBackSlash : szForwardSlash; + postfix = (dwOptions & MSISOURCETYPE_NETWORK) ? L"\" : L"/"; if (szSource[lstrlenW(szSource) - 1] == *postfix) source = strdupW(szSource); else @@ -1128,7 +1128,7 @@ UINT WINAPI MsiSourceListAddSourceExW( LPCWSTR szProduct, LPCWSTR szUserSid,
if (count == 0) { - rc = RegSetValueExW(typekey, szOne, 0, REG_EXPAND_SZ, (LPBYTE)source, size); + rc = RegSetValueExW(typekey, L"1", 0, REG_EXPAND_SZ, (BYTE *)source, size); goto done; } else if (dwIndex > count || dwIndex == 0) @@ -1254,7 +1254,7 @@ UINT WINAPI MsiSourceListAddMediaDiskW(LPCWSTR szProduct, LPCWSTR szUserSid, *buffer = '\0';
if (szVolumeLabel) lstrcpyW(buffer, szVolumeLabel); - lstrcatW(buffer, szSemiColon); + lstrcatW(buffer, L";"); if (szDiskPrompt) lstrcatW(buffer, szDiskPrompt);
RegSetValueExW(mediakey, szIndex, 0, REG_SZ, (LPBYTE)buffer, size); diff --git a/dlls/msi/string.c b/dlls/msi/string.c index 5c6432ba1ed..e5eedec16c9 100644 --- a/dlls/msi/string.c +++ b/dlls/msi/string.c @@ -347,7 +347,7 @@ const WCHAR *msi_string_lookup( const string_table *st, UINT id, int *len ) if( id == 0 ) { if (len) *len = 0; - return szEmpty; + return L""; } if( id >= st->maxcount ) return NULL; diff --git a/dlls/msi/table.c b/dlls/msi/table.c index e9d6e8804e7..971b3c6d081 100644 --- a/dlls/msi/table.c +++ b/dlls/msi/table.c @@ -1107,7 +1107,7 @@ static UINT get_stream_name( const MSITABLEVIEW *tv, UINT row, WCHAR **pstname ) sval = number; }
- len += lstrlenW( szDot ) + lstrlenW( sval ); + len += lstrlenW( L"." ) + lstrlenW( sval ); p = msi_realloc ( stname, len*sizeof(WCHAR) ); if ( !p ) { @@ -1116,7 +1116,7 @@ static UINT get_stream_name( const MSITABLEVIEW *tv, UINT row, WCHAR **pstname ) } stname = p;
- lstrcatW( stname, szDot ); + lstrcatW( stname, L"." ); lstrcatW( stname, sval ); } else diff --git a/dlls/msi/upgrade.c b/dlls/msi/upgrade.c index 60b5c74f40b..452f04e7630 100644 --- a/dlls/msi/upgrade.c +++ b/dlls/msi/upgrade.c @@ -97,7 +97,7 @@ static void append_productcode( MSIPACKAGE *package, const WCHAR *action_prop, c if (prop) { lstrcpyW( newprop, prop ); - lstrcatW( newprop, szSemiColon ); + lstrcatW( newprop, L";" ); } else newprop[0] = 0; lstrcatW( newprop, product );
On Thu, 2020-10-22 at 01:24 +0200, Michael Stefaniuc wrote:
Signed-off-by: Michael Stefaniuc mstefani@winehq.org
Empty strings, single WCHAR strings and szDotDot as it was in the way.
Starting to nibble at msi else the change would be huge and unreviewable.
Actually I had already started this conversion, so if you don't mind...