¡@

Home 

c# Programming Glossary: shfileinfo

Get file type in .NET

http://stackoverflow.com/questions/1437382/get-file-type-in-net

LayoutKind.Sequential CharSet CharSet.Auto public struct SHFILEINFO public IntPtr hIcon public int iIcon public uint dwAttributes..

How to get the actual (localized) folder names?

http://stackoverflow.com/questions/5145394/how-to-get-the-actual-localized-folder-names

IntPtr.Zero 0 out pidl if hr.IsFailure return null SHFILEINFO shfi if 0 SHGetFileInfo pidl FILE_ATTRIBUTE_NORMAL out shfi.. out shfi uint Marshal.SizeOf typeof SHFILEINFO SHGFI_PIDL SHGFI_DISPLAYNAME return shfi.szDisplayName return.. pidl public static string GetDisplayName string path SHFILEINFO shfi if 0 SHGetFileInfo path FILE_ATTRIBUTE_NORMAL out shfi..