private CONFIRM_CONFLICT_ITEM _CreateConflictItemUsingSHItem(IntPtr shItem, string altName)
        {
            CONFIRM_CONFLICT_ITEM item = new CONFIRM_CONFLICT_ITEM();

            item.pShellItem2      = shItem;
            item.pszAlternateName = altName;

            return(item);
        }
        /**
         * InitializeWithFileSystemPath: Initialize ConflictDialogItem using 'CONFIRM_CONFLICT_ITEM' (for advanced).
         * @param sourceItem: source CONFIRM_CONFLICT_ITEM.
         * @param targetItem: target CONFIRM_CONFLICT_ITEM.
         */
        public bool InitializeWithCustomConflictInfo(ref CONFIRM_CONFLICT_ITEM sourceItem, ref CONFIRM_CONFLICT_ITEM targetItem)
        {
            _Reset();

            this._items.Add(sourceItem);
            this._items.Add(targetItem);

            return(true);
        }
        public int GetItem(int iIndex, ref CONFIRM_CONFLICT_ITEM_INT pItemInfo)
        {
            if (iIndex >= this._items.Count)
            {
                return(-2147467259); //E_FAIL
            }

            CONFIRM_CONFLICT_ITEM item = this._items[iIndex];

            pItemInfo.nType       = item.nType;
            pItemInfo.pShellItem2 = item.pShellItem2;
            Marshal.AddRef(pItemInfo.pShellItem2);

            if (!string.IsNullOrEmpty(item.pszAlternateName))
            {
                pItemInfo.pszAlternateName = Marshal.StringToCoTaskMemUni(item.pszAlternateName);
            }
            else
            {
                pItemInfo.pszAlternateName = IntPtr.Zero;
            }

            if (!string.IsNullOrEmpty(item.pszLocationFull))
            {
                pItemInfo.pszLocationFull = Marshal.StringToCoTaskMemUni(item.pszLocationFull);
            }
            else
            {
                pItemInfo.pszLocationFull = IntPtr.Zero;
            }

            if (!string.IsNullOrEmpty(item.pszLocationShort))
            {
                pItemInfo.pszLocationShort = Marshal.StringToCoTaskMemUni(item.pszLocationShort);
            }
            else
            {
                pItemInfo.pszLocationShort = IntPtr.Zero;
            }

            if (!string.IsNullOrEmpty(item.pszOriginalName))
            {
                pItemInfo.pszOriginalName = Marshal.StringToCoTaskMemUni(item.pszOriginalName);
            }
            else
            {
                pItemInfo.pszOriginalName = IntPtr.Zero;
            }

            return(0);
        }