Here is the most simpliest way to get access to the images/icons/thumbnails!!
All you need is a typelib that supports IShellItem and IShellItemImageFactory.
Here we go!!
Cheers and have fun :wave: :p:cool:
All you need is a typelib that supports IShellItem and IShellItemImageFactory.
Here we go!!
Code:
Public Function ShGetIShellItemFromItemId(ByVal pidl As Long, ByRef pISI As IShellItem) As Long
Dim hr As Long
Set pISI = Nothing
If pidl = 0 Then Exit Function
hr = SHCreateItemFromIDList(pidl, IID_IShellItem, pISI)
ShGetIShellItemFromItemId = hr
End Function
Public Function ShIShellItemImageFactory(ByVal pidl As Long, ByRef pISIIF As IShellItemImageFactory) As Long
Dim hr As Long
Dim pISI As IShellItem
hr = ShGetIShellItemFromItemId(pidl, pISI)
If hr = S_OK Then
Set pISIIF = pISI
End If
End Function