diff options
author | Kurt Zenker <kz@openoffice.org> | 2005-11-11 12:56:54 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2005-11-11 12:56:54 +0000 |
commit | 891cff629b2271c60a7f07f31ab44dfb58b10762 (patch) | |
tree | 662531b179fac5396353ac321ccaf537f2710865 /setup_native | |
parent | b4a412e1044fd2dcb0a325a1179663944a34040b (diff) |
INTEGRATION: CWS c05v001 (1.3.92); FILE MERGED
2005/11/07 16:12:04 is 1.3.92.1: #127628# remove quickstarter link
Diffstat (limited to 'setup_native')
-rw-r--r-- | setup_native/source/win32/customactions/quickstarter/quickstarter.cxx | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/setup_native/source/win32/customactions/quickstarter/quickstarter.cxx b/setup_native/source/win32/customactions/quickstarter/quickstarter.cxx index a6d7daea0c4e..0b0732e8cf74 100644 --- a/setup_native/source/win32/customactions/quickstarter/quickstarter.cxx +++ b/setup_native/source/win32/customactions/quickstarter/quickstarter.cxx @@ -39,6 +39,33 @@ std::string GetOfficeProductName(MSIHANDLE handle) return productname; } +std::string GetQuickstarterLinkName(MSIHANDLE handle) +{ + std::string quickstarterlinkname; + DWORD sz = 0; + LPTSTR dummy = TEXT(""); + + if (MsiGetProperty(handle, TEXT("Quickstarterlinkname"), dummy, &sz) == ERROR_MORE_DATA) + { + sz++; // space for the final '\0' + DWORD nbytes = sz * sizeof(TCHAR); + LPTSTR buff = reinterpret_cast<LPTSTR>(_alloca(nbytes)); + ZeroMemory(buff, nbytes); + MsiGetProperty(handle, TEXT("Quickstarterlinkname"), buff, &sz); + quickstarterlinkname = buff; + } + else if (MsiGetProperty(handle, TEXT("ProductName"), dummy, &sz) == ERROR_MORE_DATA) + { + sz++; // space for the final '\0' + DWORD nbytes = sz * sizeof(TCHAR); + LPTSTR buff = reinterpret_cast<LPTSTR>(_alloca(nbytes)); + ZeroMemory(buff, nbytes); + MsiGetProperty(handle, TEXT("ProductName"), buff, &sz); + quickstarterlinkname = buff; + } + return quickstarterlinkname; +} + inline bool IsValidHandle( HANDLE handle ) { return NULL != handle && INVALID_HANDLE_VALUE != handle; |