[Solved] Getting folder icon path
here is the function that i wanted: string getIconPath(string folderPath) { SHFILEINFO shinfo = new SHFILEINFO(); Win32.SHGetFileInfo(folderPath, 0, ref shinfo, (uint)Marshal.SizeOf(shinfo), (int)0x1000); return shinfo.szDisplayName } and here are the SHFILEINFO struct and Win32 class implementations: [StructLayout(LayoutKind.Sequential)] public struct SHFILEINFO { public IntPtr hIcon; public int iIcon; public uint dwAttributes; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)] public string … Read more