diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 15bea7ae39b..7f2fd7edd50 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -277,7 +277,7 @@ UINT msi_parse_command_line( MSIPACKAGE *package, LPCWSTR szCommandLine, if (lstrlenW(prop) > 0) { - UINT r = MSI_SetPropertyW( package->db, prop, val ); + UINT r = msi_set_property( package->db, prop, val ); TRACE("Found commandline property (%s) = (%s)\n", debugstr_w(prop), debugstr_w(val)); @@ -481,7 +481,7 @@ static UINT msi_set_media_source_prop(MSIPACKAGE *package) { prop = MSI_RecordGetString(rec, 1); patch = msi_dup_property(package->db, szPatch); - MSI_SetPropertyW(package->db, prop, patch); + msi_set_property(package->db, prop, patch); msi_free(patch); } @@ -673,7 +673,7 @@ static UINT msi_set_sourcedir_props(MSIPACKAGE *package, BOOL replace) check = msi_dup_property( package->db, cszSourceDir ); if (!check || replace) { - UINT r = MSI_SetPropertyW( package->db, cszSourceDir, source ); + UINT r = msi_set_property( package->db, cszSourceDir, source ); if (r == ERROR_SUCCESS) msi_reset_folders( package, TRUE ); } @@ -681,7 +681,7 @@ static UINT msi_set_sourcedir_props(MSIPACKAGE *package, BOOL replace) check = msi_dup_property( package->db, cszSOURCEDIR ); if (!check || replace) - MSI_SetPropertyW( package->db, cszSOURCEDIR, source ); + msi_set_property( package->db, cszSOURCEDIR, source ); msi_free( check ); msi_free( source ); @@ -705,7 +705,7 @@ static UINT msi_set_context(MSIPACKAGE *package) package->Context = MSIINSTALLCONTEXT_USERUNMANAGED; - r = MSI_GetPropertyW(package->db, szAllUsers, val, &sz); + r = msi_get_property(package->db, szAllUsers, val, &sz); if (r == ERROR_SUCCESS) { num = atolW(val); @@ -1520,8 +1520,8 @@ static UINT ACTION_CostInitialize(MSIPACKAGE *package) static const WCHAR szCosting[] = {'C','o','s','t','i','n','g','C','o','m','p','l','e','t','e',0 }; - MSI_SetPropertyW( package->db, szCosting, szZero ); - MSI_SetPropertyW( package->db, cszRootDrive, c_colon ); + msi_set_property( package->db, szCosting, szZero ); + msi_set_property( package->db, cszRootDrive, c_colon ); load_all_folders( package ); load_all_components( package ); @@ -1691,7 +1691,7 @@ static BOOL process_overrides( MSIPACKAGE *package, int level ) ret |= process_state_property( package, level, szAdvertise, INSTALLSTATE_ADVERTISED ); if (ret) - MSI_SetPropertyW( package->db, szPreselected, szOne ); + msi_set_property( package->db, szPreselected, szOne ); return ret; } @@ -2084,15 +2084,15 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package) } } - MSI_SetPropertyW( package->db, szCosting, szOne ); + msi_set_property( package->db, szCosting, szOne ); /* set default run level if not set */ level = msi_dup_property( package->db, szlevel ); if (!level) - MSI_SetPropertyW( package->db, szlevel, szOne ); + msi_set_property( package->db, szlevel, szOne ); msi_free(level); /* FIXME: check volume disk space */ - MSI_SetPropertyW( package->db, szOutOfDiskSpace, szZero ); + msi_set_property( package->db, szOutOfDiskSpace, szZero ); return MSI_SetFeatureStates(package); } @@ -6802,7 +6802,7 @@ static UINT ACTION_ValidateProductID( MSIPACKAGE *package ) if (key && template) { FIXME( "partial stub: template %s key %s\n", debugstr_w(template), debugstr_w(key) ); - r = MSI_SetPropertyW( package->db, szProductID, key ); + r = msi_set_property( package->db, szProductID, key ); } msi_free( template ); msi_free( key ); @@ -7216,7 +7216,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath, static const WCHAR szAction[] = {'A','C','T','I','O','N',0}; static const WCHAR szInstall[] = {'I','N','S','T','A','L','L',0}; - MSI_SetPropertyW( package->db, szAction, szInstall ); + msi_set_property( package->db, szAction, szInstall ); package->script->InWhatSequence = SEQUENCE_INSTALL; @@ -7264,7 +7264,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath, if (!szCommandLine && msi_get_property_int( package->db, szInstalled, 0 )) { TRACE("setting reinstall property\n"); - MSI_SetPropertyW( package->db, szReinstall, szAll ); + msi_set_property( package->db, szReinstall, szAll ); } /* properties may have been added by a transform */ diff --git a/dlls/msi/appsearch.c b/dlls/msi/appsearch.c index 42f16782cfd..18b95ac7c2a 100644 --- a/dlls/msi/appsearch.c +++ b/dlls/msi/appsearch.c @@ -1041,7 +1041,7 @@ static UINT iterate_appsearch(MSIRECORD *row, LPVOID param) r = ACTION_AppSearchSigName(package, sigName, &sig, &value); if (value) { - r = MSI_SetPropertyW( package->db, propName, value ); + r = msi_set_property( package->db, propName, value ); if (r == ERROR_SUCCESS && !strcmpW( propName, cszSourceDir )) msi_reset_folders( package, TRUE ); @@ -1103,7 +1103,7 @@ static UINT ITERATE_CCPSearch(MSIRECORD *row, LPVOID param) if (value) { TRACE("Found signature %s\n", debugstr_w(signature)); - MSI_SetPropertyW(package->db, success, szOne); + msi_set_property(package->db, success, szOne); msi_free(value); r = ERROR_NO_MORE_ITEMS; } diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c index 771e3d3243c..cb670908cd7 100644 --- a/dlls/msi/custom.c +++ b/dlls/msi/custom.c @@ -163,17 +163,17 @@ static void set_deferred_action_props(MSIPACKAGE *package, LPWSTR deferred_data) end = strstrW(beg, sep); *end = '\0'; - MSI_SetPropertyW(package->db, szCustomActionData, beg); + msi_set_property(package->db, szCustomActionData, beg); beg = end + 3; end = strstrW(beg, sep); *end = '\0'; - MSI_SetPropertyW(package->db, szUserSID, beg); + msi_set_property(package->db, szUserSID, beg); beg = end + 3; end = strchrW(beg, ']'); *end = '\0'; - MSI_SetPropertyW(package->db, szProductCode, beg); + msi_set_property(package->db, szProductCode, beg); } UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL execute) @@ -276,9 +276,9 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL if (deferred_data) set_deferred_action_props(package, deferred_data); else if (actiondata) - MSI_SetPropertyW(package->db, szCustomActionData, actiondata); + msi_set_property(package->db, szCustomActionData, actiondata); else - MSI_SetPropertyW(package->db, szCustomActionData, szEmpty); + msi_set_property(package->db, szCustomActionData, szEmpty); msi_free(actiondata); } @@ -327,7 +327,7 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL break; deformat_string(package,target,&deformated); - rc = MSI_SetPropertyW( package->db, source, deformated ); + rc = msi_set_property( package->db, source, deformated ); if (rc == ERROR_SUCCESS && !strcmpW( source, cszSourceDir )) msi_reset_folders( package, TRUE ); msi_free(deformated); @@ -378,7 +378,7 @@ static UINT store_binary_to_temp(MSIPACKAGE *package, LPCWSTR source, DWORD sz = MAX_PATH; UINT r; - if (MSI_GetPropertyW(package->db, cszTempFolder, fmt, &sz) != ERROR_SUCCESS) + if (msi_get_property(package->db, cszTempFolder, fmt, &sz) != ERROR_SUCCESS) GetTempPathW(MAX_PATH, fmt); if (GetTempFileNameW(fmt, szMsi, 0, tmp_file) == 0) @@ -866,7 +866,7 @@ static UINT HANDLE_CustomType23(MSIPACKAGE *package, LPCWSTR source, UINT r; size = MAX_PATH; - MSI_GetPropertyW(package->db, cszSourceDir, package_path, &size); + msi_get_property(package->db, cszSourceDir, package_path, &size); lstrcatW(package_path, szBackSlash); lstrcatW(package_path, source); diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c index a6a01b92237..2a00aa7cdeb 100644 --- a/dlls/msi/dialog.c +++ b/dlls/msi/dialog.c @@ -585,7 +585,7 @@ static void msi_dialog_update_controls( msi_dialog *dialog, LPCWSTR property ) static void msi_dialog_set_property( MSIPACKAGE *package, LPCWSTR property, LPCWSTR value ) { - UINT r = MSI_SetPropertyW( package->db, property, value ); + UINT r = msi_set_property( package->db, property, value ); if (r == ERROR_SUCCESS && !strcmpW( property, cszSourceDir )) msi_reset_folders( package, TRUE ); } @@ -3556,7 +3556,7 @@ static UINT msi_dialog_get_checkbox_state( msi_dialog *dialog, WCHAR state[2] = { 0 }; DWORD sz = 2; - MSI_GetPropertyW( dialog->package->db, control->property, state, &sz ); + msi_get_property( dialog->package->db, control->property, state, &sz ); return state[0] ? 1 : 0; } @@ -4024,7 +4024,7 @@ static UINT error_dialog_handler(MSIPACKAGE *package, LPCWSTR event, if ( !lstrcmpW( argument, error_abort ) || !lstrcmpW( argument, error_cancel ) || !lstrcmpW( argument, error_no ) ) { - MSI_SetPropertyW( package->db, result_prop, error_abort ); + msi_set_property( package->db, result_prop, error_abort ); } ControlEvent_CleanupSubscriptions(package); @@ -4100,7 +4100,7 @@ UINT msi_spawn_error_dialog( MSIPACKAGE *package, LPWSTR error_dialog, LPWSTR er if ( r != ERROR_SUCCESS ) goto done; - r = MSI_GetPropertyW( package->db, result_prop, result, &size ); + r = msi_get_property( package->db, result_prop, result, &size ); if ( r != ERROR_SUCCESS) r = ERROR_SUCCESS; diff --git a/dlls/msi/events.c b/dlls/msi/events.c index 5e35f13f406..190fea3d9ab 100644 --- a/dlls/msi/events.c +++ b/dlls/msi/events.c @@ -380,7 +380,7 @@ static UINT ControlEvent_DirectoryListUp(MSIPACKAGE *package, LPCWSTR argument, static UINT ControlEvent_ReinstallMode(MSIPACKAGE *package, LPCWSTR argument, msi_dialog *dialog) { - return MSI_SetPropertyW( package->db, szReinstallMode, argument ); + return msi_set_property( package->db, szReinstallMode, argument ); } static UINT ControlEvent_Reinstall( MSIPACKAGE *package, LPCWSTR argument, @@ -413,7 +413,7 @@ static UINT ControlEvent_ValidateProductID(MSIPACKAGE *package, LPCWSTR argument if (key && template) { FIXME( "partial stub: template %s key %s\n", debugstr_w(template), debugstr_w(key) ); - ret = MSI_SetPropertyW( package->db, szProductID, key ); + ret = msi_set_property( package->db, szProductID, key ); } msi_free( template ); msi_free( key ); diff --git a/dlls/msi/helpers.c b/dlls/msi/helpers.c index 7f6081d37f9..54d21994a6d 100644 --- a/dlls/msi/helpers.c +++ b/dlls/msi/helpers.c @@ -270,14 +270,14 @@ LPWSTR resolve_folder(MSIPACKAGE *package, LPCWSTR name, BOOL source, { check_path = msi_dup_property( package->db, cszRootDrive ); if (set_prop) - MSI_SetPropertyW( package->db, cszTargetDir, check_path ); + msi_set_property( package->db, cszTargetDir, check_path ); } /* correct misbuilt target dir */ path = build_directory_name(2, check_path, NULL); clean_spaces_from_path( path ); if (strcmpiW(path,check_path)!=0) - MSI_SetPropertyW( package->db, cszTargetDir, path ); + msi_set_property( package->db, cszTargetDir, path ); msi_free(check_path); f->ResolvedTarget = path; @@ -310,7 +310,7 @@ LPWSTR resolve_folder(MSIPACKAGE *package, LPCWSTR name, BOOL source, TRACE(" internally set to %s\n",debugstr_w(path)); if (set_prop) - MSI_SetPropertyW( package->db, name, path ); + msi_set_property( package->db, name, path ); return path; } @@ -338,7 +338,7 @@ LPWSTR resolve_folder(MSIPACKAGE *package, LPCWSTR name, BOOL source, f->ResolvedTarget = strdupW( path ); TRACE("target -> %s\n", debugstr_w(path)); if (set_prop) - MSI_SetPropertyW( package->db, name, path ); + msi_set_property( package->db, name, path ); } else { diff --git a/dlls/msi/install.c b/dlls/msi/install.c index e05bf54da4b..cba2dd50fbd 100644 --- a/dlls/msi/install.c +++ b/dlls/msi/install.c @@ -1284,7 +1284,7 @@ UINT MSI_SetInstallLevel( MSIPACKAGE *package, int iInstallLevel ) return MSI_SetFeatureStates( package ); sprintfW( level, fmt, iInstallLevel ); - r = MSI_SetPropertyW( package->db, szInstallLevel, level ); + r = msi_set_property( package->db, szInstallLevel, level ); if ( r == ERROR_SUCCESS ) r = MSI_SetFeatureStates( package ); diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index 2606b94604e..0d566411086 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -3535,10 +3535,10 @@ UINT WINAPI MsiReinstallFeatureW( LPCWSTR szProduct, LPCWSTR szFeature, if (r != ERROR_SUCCESS) return r; - MSI_SetPropertyW( package->db, szReinstallMode, reinstallmode ); - MSI_SetPropertyW( package->db, szInstalled, szOne ); - MSI_SetPropertyW( package->db, szLogVerbose, szOne ); - MSI_SetPropertyW( package->db, szReinstall, szFeature ); + msi_set_property( package->db, szReinstallMode, reinstallmode ); + msi_set_property( package->db, szInstalled, szOne ); + msi_set_property( package->db, szLogVerbose, szOne ); + msi_set_property( package->db, szReinstall, szFeature ); r = MSI_InstallPackage( package, sourcepath, NULL ); diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index ccf1037f379..6e7829a2ccd 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -746,9 +746,7 @@ extern UINT MSI_SetInstallLevel( MSIPACKAGE *package, int iInstallLevel ); extern MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *, LPCWSTR ); extern UINT MSI_OpenPackageW( LPCWSTR szPackage, MSIPACKAGE **pPackage ); extern UINT MSI_SetTargetPathW( MSIPACKAGE *, LPCWSTR, LPCWSTR ); -extern UINT MSI_SetPropertyW( MSIDATABASE *, LPCWSTR, LPCWSTR ); extern INT MSI_ProcessMessage( MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD * ); -extern UINT MSI_GetPropertyW( MSIDATABASE *, LPCWSTR, LPWSTR, LPDWORD ); extern MSICONDITION MSI_EvaluateConditionW( MSIPACKAGE *, LPCWSTR ); extern UINT MSI_GetComponentStateW( MSIPACKAGE *, LPCWSTR, INSTALLSTATE *, INSTALLSTATE * ); extern UINT MSI_GetFeatureStateW( MSIPACKAGE *, LPCWSTR, INSTALLSTATE *, INSTALLSTATE * ); @@ -970,6 +968,8 @@ extern UINT ACTION_UnregisterProgIdInfo(MSIPACKAGE *package); extern DWORD deformat_string(MSIPACKAGE *package, LPCWSTR ptr, WCHAR** data ); extern LPWSTR msi_dup_record_field(MSIRECORD *row, INT index); extern LPWSTR msi_dup_property( MSIDATABASE *db, LPCWSTR prop ); +extern UINT msi_set_property( MSIDATABASE *, LPCWSTR, LPCWSTR ); +extern UINT msi_get_property( MSIDATABASE *, LPCWSTR, LPWSTR, LPDWORD ); extern int msi_get_property_int( MSIDATABASE *package, LPCWSTR prop, int def ); extern LPWSTR resolve_folder(MSIPACKAGE *package, LPCWSTR name, BOOL source, BOOL set_prop, BOOL load_prop, MSIFOLDER **folder); diff --git a/dlls/msi/package.c b/dlls/msi/package.c index 66b7ac5a1c1..0fdce76ba68 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -388,7 +388,7 @@ static UINT set_installed_prop( MSIPACKAGE *package ) if (r == ERROR_SUCCESS) { RegCloseKey( hkey ); - MSI_SetPropertyW( package->db, szInstalled, szOne ); + msi_set_property( package->db, szInstalled, szOne ); } return r; @@ -431,7 +431,7 @@ static UINT set_user_sid_prop( MSIPACKAGE *package ) if (!ConvertSidToStringSidW( psid, &sid_str )) goto done; - r = MSI_SetPropertyW( package->db, szUserSID, sid_str ); + r = msi_set_property( package->db, szUserSID, sid_str ); done: LocalFree( sid_str ); @@ -563,7 +563,7 @@ static void set_msi_assembly_prop(MSIPACKAGE *package) if (!val_len || !verstr) goto done; - MSI_SetPropertyW(package->db, netasm, verstr); + msi_set_property(package->db, netasm, verstr); done: msi_free(fusion); @@ -689,96 +689,96 @@ static VOID set_installer_properties(MSIPACKAGE *package) SHGetFolderPathW(NULL,CSIDL_PROGRAM_FILES_COMMON,NULL,0,pth); strcatW(pth, szBackSlash); - MSI_SetPropertyW(package->db, CFF, pth); + msi_set_property(package->db, CFF, pth); SHGetFolderPathW(NULL,CSIDL_PROGRAM_FILES,NULL,0,pth); strcatW(pth, szBackSlash); - MSI_SetPropertyW(package->db, PFF, pth); + msi_set_property(package->db, PFF, pth); SHGetFolderPathW(NULL,CSIDL_COMMON_APPDATA,NULL,0,pth); strcatW(pth, szBackSlash); - MSI_SetPropertyW(package->db, CADF, pth); + msi_set_property(package->db, CADF, pth); SHGetFolderPathW(NULL,CSIDL_FAVORITES,NULL,0,pth); strcatW(pth, szBackSlash); - MSI_SetPropertyW(package->db, FaF, pth); + msi_set_property(package->db, FaF, pth); SHGetFolderPathW(NULL,CSIDL_FONTS,NULL,0,pth); strcatW(pth, szBackSlash); - MSI_SetPropertyW(package->db, FoF, pth); + msi_set_property(package->db, FoF, pth); SHGetFolderPathW(NULL,CSIDL_SENDTO,NULL,0,pth); strcatW(pth, szBackSlash); - MSI_SetPropertyW(package->db, SendTF, pth); + msi_set_property(package->db, SendTF, pth); SHGetFolderPathW(NULL,CSIDL_STARTMENU,NULL,0,pth); strcatW(pth, szBackSlash); - MSI_SetPropertyW(package->db, SMF, pth); + msi_set_property(package->db, SMF, pth); SHGetFolderPathW(NULL,CSIDL_STARTUP,NULL,0,pth); strcatW(pth, szBackSlash); - MSI_SetPropertyW(package->db, StF, pth); + msi_set_property(package->db, StF, pth); SHGetFolderPathW(NULL,CSIDL_TEMPLATES,NULL,0,pth); strcatW(pth, szBackSlash); - MSI_SetPropertyW(package->db, TemplF, pth); + msi_set_property(package->db, TemplF, pth); SHGetFolderPathW(NULL,CSIDL_DESKTOP,NULL,0,pth); strcatW(pth, szBackSlash); - MSI_SetPropertyW(package->db, DF, pth); + msi_set_property(package->db, DF, pth); SHGetFolderPathW(NULL,CSIDL_PROGRAMS,NULL,0,pth); strcatW(pth, szBackSlash); - MSI_SetPropertyW(package->db, PMF, pth); + msi_set_property(package->db, PMF, pth); SHGetFolderPathW(NULL,CSIDL_ADMINTOOLS,NULL,0,pth); strcatW(pth, szBackSlash); - MSI_SetPropertyW(package->db, ATF, pth); + msi_set_property(package->db, ATF, pth); SHGetFolderPathW(NULL,CSIDL_APPDATA,NULL,0,pth); strcatW(pth, szBackSlash); - MSI_SetPropertyW(package->db, ADF, pth); + msi_set_property(package->db, ADF, pth); SHGetFolderPathW(NULL,CSIDL_SYSTEM,NULL,0,pth); strcatW(pth, szBackSlash); - MSI_SetPropertyW(package->db, SF, pth); - MSI_SetPropertyW(package->db, SF16, pth); + msi_set_property(package->db, SF, pth); + msi_set_property(package->db, SF16, pth); SHGetFolderPathW(NULL,CSIDL_LOCAL_APPDATA,NULL,0,pth); strcatW(pth, szBackSlash); - MSI_SetPropertyW(package->db, LADF, pth); + msi_set_property(package->db, LADF, pth); SHGetFolderPathW(NULL,CSIDL_MYPICTURES,NULL,0,pth); strcatW(pth, szBackSlash); - MSI_SetPropertyW(package->db, MPF, pth); + msi_set_property(package->db, MPF, pth); SHGetFolderPathW(NULL,CSIDL_PERSONAL,NULL,0,pth); strcatW(pth, szBackSlash); - MSI_SetPropertyW(package->db, PF, pth); + msi_set_property(package->db, PF, pth); SHGetFolderPathW(NULL,CSIDL_WINDOWS,NULL,0,pth); strcatW(pth, szBackSlash); - MSI_SetPropertyW(package->db, WF, pth); + msi_set_property(package->db, WF, pth); /* Physical Memory is specified in MB. Using total amount. */ msex.dwLength = sizeof(msex); GlobalMemoryStatusEx( &msex ); sprintfW( bufstr, szIntFormat, (int)(msex.ullTotalPhys/1024/1024)); - MSI_SetPropertyW(package->db, szPhysicalMemory, bufstr); + msi_set_property(package->db, szPhysicalMemory, bufstr); SHGetFolderPathW(NULL,CSIDL_WINDOWS,NULL,0,pth); ptr = strchrW(pth,'\\'); if (ptr) *(ptr+1) = 0; - MSI_SetPropertyW(package->db, WV, pth); + msi_set_property(package->db, WV, pth); GetTempPathW(MAX_PATH,pth); - MSI_SetPropertyW(package->db, TF, pth); + msi_set_property(package->db, TF, pth); /* in a wine environment the user is always admin and privileged */ - MSI_SetPropertyW(package->db, szAdminUser, szOne); - MSI_SetPropertyW(package->db, szPriv, szOne); + msi_set_property(package->db, szAdminUser, szOne); + msi_set_property(package->db, szPriv, szOne); /* set the os things */ OSVersion.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXW); @@ -788,39 +788,39 @@ static VOID set_installer_properties(MSIPACKAGE *package) switch (OSVersion.dwPlatformId) { case VER_PLATFORM_WIN32_WINDOWS: - MSI_SetPropertyW(package->db, v9x, verstr); + msi_set_property(package->db, v9x, verstr); break; case VER_PLATFORM_WIN32_NT: - MSI_SetPropertyW(package->db, vNT, verstr); + msi_set_property(package->db, vNT, verstr); sprintfW(verstr,szFormat,OSVersion.wProductType); - MSI_SetPropertyW(package->db, szMsiNTProductType, verstr); + msi_set_property(package->db, szMsiNTProductType, verstr); break; } sprintfW(verstr,szFormat,OSVersion.dwBuildNumber); - MSI_SetPropertyW(package->db, szWinBuild, verstr); + msi_set_property(package->db, szWinBuild, verstr); /* just fudge this */ - MSI_SetPropertyW(package->db, szSPL, szSix); + msi_set_property(package->db, szSPL, szSix); sprintfW( bufstr, szFormat2, MSI_MAJORVERSION, MSI_MINORVERSION); - MSI_SetPropertyW( package->db, szVersionMsi, bufstr ); + msi_set_property( package->db, szVersionMsi, bufstr ); sprintfW( bufstr, szFormat, MSI_MAJORVERSION * 100); - MSI_SetPropertyW( package->db, szVersionDatabase, bufstr ); + msi_set_property( package->db, szVersionDatabase, bufstr ); GetSystemInfo( &sys_info ); if (sys_info.u.s.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL) { sprintfW( bufstr, szIntFormat, sys_info.wProcessorLevel ); - MSI_SetPropertyW( package->db, szIntel, bufstr ); + msi_set_property( package->db, szIntel, bufstr ); } /* Screen properties. */ dc = GetDC(0); sprintfW( bufstr, szIntFormat, GetDeviceCaps( dc, HORZRES ) ); - MSI_SetPropertyW( package->db, szScreenX, bufstr ); + msi_set_property( package->db, szScreenX, bufstr ); sprintfW( bufstr, szIntFormat, GetDeviceCaps( dc, VERTRES )); - MSI_SetPropertyW( package->db, szScreenY, bufstr ); + msi_set_property( package->db, szScreenY, bufstr ); sprintfW( bufstr, szIntFormat, GetDeviceCaps( dc, BITSPIXEL )); - MSI_SetPropertyW( package->db, szColorBits, bufstr ); + msi_set_property( package->db, szColorBits, bufstr ); ReleaseDC(0, dc); /* USERNAME and COMPANYNAME */ @@ -832,10 +832,10 @@ static VOID set_installer_properties(MSIPACKAGE *package) { if (!username && (username = msi_reg_get_val_str( hkey, szDefName ))) - MSI_SetPropertyW( package->db, szUSERNAME, username ); + msi_set_property( package->db, szUSERNAME, username ); if (!companyname && (companyname = msi_reg_get_val_str( hkey, szDefCompany ))) - MSI_SetPropertyW( package->db, szCOMPANYNAME, companyname ); + msi_set_property( package->db, szCOMPANYNAME, companyname ); CloseHandle( hkey ); } if ((!username || !companyname) && @@ -843,10 +843,10 @@ static VOID set_installer_properties(MSIPACKAGE *package) { if (!username && (username = msi_reg_get_val_str( hkey, szRegisteredUser ))) - MSI_SetPropertyW( package->db, szUSERNAME, username ); + msi_set_property( package->db, szUSERNAME, username ); if (!companyname && (companyname = msi_reg_get_val_str( hkey, szRegisteredOrg ))) - MSI_SetPropertyW( package->db, szCOMPANYNAME, companyname ); + msi_set_property( package->db, szCOMPANYNAME, companyname ); CloseHandle( hkey ); } msi_free( username ); @@ -859,7 +859,7 @@ static VOID set_installer_properties(MSIPACKAGE *package) GetSystemTime( &systemtime ); if (GetDateFormatW( LOCALE_USER_DEFAULT, DATE_SHORTDATE, &systemtime, NULL, bufstr, sizeof(bufstr)/sizeof(bufstr[0]) )) - MSI_SetPropertyW( package->db, szDate, bufstr ); + msi_set_property( package->db, szDate, bufstr ); else ERR("Couldn't set Date property: GetDateFormat failed with error %d\n", GetLastError()); @@ -867,7 +867,7 @@ static VOID set_installer_properties(MSIPACKAGE *package) TIME_FORCE24HOURFORMAT | TIME_NOTIMEMARKER, &systemtime, NULL, bufstr, sizeof(bufstr)/sizeof(bufstr[0]) )) - MSI_SetPropertyW( package->db, szTime, bufstr ); + msi_set_property( package->db, szTime, bufstr ); else ERR("Couldn't set Time property: GetTimeFormat failed with error %d\n", GetLastError()); @@ -875,14 +875,14 @@ static VOID set_installer_properties(MSIPACKAGE *package) langid = GetUserDefaultLangID(); sprintfW(bufstr, szIntFormat, langid); - MSI_SetPropertyW( package->db, szUserLangID, bufstr ); + msi_set_property( package->db, szUserLangID, bufstr ); langid = GetSystemDefaultLangID(); sprintfW(bufstr, szIntFormat, langid); - MSI_SetPropertyW( package->db, szSystemLangID, bufstr ); + msi_set_property( package->db, szSystemLangID, bufstr ); sprintfW(bufstr, szIntFormat, MsiQueryProductStateW(package->ProductCode)); - MSI_SetPropertyW( package->db, szProductState, bufstr ); + msi_set_property( package->db, szProductState, bufstr ); len = 0; if (!GetUserNameW( NULL, &len ) && GetLastError() == ERROR_MORE_DATA) @@ -891,7 +891,7 @@ static VOID set_installer_properties(MSIPACKAGE *package) if ((username = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) { if (GetUserNameW( username, &len )) - MSI_SetPropertyW( package->db, szLogonUser, username ); + msi_set_property( package->db, szLogonUser, username ); HeapFree( GetProcessHeap(), 0, username ); } } @@ -950,7 +950,7 @@ static UINT msi_load_summary_properties( MSIPACKAGE *package ) goto done; } - MSI_SetPropertyW( package->db, szPackageCode, package_code ); + msi_set_property( package->db, szPackageCode, package_code ); msi_free( package_code ); /* load package attributes */ @@ -1014,7 +1014,7 @@ static void adjust_allusers_property( MSIPACKAGE *package ) if (msi_get_property_int( package->db, szAllUsers, 0 ) == 2) { TRACE("resetting ALLUSERS property from 2 to 1\n"); - MSI_SetPropertyW( package->db, szAllUsers, szOne ); + msi_set_property( package->db, szAllUsers, szOne ); } } @@ -1046,7 +1046,7 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url ) set_installer_properties( package ); sprintfW(uilevel,szpi,gUILevel); - MSI_SetPropertyW(package->db, szLevel, uilevel); + msi_set_property(package->db, szLevel, uilevel); r = msi_load_summary_properties( package ); if (r != ERROR_SUCCESS) @@ -1271,18 +1271,18 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage) if( file != szPackage ) track_tempfile( package, file ); - MSI_SetPropertyW( package->db, Database, db->path ); + msi_set_property( package->db, Database, db->path ); if( UrlIsW( szPackage, URLIS_URL ) ) - MSI_SetPropertyW( package->db, OriginalDatabase, szPackage ); + msi_set_property( package->db, OriginalDatabase, szPackage ); else if( szPackage[0] == '#' ) - MSI_SetPropertyW( package->db, OriginalDatabase, db->path ); + msi_set_property( package->db, OriginalDatabase, db->path ); else { WCHAR fullpath[MAX_PATH]; GetFullPathNameW( szPackage, MAX_PATH, fullpath, NULL ); - MSI_SetPropertyW( package->db, OriginalDatabase, fullpath ); + msi_set_property( package->db, OriginalDatabase, fullpath ); } package->script = msi_alloc_zero( sizeof(MSISCRIPT) ); @@ -1648,7 +1648,7 @@ void msi_reset_folders( MSIPACKAGE *package, BOOL source ) } } -UINT MSI_SetPropertyW( MSIDATABASE *db, LPCWSTR szName, LPCWSTR szValue ) +UINT msi_set_property( MSIDATABASE *db, LPCWSTR szName, LPCWSTR szValue ) { MSIQUERY *view; MSIRECORD *row = NULL; @@ -1681,7 +1681,7 @@ UINT MSI_SetPropertyW( MSIDATABASE *db, LPCWSTR szName, LPCWSTR szValue ) if (!szName[0]) return szValue ? ERROR_FUNCTION_FAILED : ERROR_SUCCESS; - rc = MSI_GetPropertyW(db, szName, 0, &sz); + rc = msi_get_property(db, szName, 0, &sz); if (!szValue || !*szValue) { sprintfW(Query, Delete, szName); @@ -1759,7 +1759,7 @@ UINT WINAPI MsiSetPropertyW( MSIHANDLE hInstall, LPCWSTR szName, LPCWSTR szValue return ERROR_SUCCESS; } - ret = MSI_SetPropertyW( package->db, szName, szValue ); + ret = msi_set_property( package->db, szName, szValue ); if (ret == ERROR_SUCCESS && !strcmpW( szName, cszSourceDir )) msi_reset_folders( package, TRUE ); @@ -1767,7 +1767,7 @@ UINT WINAPI MsiSetPropertyW( MSIHANDLE hInstall, LPCWSTR szName, LPCWSTR szValue return ret; } -static MSIRECORD *MSI_GetPropertyRow( MSIDATABASE *db, LPCWSTR name ) +static MSIRECORD *msi_get_property_row( MSIDATABASE *db, LPCWSTR name ) { MSIQUERY *view; MSIRECORD *rec, *row = NULL; @@ -1802,13 +1802,13 @@ static MSIRECORD *MSI_GetPropertyRow( MSIDATABASE *db, LPCWSTR name ) } /* internal function, not compatible with MsiGetPropertyW */ -UINT MSI_GetPropertyW( MSIDATABASE *db, LPCWSTR szName, +UINT msi_get_property( MSIDATABASE *db, LPCWSTR szName, LPWSTR szValueBuf, LPDWORD pchValueBuf ) { MSIRECORD *row; UINT rc = ERROR_FUNCTION_FAILED; - row = MSI_GetPropertyRow( db, szName ); + row = msi_get_property_row( db, szName ); if (*pchValueBuf > 0) szValueBuf[0] = 0; @@ -1840,13 +1840,13 @@ LPWSTR msi_dup_property(MSIDATABASE *db, LPCWSTR prop) LPWSTR str; UINT r; - r = MSI_GetPropertyW(db, prop, NULL, &sz); + r = msi_get_property(db, prop, NULL, &sz); if (r != ERROR_SUCCESS && r != ERROR_MORE_DATA) return NULL; sz++; str = msi_alloc(sz * sizeof(WCHAR)); - r = MSI_GetPropertyW(db, prop, str, &sz); + r = msi_get_property(db, prop, str, &sz); if (r != ERROR_SUCCESS) { msi_free(str); @@ -1937,7 +1937,7 @@ done: return r; } - row = MSI_GetPropertyRow( package->db, name ); + row = msi_get_property_row( package->db, name ); if (row) val = MSI_RecordGetString( row, 1 ); diff --git a/dlls/msi/upgrade.c b/dlls/msi/upgrade.c index 4e088a74638..f9e35a40a79 100644 --- a/dlls/msi/upgrade.c +++ b/dlls/msi/upgrade.c @@ -88,7 +88,7 @@ static void append_productcode(MSIPACKAGE* package, LPCWSTR action_property, newprop[0] = 0; strcatW(newprop,productid); - r = MSI_SetPropertyW( package->db, action_property, newprop ); + r = msi_set_property( package->db, action_property, newprop ); if (r == ERROR_SUCCESS && !strcmpW( action_property, cszSourceDir )) msi_reset_folders( package, TRUE );