Пример #1
0
 /// <summary>
 /// ���� PIDL ��ȡ��ʾ����
 /// </summary>
 public static string GetNameByPIDL(IntPtr pidl)
 {
     SHFILEINFO info = new SHFILEINFO();
     ShellAPI.SHGetFileInfo(pidl, 0, ref info, Marshal.SizeOf(typeof(SHFILEINFO)),
         SHGFI.PIDL | SHGFI.DISPLAYNAME | SHGFI.TYPENAME);
     return info.szDisplayName;
 }
Пример #2
0
 public static extern IntPtr SHGetFileInfo(
     IntPtr ppidl,
     FILE_ATTRIBUTE dwFileAttributes,
     ref SHFILEINFO sfi,
     int cbFileInfo,
     SHGFI uFlags);