Пример #1
0
        int IComparer.Compare(object a, object b)
        {
            STATURL c1 = (STATURL)a;
            STATURL c2 = (STATURL)b;

            return(CompareFileTime(ref c1.ftLastVisited, ref c2.ftLastVisited));
        }
Пример #2
0
 //Advances the enumerator to the next item of the url history cache.
 /// <summary>
 /// Advances the enumerator to the next item of the url history cache.
 /// </summary>
 /// <returns>true if the enumerator was successfully advanced to the next element;
 ///  false if the enumerator has passed the end of the url history cache.
 ///  </returns>
 public bool MoveNext()
 {
     staturl = new STATURL();
     enumrator.Next(1, ref staturl, out index);
     if (index == 0)
         return false;
     else
         return true;
 }
Пример #3
0
            /// <summary>
            ///Enumerate the items in the history cache and store them in the IList object.
            /// </summary>
            /// <param name="list">IList object
            /// <example><c>ArrayList</c>object</example>
            /// </param>
            public void GetUrlHistory(IList list)
            {

                while (true)
                {
                    staturl = new STATURL();
                    enumrator.Next(1, ref staturl, out index);
                    if (index == 0)
                        break;
                    list.Add(staturl);

                }
                enumrator.Reset();

            }
Пример #4
0
        /// <summary>
        ///Queries the history and reports whether the URL passed as the pocsUrl parameter has been visited by the current user. 
        /// </summary>
        /// <param name="pocsUrl">the string of the URL to querythe string of the URL to query.</param>
        /// <param name="dwFlags">STATURL_QUERYFLAGS Enumeration
        /// <example><c>STATURL_QUERYFLAGS.STATURL_QUERYFLAG_TOPLEVEL</c></example></param>
        /// <returns>Returns STATURL structure that received additional URL history information. If the returned  STATURL's pwcsUrl is not null, Queried URL has been visited by the current user.
        /// </returns>
        public STATURL QueryUrl(string pocsUrl, STATURL_QUERYFLAGS dwFlags)
        {

            STATURL lpSTATURL = new STATURL();

            try
            {
                //In this case, queried URL has been visited by the current user.
                obj.QueryUrl(pocsUrl, dwFlags, ref lpSTATURL);
                //lpSTATURL.pwcsUrl is NOT null;
                return lpSTATURL;
            }
            catch (FileNotFoundException)
            {
                //Queried URL has not been visited by the current user.
                //lpSTATURL.pwcsUrl is set to null;
                return lpSTATURL;
            }

        }