GetParent() public method

public GetParent ( IShellItem &ppsi ) : HResult
ppsi IShellItem
return HResult
Example #1
0
        public int Compare(IShellItem psi, SICHINT hint)
        {
            ShellItemImpl other       = (ShellItemImpl)psi;
            ShellItemImpl myParent    = GetParent();
            ShellItemImpl theirParent = other.GetParent();

            if (Shell32.ILIsEqual(myParent.m_Pidl, theirParent.m_Pidl))
            {
                return(myParent.GetIShellFolder().CompareIDs((SHCIDS)hint,
                                                             Shell32.ILFindLastID(m_Pidl),
                                                             Shell32.ILFindLastID(other.m_Pidl)));
            }
            else
            {
                return(1);
            }
        }