-
Notifications
You must be signed in to change notification settings - Fork 1
/
Shell32.cs
48 lines (46 loc) · 1.45 KB
/
Shell32.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System;
using System.Runtime.InteropServices;
using System.ComponentModel;
namespace RAD.Windows.WIN32API.Shell32
{
/// <summary>
/// API Declarations for the Windows Shell32 library
/// </summary>
public class Shell32
{
public const int MAX_PATH = 260;
[StructLayout(LayoutKind.Sequential)]
protected struct structSHFILEINFO
{
/// <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 IntPtr hIcon;
/// <summary>
/// Index of the icon image within the system image list.
/// </summary>
public Int16 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 int 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=MAX_PATH)]
public string szDisplayName;
/// <summary>
/// String that describes the type of file.
/// </summary>
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=80)]
public string szTypeName;
}
}
}