public static string GetDisplayNameOf(this IShellFolder folder, IdList pidl, SHGDNF uFlags) { //StrRet value; StrRetNative value; int hr = folder._GetDisplayNameOf(pidl, uFlags, out value); if (hr != ShellConsts.S_OK) { Marshal.ThrowExceptionForHR(hr); } return(new StrRet(value).GetValue(pidl)); }