 |
|
 |
dear all
if some one knows a source code for HTTP monitor in remote computer that can monitor activities such as: Traffic, Open and Close, and URLs.
my best regards
|
|
|
|
 |
|
 |
using this code i was faced this Exception
System.OutOfMemoryException: Retrieving the COM class factory for component with CLSID {9BA05972-F6A8-11CF-A442-00A0C90A8F39} failed due to the following error: 8007000e.
please if you have any solution regarding such exception please forword it
thanks
Rizwan
|
|
|
|
 |
|
 |
Hi Same problem here,
did u find any solution for this problem
|
|
|
|
 |
|
 |
Awesome stuff! I really love this. I just need to figure out how to make this work with tabs. Apparently, the shellWindows_WindowRegistered function isn't called when a new tab is opened, only when a new window is opened. However, I can't seem to find a way to get the handle to a new tab that is opened (or even the event that fires when a new tab is opened).
Do you have an suggestions or a direction to point me in? Or do you happen to know how to do it already? Is there another library to use?
|
|
|
|
 |
|
 |
hi,
have u work on it ? and tell me is it working on IE 7 Tabs
please help me ragrding this scenerio
Rizwan
|
|
|
|
 |
|
 |
Hi, nice work!
You said you used this application in a Windows Service.
How?
Many thanks
|
|
|
|
 |
|
 |
Hi,
I 'm new in C# and I have a question: Can this be used to monitor all application ?
For example when user open other application with double click ?
|
|
|
|
 |
|
 |
Work's in Internet Explorer 7, with Tabs?
|
|
|
|
 |
|
 |
Will it work with IE Protected Mode on Vista??
In IE Protected Mode on Vista, BeforeNavigate2 event are being fired by a different instance and so it may not work.
Any idea?
|
|
|
|
 |
|
|
 |
|
 |
Very nice article thank you .
Maybe someone can suggest me how to detect if this IE windows is a popup window?
|
|
|
|
 |
|
 |
Hi,
First of all thanks for that helpful topic. is there a way to handle the other browsers, like opera or Netscape? Thanks.
Kind Regards,
Allen
|
|
|
|
 |
|
 |
Hi .
Ir was a great article indeed. But when running the program i realised that it does not capture very long urls. i.e the code does not print once captured a long url. the smaller urls captured then by the sme browser are not printed
|
|
|
|
 |
|
 |
When I ported your code to a windows service,I got an exception at "shellWindows=new SHDocVw.ShellWindowsClass();".How did you slove this problem?
|
|
|
|
 |
|
 |
Same Problem! No solution?
|
|
|
|
 |
|
 |
Hi
I would like to add this code into a dll. Made a class library and used the code as given by you.Every instance of an ie does call window registered but it doesnt get into the for loop i.e
foreach (SHDocVw.InternetExplorer ie in shellWindows)
Could u please advise the reason behind this.
|
|
|
|
 |
|
 |
very nice, based on you code I created a class to watch IE activity..
it works fine, but..
when I atached it to my application (a windows service) it throws either "Not enough storage is available to complete this operation" or that coudn't load the dll..
|
|
|
|
 |
|
 |
