Public Declare Auto Function SHGetFileInfo Lib "shell32.dll" (ByVal pszPath As String, ByVal dwFileAttributes As Integer, ByRef psfi As SHFILEINFO, ByVal cbFileInfo As Integer, ByVal uFlags As Integer) As IntPtr ' declare some constants that SHGetFileInfo requires Public Const SHGFI_ICON = &H100 Public Const SHGFI_SMALLICON = &H1 Public Const SHGFI_LARGEICON = &H0 ' Large icon Public Const SHGFI_USEFILEATTRIBUTES = &H10 Public Const FILE_ATTRIBUTE_DIRECTORY = &H10 Public Const FILE_ATTRIBUTE_NORMAL = &H80 ' define the SHFILEINFO structure Structure SHFILEINFO Public hIcon As IntPtr Public iIcon As Integer Public dwAttributes As Integer <Runtime.InteropServices.MarshalAs(Runtime.InteropServices.UnmanagedType.ByValTStr, SizeConst:=260)> Public szDisplayName As String <Runtime.InteropServices.MarshalAs(Runtime.InteropServices.UnmanagedType.ByValTStr, SizeConst:=80)> Public szTypeName As String End Structure
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)