Extract icon from UWP application

前端 未结 1 1669
误落风尘
误落风尘 2021-01-28 13:09

While trying to implement \"Open With\" functionality I encountered a problem with extracting icons from UWP applications. So, after receiving list of recommended applications t

1条回答
  •  清酒与你
    2021-01-28 14:08

    Looks like I've found the solution. The icon location path provided for UWP application is called "indirect string" according to MSDN. We can pass this indirect string to SHLoadIndirectString function and will receive the regular full path to the icon PNG file. In my case after passing @{Microsoft.Windows.Photos_16.511.8630.0_x64__8wekyb3d8bbwe?ms-resource://Microsoft.Windows.Photos/Files/Assets/PhotosAppList.png} to SHLoadIndirectString() I received path like that: C:\Program Files\WindowsApps\Microsoft.Windows.Photos_16.511.8630.0_neutral_split.scale-125_8wekyb3d8bbwe\Assets\PhotosAppList.scale-125.png and after that I can use it to display the icon itself w/o any problem.

    0 讨论(0)
提交回复
热议问题