[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;
}
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
None.
Used by the SHGetFileInfo.
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.
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.