Exemplo n.º 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;
 }
Exemplo n.º 2
0
 public static extern IntPtr SHGetFileInfo(
     IntPtr ppidl,
     FILE_ATTRIBUTE dwFileAttributes,
     ref SHFILEINFO sfi,
     int cbFileInfo,
     SHGFI uFlags);