 |
|
 |
Hi goblins,
I'm trying to use this dll in a win 8 app,when I debugging the app, an exception thrown like below:
An exception of type 'System.Runtime.InteropServices.COMException' occurred in UrlHistoryLibrary.DLL but was not handled in user code
Additional information: Creating an instance of the COM component with CLSID {3C374A40-BAE4-11CF-BF7D-00AA006946EE} using CoCreateInstanceFromApp failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)). Please make sure your COM object is in the allowed list of CoCreateInstanceFromApp.
Thanks in advance, any response is helpful.
|
|
|
|
 |
|
 |
Hi RickWang2012, The demo project of 'The Tiny Wrapper Class for URL History Interface in C#' is the Windows desktop mode application, not the metro style application. The dll can not be used in a win 8 metro style application. The demo project is set to build as .Net 4.5 when it is opened with Visual Studio 11 Beta. It can be built and run correctly (at least on my emviroment) as the Windows 8 desktop mode application. I tried the demo project in the following system emviroment: Windows 8 Consumer Preview 64-bit English, Visual Studio 11 Beta.
-- modified 13 Apr '12.
|
|
|
|
 |
|
 |
Got it, thanks for your quickly response.
|
|
|
|
 |
|
 |
Hello, It nice but work only with IE. It will not work with other browser like Mozilla or Opera etc. How to make it better so that it will work for all types of browser? Regards, Navin
|
|
|
|
 |
|
 |
Hi I'm Sullydude! Ok so I've been following your tut and found this: ".DeleteHistoryEntry." I'm trying to understand is this:
url.DeleteHistoryEntry("http://www.facebook.com" + letters.Any() + "/" + letters.Any(), 1); As you can see I'm "attempting" to to delete a unknown url from facebook history. but the only problem I seem to be having is its not detecting whole words. so for instance
the url is super long so I would like to delete the entire chain of characters by detecting if there's any text in the url. so for instance: url.DeleteHistoryEntry("http://www.facebook.com" + YOU + ARE + HERE + "/" + RANDOM, 1); I would really like to delete the You, Are, Here, Random, without knowing what word or character they are. I'm trying to explain as best I can so sorry for any misunderstanding. I'm trying to accomplish this with this string[] string[] letters = new string[] { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "`", "~", "!", "@", "#", "4", "%", "^", "&", "*", "(", ")", "{", "}", ":", ";", "'", "\"", ",", ">", "," , ".", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "\\", "/", "?"}; PLEASE HELP! Thank you in advance - Sullydude
|
|
|
|
 |
|
 |
Hi,Sullydude DeleteHistoryEntry method is supposed to delete the specified URL from the history. It just calling the following method. [ComImport] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [Guid("3C374A41-BAE4-11CF-BF7D-00AA006946EE")] public interface IUrlHistoryStg { void DeleteUrl(string pocsUrl, int dwFlags); } The problem is DeleteUrl() Does Not Delete the Internet Explorer History Folder Entry. It does not depend on what word or character the url contains. So, to resolve the problem, following link might help. http://support.microsoft.com/kb/327569 Regards
|
|
|
|
 |
|
|
 |
|
 |
Hi, theodolite I have no idea. regards. goblins
|
|
|
|
 |
|
 |
Hiii
as per this class we got an arraylist in return which contains the history but i need to send it to another pc and I am using wcf so i have to convert that into memorystream but I could not be able to do that...
can somebody please tell me how to do that...
i have tried this method but it didnt work
ArrayList history = ie.getHistory();
BinaryFormatter f = new BinaryFormatter();
MemoryStream ms = new MemoryStream();
f.Serialize(ms, history);
thanks...
|
|
|
|
 |
|
 |
