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