Ejemplo n.º 1
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 Win32api.SortFileTimeAscendingHelper.STATURL QueryUrl(string pocsUrl , Win32api.SortFileTimeAscendingHelper.STATURL_QUERYFLAGS dwFlags)
		{
			
			var lpSTATURL = new Win32api.SortFileTimeAscendingHelper.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;
			}
			
		}
Ejemplo n.º 2
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 Win32api.SortFileTimeAscendingHelper.STATURL();
					enumrator.Next(1, ref staturl, out index);	
					if(index == 0)
						break;
					list.Add(staturl);
				
				}
				enumrator.Reset();
			
			}
Ejemplo n.º 3
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 Win32api.SortFileTimeAscendingHelper.STATURL();
				enumrator.Next(1, ref staturl, out index);	
				if(index == 0)
					return false;
				else
					return true;
			}