Files
Pilz/Pilz.Win32/Native/SHFILEINFO.cs

46 lines
1.4 KiB
C#

using System.Runtime.InteropServices;
namespace Pilz.Win32.Native;
/// <summary>
/// Contains information about a file object.
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public struct SHFILEINFO
{
public const uint SHGFI_ICON = 0x100U;
public const uint SHGFI_LARGEICON = 0x0U;
public const uint SHGFI_SMALLICON = 0x1U;
/// <summary>
/// Handle to the icon that represents the file. You are responsible for
/// destroying this handle with DestroyIcon when you no longer need it.
/// </summary>
public nint hIcon;
/// <summary>
/// Index of the icon image within the system image list.
/// </summary>
public nint iIcon;
/// <summary>
/// Array of values that indicates the attributes of the file object.
/// For information about these values, see the IShellFolder::GetAttributesOf
/// method.
/// </summary>
public uint dwAttributes;
/// <summary>
/// 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.
/// </summary>
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
public string szDisplayName;
/// <summary>
/// String that describes the type of file.
/// </summary>
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)]
public string szTypeName;
}