Hi, To send url history to another pc by using WCF. the data sent by wire must be DataContract or serializable. Unfortunately STATURL is not serializable. WCF Service are platform-agnostic. DataContract may be preferred way. I created UrlEntry structure which is DataContract and Service Contrat as folows. [DataContract] public struct UrlEntry { [DataMember] public string URL { get; set; } [DataMember] public string Title { get; set; } [DataMember] public DateTime LastVisited { get; set; } [DataMember] public DateTime LastUpdated { get; set; } [DataMember] public DateTime Expires { get; set; } } [ServiceContract] public interface IUrlHistoryService { [OperationContract] List<UrlEntry> GetData(); } The implimentation of the GetData method is similar the GetHistoryItems method in this article's demo project. public class UrlHistoryService : IUrlHistoryService { public List<UrlEntry> GetData() { List<UrlEntry> entries = new List<UrlEntry>(); UrlHistoryWrapperClass urlHistory = new UrlHistoryWrapperClass(); UrlHistoryWrapperClass.STATURLEnumerator enumerator = urlHistory.GetEnumerator(); while (enumerator.MoveNext()) { STATURL staturl = enumerator.Current; entries.Add(new UrlEntry { Title = staturl.Title, URL = staturl.URL, LastUpdated = staturl.LastUpdated, LastVisited = staturl.LastVisited, Expires = staturl.Expires }); } enumerator.Reset(); return entries.OrderByDescending(i => i.LastVisited).ToList(); } } By the way, UrlHistoryService must be run as the logged-on user, so please note that You can't get history in window service because Windows Service applications run in a different window station than the interactive station of the logged-on user. Hope this helps.
-- Modified Tuesday, September 13, 2011 8:08 AM
|
|
|
|
 |
|
 |
