diff options
author | Bob Arnson <bob@firegiant.com> | 2020-09-27 22:01:36 -0400 |
---|---|---|
committer | Bob Arnson <bob@firegiant.com> | 2020-09-27 22:05:14 -0400 |
commit | c1f7e431ba09005bcc173bc251882d5761069376 (patch) | |
tree | 90608e80ae338df2ddbc1531eddb685d245eadd3 /src/ca | |
parent | efd56dab431aea59eadb120bb72277b7336f23f8 (diff) | |
download | wix-c1f7e431ba09005bcc173bc251882d5761069376.tar.gz wix-c1f7e431ba09005bcc173bc251882d5761069376.tar.bz2 wix-c1f7e431ba09005bcc173bc251882d5761069376.zip |
Modularize IconFile
Diffstat (limited to 'src/ca')
-rw-r--r-- | src/ca/netshortcuts.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ca/netshortcuts.cpp b/src/ca/netshortcuts.cpp index 6ff129db..06826264 100644 --- a/src/ca/netshortcuts.cpp +++ b/src/ca/netshortcuts.cpp | |||
@@ -219,6 +219,8 @@ static HRESULT CreateUrl( | |||
219 | 219 | ||
220 | if (wzIconPath) | 220 | if (wzIconPath) |
221 | { | 221 | { |
222 | WcaLog(LOGMSG_STANDARD, "Adding icon '%ls' index '%d'", wzIconPath, iconIndex); | ||
223 | |||
222 | hr = piURL->QueryInterface(IID_IPropertySetStorage, (void **)&piProperties); | 224 | hr = piURL->QueryInterface(IID_IPropertySetStorage, (void **)&piProperties); |
223 | ExitOnFailure(hr, "failed to get IPropertySetStorage for shortcut '%ls'", wzShortcutPath); | 225 | ExitOnFailure(hr, "failed to get IPropertySetStorage for shortcut '%ls'", wzShortcutPath); |
224 | 226 | ||
@@ -234,7 +236,7 @@ static HRESULT CreateUrl( | |||
234 | ppvar[0].vt = VT_I4; | 236 | ppvar[0].vt = VT_I4; |
235 | ppvar[0].lVal = iconIndex; | 237 | ppvar[0].lVal = iconIndex; |
236 | ppvar[1].vt = VT_LPWSTR; | 238 | ppvar[1].vt = VT_LPWSTR; |
237 | ppvar[1].pwszVal = (LPWSTR)wzIconPath; | 239 | ppvar[1].pwszVal = const_cast<LPWSTR>(wzIconPath); |
238 | 240 | ||
239 | hr = piStorage->WriteMultiple(2, ppids, ppvar, 0); | 241 | hr = piStorage->WriteMultiple(2, ppids, ppvar, 0); |
240 | ExitOnFailure(hr, "failed to write icon storage for shortcut '%ls'", wzShortcutPath); | 242 | ExitOnFailure(hr, "failed to write icon storage for shortcut '%ls'", wzShortcutPath); |
@@ -285,6 +287,7 @@ static HRESULT CreateLink( | |||
285 | 287 | ||
286 | if (wzIconPath) | 288 | if (wzIconPath) |
287 | { | 289 | { |
290 | WcaLog(LOGMSG_STANDARD, "Adding icon '%ls' index '%d'", wzIconPath, iconIndex); | ||
288 | hr = piShellLink->SetIconLocation(wzIconPath, iconIndex); | 291 | hr = piShellLink->SetIconLocation(wzIconPath, iconIndex); |
289 | ExitOnFailure(hr, "failed to set icon for shortcut '%ls'", wzShortcutPath); | 292 | ExitOnFailure(hr, "failed to set icon for shortcut '%ls'", wzShortcutPath); |
290 | } | 293 | } |