TIP: Click on subject to list as thread! ANSI
echo: visual_basic
to: All
from: Bob
date: 2003-11-24 11:46:00
subject: ShellLinkObject -- GetIc

Hi !
I got a problem here ... i used a ShellLinkObject is retrive some data from
..lnk files (path to execute, working directory, etc ...) but i need to get
the icon path (in some case this is the same as the exe, but this is not
always this !).
I found the function GetIconPath, but this is returning only the "icon
index" in the file (exe, dll), I need the path too, specially if the icon
path is an .ico file.

Here is a sample of my code, thank's for helping guys :P
- Bob

Private shlIcon As Shell
Private fldIcon(10) As Folder
Private fileIcon(10, 50) As FolderItem
Private lnkIcon(10, 50) As ShellLinkObject
Private Const PATH_TO_SHELL = "D:\New Folder\"
Private pathIcon(10, 50) as String

    Set shlIcon = New Shell
    Set fldIcon(0) = shlIcon.NameSpace(PATH_TO_SHELL)

    For i = 0 To fldIcon(0).Items.Count
        ' SET - fileIcon - lnkIcon
        Set fileIcon(0, i) = fldIcon(0).Items.Item(i)
        Set lnkIcon(0, i) = fileIcon(0, i).GetLink

        ' This returns: 0
        pathIcon(0, i) = lnkIcon(0, i).GetIconLocation (0) '????
    Next i
---
þ RIMEGate(tm)/RGXPost V1.14 at BBSWORLD * Info{at}bbsworld.com

---
 * RIMEGate(tm)V10.2áÿ* RelayNet(tm) NNTP Gateway * MoonDog BBS
 * RgateImp.MoonDog.BBS at 11/24/03 11:46:29 AM
* Origin: MoonDog BBS, Brooklyn,NY, 718 692-2498, 1:278/230 (1:278/230)
SEEN-BY: 633/267 270
@PATH: 278/230 10/345 106/1 2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.