[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Detecting Internet Explorer Events and Reading Properties...

Posted on 2002-04-05
8
Medium Priority
?
394 Views
Last Modified: 2007-12-19
Using Visual C++, I need help simply detecting a few IE events (NewWindow2, BeforeNavigate2, OnVisible), retrieving a few property values (LocationURL, etc) and calling a couple of methods (Navigate2, Refresh2, Stop, Quit).

I am very familiar with VB and OnEvents, however have no idea how to capture this info in VC++.

I am not looking to include a browser within my app, but retrieve the above info on any instance of IE running on the machine.

I am willing to allocate many more points for an actual VC++ project created that will simply do the above (maybe a messagebox on the events) and emailed to the email account I created just for this: Adrenaline__X@hotmail.com
(Note that there are two underscores in the email addy)

Thanks in advance for the assistance.
Aristippus
0
Comment
Question by:Aristippus
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 49

Expert Comment

by:DanRollins
ID: 6920425
It is spelled out here, including plenty of sample code!

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q176792

-- Dan
0
 
LVL 49

Accepted Solution

by:
DanRollins earned 1200 total points
ID: 6920428
0
 
LVL 1

Author Comment

by:Aristippus
ID: 6921744
DanRollins,

Your first link is one that I have already tried, and it does allow me to "Connect to a Running Instance of Internet Explorer (Q176792)" just as it states. And I can also detect WindowRegistered and WindowRevoked events, but not the events that I wanted (NewWindow2, BeforeNavigate2, etc.)

The second link appear entirely viable (except I was hoping to not have to create the app as a dll and register it) but my VC++ are lacking and I can't get a functional sample from the code given.

Again, if someone were willing to create a working project and email it to the addy above I would be willing to increase the points substantially.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 1

Author Comment

by:Aristippus
ID: 6921754
"Again, if someone were willing to create a working project and email it to the addy above I would be
willing to increase the points substantially. "
Sorry, I meant a non-BHO/dll working project...not just emailing the code that is given in the above link =)
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 6921900
For a non-DLL solution, I'll chip in a few points too.

-- Dan
0
 
LVL 1

Author Comment

by:Aristippus
ID: 6921911
Ok, I see that I bit off more than I can chew here...

Dan,
Your second link (the BHO solution) will probably be my best bet, but I can't even compile the code that is provided in the link...

I am running VC++ 6 and the project is converted from the older version as I open it and I receive the following errors when attempting to compile:

Compiling...
EventsDlg.cpp
E:\SSleuth CPP\BHO\EventsDlg.cpp(44) : error C2664: 'unsigned int __thiscall ATL::CWindow::GetDlgItemTextW(int,unsigned short *,int) const' : cannot convert parameter 2 from 'char [260]' to 'unsigned short *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
E:\SSleuth CPP\BHO\EventsDlg.cpp(46) : error C2664: 'Navigate' : cannot convert parameter 1 from 'char [260]' to 'unsigned short *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
E:\SSleuth CPP\BHO\EventsDlg.cpp(63) : error C2664: 'GetTextExtentPoint32W' : cannot convert parameter 2 from 'const char *' to 'const unsigned short *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
IEHelper.cpp
IEHlprObj.cpp
E:\SSleuth CPP\BHO\IEHlprObj.cpp(176) : error C2664: 'strcmp' : cannot convert parameter 1 from 'unsigned short *' to 'const char *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Generating Code...
Error executing cl.exe.

IEHelper.dll - 4 error(s), 0 warning(s)

Help me iron out these to produce a working copy of this example and the points (along with more) are yours...
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 6921938
Those errors look to be related to the use of UNICODE.  For instance, GetDlgItemTextW() is aclling the 'Wide' version of the fn.  And strcmp is looking for 'unsigned short' which is an alias for UNICODE character data type.

Check the project settings aand turn off the use of UNICODE then clean and rebuild.

-- Dan
0
 
LVL 1

Author Comment

by:Aristippus
ID: 6921966
That did it...thanks, Dan

Here are the points and as promised I am creating another question with more for ya.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question