I need this since SHGetFileInfo() wants absolute PIDLs and
I need that function to retrieve the icons for the contents
of shell folders.
To enumerate the contents of the folder I use
IShellFolder::EnumObjects() and then IEnumIDList::Next(),
which returns a relative PIDL.
Any ideas?
/Emil
--
===========================================================
Emil Astrom, programmer at Excosoft AB
emil....@excosoft.se http://www.excosoft.se
===========================================================
Sent via Deja.com
http://www.deja.com/
Rob
"Emil Astrom" <emil....@excosoft.se> wrote in message
news:93hbo6$cqq$1...@nnrp1.deja.com...
PIDLs may sound confusing, but down deep they are like text paths. So if
you have the full PIDL of the container folder (I assume this is the
case since you've got the IShellFolder*), you just need to "append" the
local file PIDL to that and you'll have the global pidl for the file
You'll need to read in the docs about the SHITEMID that is the
elementary unit of all pidls, so as to know how to "walk" a complex pidl
containing more than one "folders" (SHITEMIDs) --- if you don't know
that already that is <g>
Just as C-strings have a null to mark the end, pidls have a null
SHITEMID, which is basically one that has cb==0. You'll have to remove
this "null" from the folder's global pidl, and append verbatim the local
folder's pidl, including its "null".
An altogether different approach would be to use the desktop's
IShellFolder::ParseDisplayName() passing the full UNICODE path of your
file. That should be easier if you don't feel comfortable with SHITEMIDs
--
TSEK-IT: http://personal-pages.ps.ic.ac.uk/~umeca74/
2xExplorer R7 just made windows Explorer obsolete
Great! Thank you!