/// <summary>
        /// Creates a new item enumeration object with the same contents and state as the current one.
        /// </summary>
        /// <param name="ppenum">Address of a pointer to the new enumeration object. The calling application must
        /// eventually free the new object by calling its Release member function.</param>
        public int Clone(out IEnumIDList ppenum)
        {
            //  Create a brand new enumerator, pointing at the same object
            //  and move it's index to the same position.
            ppenum = new ShellNamespaceFolderIdListEnumerator(shellNamespaceFolder, flags, currentIndex);

            //  We're done.
            return(WinError.S_OK);
        }
コード例 #2
0
        /// <summary>
        /// Creates a new item enumeration object with the same contents and state as the current one.
        /// </summary>
        /// <param name="ppenum">Address of a pointer to the new enumeration object. The calling application must
        /// eventually free the new object by calling its Release member function.</param>
        public int Clone(out IEnumIDList ppenum)
        {
            //  Create a brand new enumerator, pointing at the same object
            //  and move it's index to the same position.
            ppenum = new ShellNamespaceFolderIdListEnumerator(shellNamespaceFolder, flags, currentIndex);

            //  We're done.
            return WinError.S_OK;
        }
コード例 #3
0
        /// <summary>
        /// Allows a client to determine the contents of a folder by creating an item identifier enumeration object and returning its IEnumIDList interface.
        /// Return value: error code, if any
        /// </summary>
        /// <param name="hwnd">If user input is required to perform the enumeration, this window handle should be used by the enumeration object as the parent window to take user input.</param>
        /// <param name="grfFlags">Flags indicating which items to include in the  enumeration. For a list of possible values, see the SHCONTF enum.</param>
        /// <param name="ppenumIDList">Address that receives a pointer to the IEnumIDList interface of the enumeration object created by this method.</param>
        /// <returns>
        /// If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
        /// </returns>
        /// <exception cref="System.NotImplementedException"></exception>
        int IShellFolder.EnumObjects(IntPtr hwnd, SHCONTF grfFlags, out IEnumIDList ppenumIDList)
        {
            //  Create an object that will enumerate the contents of this shell folder (that implements
            //  IEnumIdList). This can be returned to the shell.
            ppenumIDList = new ShellNamespaceFolderIdListEnumerator(proxyFolder, grfFlags, 0);

            //  TODO we should also store the window handle for user interaction.

            //  We're done.
            return(WinError.S_OK);
        }
コード例 #4
0
        /// <summary>
        /// Allows a client to determine the contents of a folder by creating an item identifier enumeration object and returning its IEnumIDList interface.
        /// Return value: error code, if any
        /// </summary>
        /// <param name="hwnd">If user input is required to perform the enumeration, this window handle should be used by the enumeration object as the parent window to take user input.</param>
        /// <param name="grfFlags">Flags indicating which items to include in the  enumeration. For a list of possible values, see the SHCONTF enum.</param>
        /// <param name="ppenumIDList">Address that receives a pointer to the IEnumIDList interface of the enumeration object created by this method.</param>
        /// <returns>
        /// If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
        /// </returns>
        /// <exception cref="System.NotImplementedException"></exception>
        int IShellFolder.EnumObjects(IntPtr hwnd, SHCONTF grfFlags, out IEnumIDList ppenumIDList)
        {
            //  Create an object that will enumerate the contents of this shell folder (that implements
            //  IEnumIdList). This can be returned to the shell.
            ppenumIDList = new ShellNamespaceFolderIdListEnumerator(proxyFolder, grfFlags, 0);

            //  TODO we should also store the window handle for user interaction.

            //  We're done.
            return WinError.S_OK;
        }