heyy thankyou for your reply but it has some problem.
I call from server and it return a list but when i tried to show it on datagridview is only show's the titles not any data...
what could b the problem..?? (
modified on Sunday, September 11, 2011 4:18 PM
|
|
|
|
 |
|
 |
Sorry for the late reply. I amended the source code on my previous post. There are two places to correct. UrlEntry structure's property 'Url' shoud be 'URL'
In the UrlHistoryService's GetData() method, 'Url = staturl.URL,' should be 'URL = staturl.URL,' After that, on the serverside, Rebuild the wcf service. Next, on the client side, Update service reference and rebuild the client application. Don't forget Update service reference. that update the client proxy. Regards. goblins
|
|
|
|
 |
|
 |
provide complete code ...
why do u tease some one if you dont have to provide complete code..
then sale it some where else....
|
|
|
|
 |
|
 |
You need to compile the library it is in the other folder just open it and compile you will get the UrkHistoryLibrary.dll
You have an apology to make to the owner of the code you dum _ss Hope it helped
|
|
|
|
 |
|
 |
Hi goblin,
Thanks for you write up, it's great. Does this tiny wrapper class log only IE browsing history or does it log all browser history used by a computer?
|
|
|
|
 |
|
 |
The tiny wrapper class log only IE browsing history.
|
|
|
|
 |
|
 |
Do you know if it's possible to log other browser's as well or is the c# code specifically will only log IE and not other browsers? Can you point me in the right direction if you have any ideas in trying to log other browsers as well.
Thank you,
|
|
|
|
 |
|
 |
Hi, I don't know how to do that. But the following link might help. http://hardcodedblog.blogspot.com/2009/10/obtaining-browser-visited-url-history.html
|
|
|
|
 |
|
 |
Hi
I am having problems with uploading my application to the server. It is working fine on my local machine but once I upload it I get this error:
[COMException (0x80072ee4): חריג מ- HRESULT: 0x80072EE4]
UrlHistoryLibrary.IEnumSTATURL.Next(Int32 celt, STATURL& rgelt, Int32& pceltFetched) +0
UrlHistoryLibrary.STATURLEnumerator.GetUrlHistory(IList list) +70
If someone can help with this is will be great!
Thanks,
Eyal
|
|
|
|
 |
|
 |
Hi, eyal
Thanks for reading.
By using this library, you can only query the history of the currently logged-on user in the server.
The COMException (0x80072ee4) you are referring to is thrown if you upload your application (WCF servervice, WebService, .NET Remoting and ASP.NET and so on) which is hosted on IIS.
In My Humble Opinion, the error should be caused by the ASP.NET process identity. When the web application hosted in Visual Studio build-in development server, the process identity is current Windows login account. However, after publishing it to IIS, the default application pool’s process identity is “Network Service”. It is a less-privileged account which can cause the permission related issues.
I might be wrong, but the following link might help.
http://msdn.microsoft.com/en-us/library/ff647402.aspx
|
|
|
|
 |
|
 |
First of all - goblins, thank you very much for this code. It is great and helped me a lot!!!
My problem was that the history came out in random order and not by the time the user visited each one of the urls.
I fixed a short code to solve this and I want to share it. So here it is:
Two classes:
public class HistoryURL
{
private string sURL;
private string sTitle;
private DateTime dLastVisit;
public string URL
{
get { return sURL; }
}
public string Title
{
get { return sTitle; }
}
public DateTime LastVisit
{
get { return dLastVisit; }
}
public HistoryURL(string url, string title, DateTime time)
{
sURL = url;
sTitle = title;
dLastVisit = time;
}
}
public class HistoryCollection
{
private List<HistoryURL> lHistoryURLs;
public List<HistoryURL> HistoryURLs
{
get { return lHistoryURLs; }
}
public HistoryCollection()
{
lHistoryURLs = new List<HistoryURL> { };
}
public void AddURL(HistoryURL hURL)
{
lHistoryURLs.Add(hURL);
}
private static int CompareURLsByDateTime(HistoryURL a, HistoryURL b)
{
if (a == null)
{
if (b == null)
{
return 0;
}
else
{
return -1;
}
}
else
{
if (b == null)
{
return 1;
}
else
{
int retval = b.LastVisit.CompareTo(a.LastVisit);
if (retval != 0)
{
return retval;
}
else
{
return b.LastVisit.CompareTo(a.LastVisit);
}
}
}
}
public void Sort()
{
lHistoryURLs.Sort(CompareURLsByDateTime);
}
}
In action:
HistoryCollection hCollection = new HistoryCollection();
HistoryURL hURL;
hURL = new HistoryURL(STATURL.URL, STATURL.Title, STATURL.LastVisited);
hCollection.AddURL(hURL);
hCollection.Sort();
(this will sort the urls when the recent visited is first)
I hope it will help someone...
Eyal
|
|
|
|
 |
|
 |
i would like to be able to query the history of every profile in the server? is it possible? let me know thanks.
|
|
|
|
 |
|
 |
Sorry I kept you waiting so long for an answer.
The library is the C# equivalence of the IURLHistory interface in the MSDN document.
IUrlHistoryStg interface manages the Windows Internet Explorer history for the current user.
By using this library, you can only query the history of the currently logged-on user in the server.
It is not possible to query the history of every profile in the server.
Thanks.
|
|
|
|
 |
|
 |
HI
I need help for Browser History project,
See the below code I created a window service, every think is working fine but not getting any history from cache , when I run exe file I see all browser history in datagrid any idea why i can't get history in window service ?
using UrlHistory.Library;
partial class BrowserHistory : ServiceBase
{
private Timer timer = new Timer();
private UrlHistoryWrapperClass.STATURLEnumerator enumerator;
private UrlHistoryWrapperClass urlHistory;
private ArrayList list;
public BrowserHistory()
{
InitializeComponent();
//string txt = _client.Messages(message).ReturnMessage;
}
protected override void OnStart(string[] args)
{
System.Diagnostics.Debugger.Break();
urlHistory = new UrlHistoryWrapperClass();
enumerator = urlHistory.GetEnumerator();
list = new ArrayList();
//timer.Elapsed += new ElapsedEventHandler(OnElapsedTime);
// TODO: Add code here to start your service.
//BrowserHistoryContractClient _client = new BrowserHistoryContractClient();
//BrowserHistoryMessage message = new BrowserHistoryMessage();
//message.OutMessage = "shakeel";
//timer.Interval = 200000;
////ad 3: enabling the timer
//timer.Enabled = true;
GetHistoryItems();
}
void GetHistoryItems()
{
list.Clear();
list.TrimToSize();
while (enumerator.MoveNext())
{
list.Add(enumerator.Current);
}
enumerator.Reset();
//enumerator.GetUrlHistory(list);
if (list.Count != 0)
list.Sort(SortFileTimeAscendingHelper.SortFileTimeAscending());
}
modified on Monday, July 6, 2009 2:40 AM
|
|
|
|
 |
|
 |
Hello,
You can't get history in window service because Windows Service applications run in a different window station than the interactive station of the logged-on user.
The Windows Service classes supported by the .NET Framework do not support interaction with the logged-on user. If your Windows Service must interact with other stations, you will need to access the unmanaged Windows API.
I have never used that unmanaged Windows API ("Window Stations" API) in my programs, so I do not know how to get workaround this problem.
For more information, please refer to the following link.
Introduction to Windows Service Applications
Best regards
|
|
|
|
 |