Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ATL, BHO writting

Status
Not open for further replies.

bobetko

Programmer
Jan 14, 2003
155
US
1) Where can I learn to create my own Browser Helper Objects? Any suggestions?
2) How different VS2005 is from VS2003?
There are nice examples on the website TheCodeProjects but I couldn't compile any of them successfuly.

I think one of the reasons is new VS2005. After I download source file, then the whole project had to be converted.
It would generated few warnings:

c:\...\basicpopupblocker\pubwhitelist\whitelist.h(71) : warning C4581: deprecated behavior: '"never"' replaced with 'never' to process attribute
c:\...\basicpopupblocker\pubwhitelist\whitelist.h(69) : warning C4581: deprecated behavior: '"apartment"' replaced with 'apartment' to process attribute

This doesn't sound right: '"apartment"' replaced with 'apartment' ... I see quote difference here, but I checked the code, didn't see any change.

... and and on the end couldn't compile. I am trying to learn from these (big time novice). It seems that New VS2005 is doing ATL differently. I couldn't (didn't know how) use any of the ATL examples (about BHOs) from the TheCodeProjects website. I managed to compile previous popup blocker example (from the same author), but it was crashing when it would detect a popup.
If somebody can direct me in right direction I would appriciate.

Even examples on Microsoft website are old and It seems I cannot recreate things they do. For example:
On the microsoft website they claim that after you place simple ATL object wizard generates:
Code:
class ATL_NO_VTABLE CViewSource : 
   public CComObjectRootEx<CComSingleThreadModel>,
   public CComCoClass<CViewSource, &CLSID_ViewSource>,
   public IObjectWithSiteImpl<CViewSource>,
   public IDispatchImpl<IViewSource, &IID_IViewSource, 
                        &LIBID_HTMLEDITLib>

In my case, dosn't matter what options I select I get:

Code:
class ATL_NO_VTABLE CSourceView :
	public IObjectWithSiteImpl<CSourceView>,
	public ISourceView
{


It looks like that you would have to redo all your aplications every time Microsoft issue a new version of VS. Doesn't sound good.

Thanks.
 
Reason I couldn't compile my last example was missing 'atlapp.h' file. It is part of WTL, so I went to Microsoft website and downloaded ver. 7.0 .
I placed 'atlapp.h' iside my src folder and I still have same message: 'atlapp.h' doesn't exists????

On top of that, non of the examples by microsoft from WTL 7.0 can't be compiled in VS2005 (had to be converted).
This is frustrating.... how is somebody supposed to learn something when nothing works?

somebody.... light please.....
 
If you have #include <atlapp.h> reference in your code, you must place this header in system (VC++) include directory, not in your project source dir (where #include "h-name" form works).
May be it helps...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top