Table of Contents

Class IconHelper

Namespace
HeBianGu.Systems.WinTool
Assembly
HeBianGu.Systems.WinTool.dll

获取文件关联图标

public class IconHelper
Inheritance
IconHelper
Inherited Members
Extension Methods

Properties

Instance

创建指定对象的单例实例

public static IconHelper Instance { get; }

Property Value

IconHelper

Methods

GetDirectoryIcon()

获取文件夹图标

public Icon GetDirectoryIcon()

Returns

Icon

GetFileIcon(string)

获取文件图标

public Icon GetFileIcon(string p_Path)

Parameters

p_Path string

Returns

Icon

GetSystemInfoIcon(string)

获取系统图标

public Icon GetSystemInfoIcon(string p_Path)

Parameters

p_Path string

Returns

Icon

SHGetFileInfo(string, uint, ref SHFILEINFO, uint, uint)

返回系统设置的图标

public static extern nint SHGetFileInfo(string pszPath, uint dwFileAttributes, ref SHFILEINFO psfi, uint cbSizeFileInfo, uint uFlags)

Parameters

pszPath string

文件路径 如果为"" 返回文件夹的

dwFileAttributes uint

0

psfi SHFILEINFO

结构体

cbSizeFileInfo uint

结构体大小

uFlags uint

枚举类型

Returns

nint

-1失败