package.c (62ababd7) | package.c (3431091c) |
---|---|
1/* 2 * Implementation of the Microsoft Installer (msi.dll) 3 * 4 * Copyright 2004 Aric Stewart for CodeWeavers 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either --- 2196 unchanged lines hidden (view full) --- 2205{ 2206 MSIPACKAGE *package; 2207 UINT ret; 2208 2209 package = msihandle2msiinfo( hInstall, MSIHANDLETYPE_PACKAGE); 2210 if( !package ) 2211 { 2212 MSIHANDLE remote; | 1/* 2 * Implementation of the Microsoft Installer (msi.dll) 3 * 4 * Copyright 2004 Aric Stewart for CodeWeavers 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either --- 2196 unchanged lines hidden (view full) --- 2205{ 2206 MSIPACKAGE *package; 2207 UINT ret; 2208 2209 package = msihandle2msiinfo( hInstall, MSIHANDLETYPE_PACKAGE); 2210 if( !package ) 2211 { 2212 MSIHANDLE remote; |
2213 HRESULT hr; 2214 BSTR name = NULL, value = NULL; | |
2215 2216 if (!(remote = msi_get_remote(hInstall))) 2217 return ERROR_INVALID_HANDLE; 2218 | 2213 2214 if (!(remote = msi_get_remote(hInstall))) 2215 return ERROR_INVALID_HANDLE; 2216 |
2219 name = SysAllocString( szName ); 2220 value = SysAllocString( szValue ); 2221 if ((!name && szName) || (!value && szValue)) 2222 { 2223 SysFreeString( name ); 2224 SysFreeString( value ); 2225 return ERROR_OUTOFMEMORY; 2226 } 2227 2228 hr = remote_SetProperty(remote, name, value); 2229 2230 SysFreeString( name ); 2231 SysFreeString( value ); 2232 2233 if (FAILED(hr)) 2234 { 2235 if (HRESULT_FACILITY(hr) == FACILITY_WIN32) 2236 return HRESULT_CODE(hr); 2237 2238 return ERROR_FUNCTION_FAILED; 2239 } 2240 2241 return ERROR_SUCCESS; | 2217 return remote_SetProperty(remote, szName, szValue); |
2242 } 2243 2244 ret = msi_set_property( package->db, szName, szValue, -1 ); 2245 if (ret == ERROR_SUCCESS && !strcmpW( szName, szSourceDir )) 2246 msi_reset_folders( package, TRUE ); 2247 2248 msiobj_release( &package->hdr ); 2249 return ret; --- 252 unchanged lines hidden (view full) --- 2502 *value = midl_user_allocate(*size * sizeof(WCHAR)); 2503 if (!*value) 2504 return ERROR_OUTOFMEMORY; 2505 r = MsiGetPropertyW(hinst, property, *value, size); 2506 } 2507 return r; 2508} 2509 | 2218 } 2219 2220 ret = msi_set_property( package->db, szName, szValue, -1 ); 2221 if (ret == ERROR_SUCCESS && !strcmpW( szName, szSourceDir )) 2222 msi_reset_folders( package, TRUE ); 2223 2224 msiobj_release( &package->hdr ); 2225 return ret; --- 252 unchanged lines hidden (view full) --- 2478 *value = midl_user_allocate(*size * sizeof(WCHAR)); 2479 if (!*value) 2480 return ERROR_OUTOFMEMORY; 2481 r = MsiGetPropertyW(hinst, property, *value, size); 2482 } 2483 return r; 2484} 2485 |
2510HRESULT __cdecl remote_SetProperty(MSIHANDLE hinst, BSTR property, BSTR value) | 2486UINT __cdecl remote_SetProperty(MSIHANDLE hinst, LPCWSTR property, LPCWSTR value) |
2511{ | 2487{ |
2512 UINT r = MsiSetPropertyW(hinst, property, value); 2513 return HRESULT_FROM_WIN32(r); | 2488 return MsiSetPropertyW(hinst, property, value); |
2514} 2515 2516HRESULT __cdecl remote_ProcessMessage(MSIHANDLE hinst, INSTALLMESSAGE message, MSIHANDLE record) 2517{ 2518 UINT r = MsiProcessMessage(hinst, message, record); 2519 return HRESULT_FROM_WIN32(r); 2520} 2521 --- 163 unchanged lines hidden --- | 2489} 2490 2491HRESULT __cdecl remote_ProcessMessage(MSIHANDLE hinst, INSTALLMESSAGE message, MSIHANDLE record) 2492{ 2493 UINT r = MsiProcessMessage(hinst, message, record); 2494 return HRESULT_FROM_WIN32(r); 2495} 2496 --- 163 unchanged lines hidden --- |