SHFILEINFO (Structures)
Last changed: PJonDevelopment (http---pjondevelopment.50webs.com)-189.25.187.30

.
Summary
Contains information about a file object.

C# Signature:

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
struct SHFILEINFO {
    public IntPtr hIcon;
    public int iIcon;
    public uint dwAttributes;
    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
    public string szDisplayName;
    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)]
    public string szTypeName;
}

VB Signature:

Structure SHFILEINFO
    Public hIcon As IntPtr
    Public iIcon As Integer
    Public dwAttributes As Integer
    <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=260)> _
    Public szDisplayName As String
    <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=80)> _
    Public szTypeName As String
End Structure

User-Defined Field Types:

None.

Notes:

Used by the SHGetFileInfo.

Properties:

hIcon

Handle to the icon that represents the file.

iIcon

Index of the icon image within the system image list.

dwAttributes

Array of values that indicates the attributes of the file object.

szDisplayName

String that contains the name of the file as it appears in the Microsoft Windows Shell, or the path and file name of the file that contains the icon representing the file.

szTypeName

String that describes the type of file.

Editions:

Changed from Definition to Signature in order to display them in the PInvoke.net Visual Studio Add-In.

Changed C# definition of iIcon from IntPtr to int, because IntPtr is the wrong type and messes it all up on the Windwos 64bit platform.

Documentation
SHFILEINFO on MSDN