I want to get the system icon representing a network domain. (icon for a
domain in the system icon list)
I am able to get the network neighborhood icon with a call to
SHGetSpecialFolderLocation(Application.Handle,
CSIDL_NETWORK,
NewPIDL);
This give me the PIDL of the network neighboorhood so I can then call
SHGetFileInfo(PChar(NewPIDL),
0,
FileInfo,
SizeOf(FileInfo),
SHGFI_PIDL or SHGFI_SYSICONINDEX or SHGFI_SMALLICON);
And then I get the icon with FileInfo.iIcon
I can also get the icon of a network drive connection with SHGetFileInfo
using a path instead of a PIDL ("\\SERVER" for example).
But I am not able to get the icon for a Domain (or workgroup). Passing
the path does not work because a domain is not a path and I don't know
how to get the PIDL of a domain.
Any suggestion ?
Thanks,
Sunix