How to get icon from Icon Table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • emibt08
    New Member
    • Oct 2008
    • 25

    How to get icon from Icon Table

    Hello fellow programmers.
    I've been stuck with a thing that i can't find any info about. I used the Windows Installer function MsiGetProductIn fo to get the property INSTALLPROPERTY _PRODUCTICON. Now, i get the data in the buffer, but as the description says:
    Primary icon for the package. For more information, see the ARPPRODUCTICON property.
    And as for ARPPRODUCTICON, the ARPPRODUCTICON property specifies the foreign key to the Icon table, which is the primary icon for the Windows Installer package. Now, i have no clue how to get the icon from that data. I tried using SHGetFileInfo and ExtractIconEx, but i get (mostly) default exe icons and not app icons. I know it's due to the fact that i am getting index 0, so i can parse all the data manually (it doesn't contain drive letter though, so it starts with colon). But i think there gotta be some API which would do that. Unfortunately, i coudn't get any. So, if you know any way to extract the correct icon from this, please help me out. It contains the icon index in the data, but i would really prefer some API to do this task.

    Thanks in advance :-)
Working...