Click to See Complete Forum and Search --> : Creating Events hook in IE 6


flynny1st
July 10th, 2007, 07:23 AM
Hi,

I want to add a couple of buttons to an ie window using and events hook. If i just run my program it launches ie and creates a events hook for the newly opened ie and then quits for some reason.

However if i use my program with an already open ie window (the computer is running ie 6 and running server 2003) the program will add my buttons. these appear, however, nothing will then work and the program crashes with the error.

---------------------------
IEXPLORE.EXE - Application Error
---------------------------
The instruction at "0x01eb102d" referenced memory at "0x01eb102d". The memory could not be "written".

My program works in the following way.

it launches the ie window.

it then sits and waits for the correct window to be opened etc. it looks for this on a WM_WINDOWPOSCHANGING event. (it wasWM_CREATE howeevr i want this to also work on ie7 and so WM_CREATE is not called when a new tab is created)

When the correct window is found it adds the buttons and a mouse hook associated with them.

From creating log files and printing out information the program appears to not be accessing my callback method, however as i mentioned above the buttons appear (although the program then crashes) under those set circumstances.

Any ideas?

Many Thanks
matt.