BTW here's the class:
using System;
using System.Collections;
using System.IO;
namespace IEWatch
{
class IEWatch
{
// Definition of the delegates
public delegate void openEventHandler(string id);
public delegate void closeEventHandler(string id);
public delegate void navigateEventHandler(string id,string address);
// Events to subscribe
public openEventHandler open=null;
public closeEventHandler close=null;
public navigateEventHandler navigate=null;
private SHDocVw.InternetExplorer browser;
private SHDocVw.ShellWindows shellWindows;
private ArrayList Current_IE_Handles;
public IEWatch()
{
Current_IE_Handles=new ArrayList();
shellWindows=new SHDocVw.ShellWindowsClass();
shellWindows.WindowRegistered+=new SHDocVw.DShellWindowsEvents_WindowRegisteredEventHandler(shellWindows_WindowRegistered);
shellWindows.WindowRevoked+=new SHDocVw.DShellWindowsEvents_WindowRevokedEventHandler(shellWindows_WindowRevoked);
}
// THIS EVENT IS FIRED WHEN THE BROWSER IS JUST ABOUT THE NAVIGATE TO A WEBSITE
private void browser_BeforeNavigate2(object a,ref object b,ref object c,ref object d,ref object e,ref object f,ref bool g)
{
if (navigate!=null)
navigate(browser.HWND.ToString(),b.ToString());
}
// THIS EVENT IS FIRED WHEN THE A NEW BROWSER IS CLOSED
private void shellWindows_WindowRevoked(int z)
{
string filnam;
ArrayList Closed_IE=new ArrayList();
foreach (SHDocVw.InternetExplorer ie in shellWindows)
{
filnam = Path.GetFileNameWithoutExtension(ie.FullName).ToLower();
if (filnam.Equals("iexplore"))
{
Closed_IE.Add(ie.HWND.ToString());
}
}
for (int i=0; i |
|
|
|
 |
|
 |
your code is good but should be more better , there are few corrections
when we open an IE, your application can not read homepage
when a new secound window is open and closed your application can not read the IE navigation
nextclick
arun varma
|
|
|
|
 |
|
 |
Thanx, i am looking into this matter
Final Year Student
BS(Computer Science)
FAST (Karachi Campus)
Microsoft Certified Application Developer
alirazashaikh.blogspot.com
www.programmersparadise.cjb.net
|
|
|
|
 |
|
 |
Have you done it?It seems the Program can only get Url from the 1st tab,how could it get the others?i need the code badly,thank u~
|
|
|
|
 |
|
 |
Whan I use more than one window of IE and I navigate in every window, then the application says that the URL come form the last window opened...
|
|
|
|
 |
|
 |
Hello
Sorry for a bit late, some peoples are facing this problem, i am looking after this matter
Final Year Student
BS(Computer Science)
FAST (Karachi Campus)
Microsoft Certified Application Developer
alirazashaikh.blogspot.com
www.programmersparadise.cjb.net
|
|
|
|
 |
|
 |
I made in this way
1. created class which holds browser object
public class BrowserClass
{
private SHDocVw.InternetExplorer browser;
public void browser_BeforeNavigate2(object a, ref object b, ref object c, ref object d, ref object e, ref object f, ref bool g)
{
//whatever.... now we know which handle browser.HWND.ToString()
}
public SHDocVw.InternetExplorer Browser
{
get
{
return browser;
}
set
{
browser = value;
}
}
}
and now we need to change little bit in ActivityMonitor.shellWindows_WindowRegistered()
...
BrowserClass bc = new BrowserClass();
bc.Browser = browser;
browser.BeforeNavigate2+=new SHDocVw.DWebBrowserEvents2_BeforeNavigate2EventHandler(bc.browser_BeforeNavigate2);
...
|
|
|
|
 |
|
 |
This is my vb solution when more than one window of IE is opened:
Private Sub shellWindows_WindowRegistered(ByVal num1 As Integer)
Dim explorer1 As SHDocVw.InternetExplorer
Dim browser As SHDocVw.InternetExplorer = Nothing
For Each explorer1 In shellWindows
browser = explorer1
Next
Dim id As String
id = browser.HWND.ToString
Dim conta_id_shell As Integer = 0
For Each explorer1 In shellWindows
If id = explorer1.HWND.ToString Then
conta_id_shell = conta_id_shell + 1
End If
Next
Dim conta_id_array As Integer = 0
Dim num2 As Integer
For num2 = 0 To Me.Current_IE_Handles.Count - 1
If Me.Current_IE_Handles.Item(num2).ToString = id Then
conta_id_array = conta_id_array + 1
End If
Next num2
If conta_id_shell > conta_id_array Then
Me.Current_IE_Handles.Add(id)
AddHandler browser.BeforeNavigate2, AddressOf browser_BeforeNavigate2
End If
End Sub
|
|
|
|
 |