Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than Interfaces, prefix the name with the module name and a period.
IShellItem (Interfaces)
.
C# Definition:
[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("43826d1e-e718-42ee-bc55-a1e261c37bfe")]
public interface IShellItem {
void BindToHandler(IntPtr pbc,
[MarshalAs(UnmanagedType.LPStruct)]Guid bhid,
[MarshalAs(UnmanagedType.LPStruct)]Guid riid,
out IntPtr ppv);
void GetParent(out IShellItem ppsi);
void GetDisplayName(SIGDN sigdnName, out IntPtr ppszName);
void GetAttributes(uint sfgaoMask, out uint psfgaoAttribs);
void Compare(IShellItem psi, uint hint, out int piOrder);
};
VB Definition:
<ComImport()> _
<Guid("43826d1e-e718-42ee-bc55-a1e261c37bfe")> _
<InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _
Public Interface IShellItem
Sub BindToHandler(ByVal pbc As IntPtr, _
<MarshalAs(UnmanagedType.LPStruct)> ByVal bhid As Guid, _
<MarshalAs(UnmanagedType.LPStruct)> ByVal riid As Guid, _
ByRef ppv As IntPtr)
Sub GetParent(ByRef ppsi As IShellItem)
Sub GetDisplayName(ByVal sigdnName As SIGDN, ByRef ppszName As IntPtr)
Sub GetAttributes(ByVal sfgaoMask As UInt32, ByRef psfgaoAttribs As UInt32)
Sub Compare(ByVal psi As IShellItem, ByVal hint As UInt32, ByRef piOrder As Integer)
End Interface
To get a thumbnail for a shell item, simply cast the IShellItem instance to IShellItemImageFactory and call GetImage() on it. Usage may look something like this:
None.
IShellItem ppsi = null;
IntPtr hbitmap = IntPtr.Zero;
// GUID of IShellItem.
Guid uuid = new Guid("43826d1e-e718-42ee-bc55-a1e261c37bfe");
SHCreateItemFromParsingName(filename, IntPtr.Zero, uuid, out ppsi);
((IShellItemImageFactory)ppsi).GetImage(new SIZE(256, 256), 0x0, out hbitmap);
//Alternatively one does not need IShellItem - this works on Win10
IShellItemImageFactory ppsiif = null;
IntPtr hbitmap = IntPtr.Zero;
SHCreateItemFromParsingName(filename, IntPtr.Zero, new Guid("bcc18b79-ba16-442f-80c4-8a59c30c463b"), out ppsiif);
ppsiif.GetImage(new SIZE(256, 256), SIIGBF.SIIGBF_BIGGERSIZEOK | SIIGBF.SIIGBF_THUMBNAILONLY, out hbitmap);
var image = Image.FromHbitmap(hbitmap);
DeleteObject(hbitmap);
Exposes methods that retrieve information about a Shell item. IShellItem and IShellItem2 are the preferred representations of items in any new code
3/3/2021 1:24:20 PM - -63.118.230.241
Used by SHGetNameFromIDList
5/21/2021 6:23:10 AM - -90.73.43.220
Exposes methods that retrieve information about a Shell item. IShellItem and IShellItem2 are the preferred representations of items in any new code
3/3/2021 1:24:20 PM - -63.118.230.241
Exposes methods that return either icons or thumbnails for Shell items.
8/12/2010 1:03:07 AM - olenikm@gmail.com-76.189.212.160
Please edit this page!
Do you have...
helpful tips?
corrections to the existing content?
alternate definitions?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed.