Wrting Browser Helper Objects

Hello,

This is my first time working on BHO and I really don't have a clue what to 
do.  The MSDN site talks about creating "IObjectWithSite" object and says 
that "if you add such an object to your ATL project, and call the 
corresponding class CViewSource, you get the following code from the wizard:

class ATL_NO_VTABLE CViewSource : 
   public CComObjectRootEx<CComSingleThreadModel>,
   public CComCoClass<CViewSource, &CLSID_ViewSource>,
   public IObjectWithSiteImpl<CViewSource>,
   public IDispatchImpl<IViewSource, &IID_IViewSource, 
                        &LIBID_HTMLEDITLib>

I have no idea how to add an object to ATL library or call CViewSource 
class.  Is it done programmatically or using IDE options?  Is there a simple 
example I can look at to figure out how his works?

Thanks you,
Victor.
0
victorsk (138)
8/8/2005 5:13:11 PM
vc.mfc 33608 articles. 0 followers. Follow

5 Replies
425 Views

Similar Articles

[PageSpeed] 11

Following link is a BHO written in ATL. This should get you started:

http://www.codeproject.com/atl/popupblocker2.asp

-----------
Ajay Kalra
ajaykalra@yahoo.com

0
ajaykalra (6842)
8/8/2005 6:30:31 PM
Hi Ajay,

Thanks so much for the reply.  While I was waiting for a reply, I tried to 
create an ATL DLL and I recognized some functions from MSDN's article on 
BHOs.  It would still be nice to know how to develop a BHO from scratch.  I 
tried to add "IObjectWithSite" to my class which as I understand handles 
BHO-IE communication but not sure how to do this.  Would have any advice on 
this please?  I'll definitely look on that site you provided also.

Thanks,
Victor.

"Ajay Kalra" wrote:

> Following link is a BHO written in ATL. This should get you started:
> 
> http://www.codeproject.com/atl/popupblocker2.asp
> 
> -----------
> Ajay Kalra
> ajaykalra@yahoo.com
> 
> 
0
victorsk (138)
8/8/2005 6:41:06 PM
See if the following article helps you

        Browser Helper Objects: The Browser the Way You Want It
        http://msdn.microsoft.com/library/en-us/dnwebgen/html/bho.asp

-- 
Cheers
Check Abdoul [VC++ MVP]
-----------------------------------

"victorsk" <victorsk@discussions.microsoft.com> wrote in message
news:E1A4B554-A31D-40DF-B201-8565DEDEAC92@microsoft.com...
> Hi Ajay,
>
> Thanks so much for the reply.  While I was waiting for a reply, I tried to
> create an ATL DLL and I recognized some functions from MSDN's article on
> BHOs.  It would still be nice to know how to develop a BHO from scratch.
I
> tried to add "IObjectWithSite" to my class which as I understand handles
> BHO-IE communication but not sure how to do this.  Would have any advice
on
> this please?  I'll definitely look on that site you provided also.
>
> Thanks,
> Victor.
>
> "Ajay Kalra" wrote:
>
> > Following link is a BHO written in ATL. This should get you started:
> >
> > http://www.codeproject.com/atl/popupblocker2.asp
> >
> > -----------
> > Ajay Kalra
> > ajaykalra@yahoo.com
> >
> >


0
CheckAbdoul
8/8/2005 9:41:34 PM
 Hi,

Thanks for replying.  This is the first article I've visited and have mostly 
been reading but I am not sure what they do with CViewSource object there.  I 
did go as far as creating an IE object (which created additional class that 
uses these functions:
                public CComObjectRootEx<CComSingleThreadModel>,
	public CComCoClass<Cwbho, &CLSID_wbho>,
	public IObjectWithSiteImpl<Cwbho>,
	public IDispatchImpl<Iwbho, &IID_Iwbho, &LIBID_BHOLib>

But I am really stuck at this point and have no idea how to bind this DLL to 
IE or what to do next :-(

Victor.

"CheckAbdoul" wrote:

> See if the following article helps you
> 
>         Browser Helper Objects: The Browser the Way You Want It
>         http://msdn.microsoft.com/library/en-us/dnwebgen/html/bho.asp
> 
> -- 
> Cheers
> Check Abdoul [VC++ MVP]
> -----------------------------------
> 
> "victorsk" <victorsk@discussions.microsoft.com> wrote in message
> news:E1A4B554-A31D-40DF-B201-8565DEDEAC92@microsoft.com...
> > Hi Ajay,
> >
> > Thanks so much for the reply.  While I was waiting for a reply, I tried to
> > create an ATL DLL and I recognized some functions from MSDN's article on
> > BHOs.  It would still be nice to know how to develop a BHO from scratch.
> I
> > tried to add "IObjectWithSite" to my class which as I understand handles
> > BHO-IE communication but not sure how to do this.  Would have any advice
> on
> > this please?  I'll definitely look on that site you provided also.
> >
> > Thanks,
> > Victor.
> >
> > "Ajay Kalra" wrote:
> >
> > > Following link is a BHO written in ATL. This should get you started:
> > >
> > > http://www.codeproject.com/atl/popupblocker2.asp
> > >
> > > -----------
> > > Ajay Kalra
> > > ajaykalra@yahoo.com
> > >
> > >
> 
> 
> 
0
victorsk (138)
8/8/2005 9:57:15 PM
take a look at
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q179230

AliR.

"victorsk" <victorsk@discussions.microsoft.com> wrote in message
news:F354CAC7-9B0F-4D55-8DAB-B286E23E2604@microsoft.com...
> Hi,
>
> Thanks for replying.  This is the first article I've visited and have
mostly
> been reading but I am not sure what they do with CViewSource object there.
I
> did go as far as creating an IE object (which created additional class
that
> uses these functions:
>                 public CComObjectRootEx<CComSingleThreadModel>,
> public CComCoClass<Cwbho, &CLSID_wbho>,
> public IObjectWithSiteImpl<Cwbho>,
> public IDispatchImpl<Iwbho, &IID_Iwbho, &LIBID_BHOLib>
>
> But I am really stuck at this point and have no idea how to bind this DLL
to
> IE or what to do next :-(
>
> Victor.
>
> "CheckAbdoul" wrote:
>
> > See if the following article helps you
> >
> >         Browser Helper Objects: The Browser the Way You Want It
> >         http://msdn.microsoft.com/library/en-us/dnwebgen/html/bho.asp
> >
> > -- 
> > Cheers
> > Check Abdoul [VC++ MVP]
> > -----------------------------------
> >
> > "victorsk" <victorsk@discussions.microsoft.com> wrote in message
> > news:E1A4B554-A31D-40DF-B201-8565DEDEAC92@microsoft.com...
> > > Hi Ajay,
> > >
> > > Thanks so much for the reply.  While I was waiting for a reply, I
tried to
> > > create an ATL DLL and I recognized some functions from MSDN's article
on
> > > BHOs.  It would still be nice to know how to develop a BHO from
scratch.
> > I
> > > tried to add "IObjectWithSite" to my class which as I understand
handles
> > > BHO-IE communication but not sure how to do this.  Would have any
advice
> > on
> > > this please?  I'll definitely look on that site you provided also.
> > >
> > > Thanks,
> > > Victor.
> > >
> > > "Ajay Kalra" wrote:
> > >
> > > > Following link is a BHO written in ATL. This should get you started:
> > > >
> > > > http://www.codeproject.com/atl/popupblocker2.asp
> > > >
> > > > -----------
> > > > Ajay Kalra
> > > > ajaykalra@yahoo.com
> > > >
> > > >
> >
> >
> >


0
AliR3470 (3236)
8/8/2005 10:05:02 PM
Reply:

Similar Artilces:

Can't neither select nor delete an object
Hi, I think I've done a dumb thing. Don't know how come, but I've got an object in my drawing which I can't neither select nor delete nor double click, nor get any properties. Any idea on how to get rid of it ? Thanks in advance Raymond W2K Pro SP3, Visio 2002 Professional is it on a background page and maybe you're seeing it through the drawing ? Al "Raymond" <Square.Peg@round.hole> wrote in message news:O1sjWKnwDHA.3220@tk2msftngp13.phx.gbl... > Hi, > > I think I've done a dumb thing. > Don't know how come, but I've got an ob...

Microsoft Drawing Object/Changing Clip Art Colors
I used to be able to covert clip art to a Microsoft Drawing Object by selecting "Arrange" "Ungroup". I was then able to select a certain portion and change the color of it. Now when I do it, a white square appears and you can not see the image any more. Do you know what may have caused this to change? ...

Outlook 2002: Error -2147024891 Collaboration Data Objects E_ACCESSDENIED (80070005)
When I tried to debug a program written using VB, which intend to send an email attachment, I get the following error message. Error -2147024891 : [Collaboration Data Objects - [ E_ACCESSDENIED (80070005)]] The email attachment is getting saved in the Outbox of Microsoft Outlook thus not allowing the user to select the recipient list from TO, CC & BCC lists. Some parts of the codes are stated below for your information ........... .............. Set objSession = CreateObject("Mapi.Session") ........... .............. objSession.Logon "MS Exchange Settings&qu...

Warning message: "Fixed Objects will move" What is its meaning?
I get the warning message Fixed Objects will move in an Office 2000 Excel spreadsheet. This occurs when filtering. To proceed with the filter operation I have to answer OK to the dialog box many many times. I cannot find any references to this warning on the web or in Excel help. Does anyone have an explanation? Specifically - What are these fixed objects? How can I identify them and to where they have been moved? How can I avoid the warning and the need to press <return> 100's of times? Regards -- John The following MSKB article may help: XL: "Cannot Shift Objects Off Shee...

When I try to send it says "an object cannot be found" ????
When I try to send the email it says "The operation failed. An object cannot be found". How do I solve this ? Thank you Version of Outlook? Type of email account? Did you try Detect and Repair? Is your Address book configured properly? -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com/ Outlook Tips by email: mailto:dailytips-subscribe-request@lists.outlooktips.net EMO - a weekly newsletter about Outlook and Exchange: mailto:EMO-NEWSLETTER-SUBSCRIBE-REQUEST@PEACH.EASE.LS...

ESP not properly saved (DLL calling an exe's object function).
Hi everyone, I'm stress-testing an application of mine. This application is a service, so it has to be able to support quite a heavy loan of work. It is installed and working fine at several customers. But one of them has very heavy traffic, so there it crashes once a day. The service automatically restarts but its clients have to reconnect and stuff, so the customer is not very happy... So that's why I'm stress-testing it, to see if I catch the bug. The service is an exe file using a DLL, both are code of mine. After half an hour of stress-testing I get this debug error: ...

default browser #3
Running Outlook 2007 on Vista Ultimate 32-bit... Suddenly... I can't open a link inside an e-mail message by clicking on it unless IE7 is set as the default browser... How do I tell Outlook what the default browser is... Anything but IE... e.g. Fire Fox, Opera, etc. m you need to set the default in windows and outlook should use it - although recent reports are that it will always use IE. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Need Help with Common Tasks? http://www.outlook-tips.net/beginner/ Outlook 2007: http://www.slipstick.com/outlo...

edit an autocad r14 <embed> object to open in autocad 2000
=EMBED("AutoCAD.Drawing.14","") convert to =EMBED("AutoCAD.Drawing.15","") How do you make the autocad r14 object open in autocad r2000. I no longer have autocad r14 so i can't open it otherwise. Is there maybe a place to tell excel where to look for the exe file? ...

Deserializing XML into object
Hi, I'm facing a problem when I have to deserialize an XML into an object. The typical scenario is as follows: The XML that I have to deserialize has multiple elements of the same type (lets say multiple occurences of <abc />) with different inner texts. Now if I use the already available deserialize method of the XMLSerialize object, then it returns me only the first element's inner text if I try to extract in a variable of type string. However, I would like all the element values to come in as an arraylist (preferably). When I tried deserializing into a variable of type ...

std::vector : begin, end and insert
Hi, I thought I would experimenting with vectors. I am trying to use CPoint objects instead the examples, which use ints. So, I am a having a few problems. Question 1. How do I get the integer value from _Iter or How do I use _Iter to get the object? for (_Iter = pt.begin(); _Iter < pt.end(); _Iter++) { CPoint& pt = Pts.at(??); } I am not sure about the use of begin and end. Would 0 and size() be the equivalents? Would there ever be a difference between them? Question 2. How do I go about adding CPoint objects with insert? Do I have to add the obj...

Can't find source of Application-defined or object-defined error!?
I won't post all of the code here because it's too extensive but here's a watered down version (all variables declarations are not listed): Dim i as integer Dim PortName As String Dim ReviewSht As String Dim ModelSht As String Dim HoldingsSht As String Dim Model As Range PortName = Right(ActiveSheet.Name, Len(ActiveSheet.Name) - 15) ReviewSht = "Price Weight - " & PortName ModelSht = "Model Data - " & PortName HoldingsSht = "Holdings - " & PortName Application.ScreenUpdating = False With Worksheets(ModelSht).Range("A9") Range...

How do I get rid of the error "can't shift object off sheet"
I am using data groups and outline in excel 2003. When I want to minimize a grouping, I am receiving the error message "cant shift object off sheet" How do I solve this message On Fri, 29 Apr 2005 12:20:03 -0700, MStuck <MStuck@discussions.microsoft.com> wrote: >I am using data groups and outline in excel 2003. When I want to minimize a >grouping, I am receiving the error message "cant shift object off sheet" > >How do I solve this message The usual cause of this is described here, along with the necessary fixes: http://support.microsoft.com/defau...

Internet Browser
I just purchased and installed my 2006 Money Deluxe Software yesterday and am having a problem with the Internet Connection. I have followed the following instructions to "Always use my default browser to browse the Internet", not within Money, and the Browser still opens from within Money: Click Browse the Internet from within Money to use the Money Browser, or click Always use my default browser to browse the Internet if you prefer to launch your own Web browser when you click on Internet links within Money. I'm hoping to get this solved here rather than going to Microsoft...

Browser choice 02-27-10
My OS is XP Pro SP3. I have installed the new browser choice update on my desktop computer, but although it is shown in the list of installed updates, there has been no desktop shortcut appearance, nor is there anything else to show its presence. I have Firefox 3.6 already installed as well as IE 8. I was intgerested to see how it would work. Since then I have successfully installed it on my laptop. Is there any way I can get it to register properly? "Dr_No" <Dr_No@totalise.co.uk> wrote in message news:#6ILE73tKHA.5940@TK2MSFTNGP02.phx.gbl... > My ...

Helper classes for dealing with XML Names
Does the .NET Framework have and helper classes that will help my code generate and/or validate XML Names or NCNames? From the spec: NCName::= (Letter | '_') (NCNameChar)* /* An XML Name, minus the ":" */ NCNameChar::= Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender I want to strip out any offending characters and make sure my code only generates valid names. Thanks! -Steve Stephen Walch wrote: > Does the .NET Framework have and helper classes that will help my code > generate and/or validate XML Names or NCNa...

Formatting objects processor
Hi Folks, I plan to implement some report generation using Formatting objects on the ..NET platform. Does Microsoft have a built in version? .Or What are my options? are there any free ones which can be used on the .NET platform? Any help in this regard would be appreciated Thanks James James wrote: > I plan to implement some report generation using Formatting objects on the > .NET platform. Does Microsoft have a built in version? .Or What are my > options? are there any free ones which can be used on the .NET platform? Microsoft doesn't have XSL-FO implementation and a...

The Operation on the | Object failed
I have an access database linked to a SQL server 2005 back end database and my users randomly get the above message on occasions. It appears to usually happen when running VBA code. Can anybody help? ...

Transforming XML from Data Objects
Hello All, I have a collection of data objects that are based on my application's data model. I want to be able to serialize this data to different XML formats (schemas) for use by different consuming applications. For example, I want to generate XML from the data one way for Application1, and generate XML in a different format for use by Application2. I don't think I can just serialize my objects as XML because I would lose the flexbility to choose the output schema. Is there something built into the .NET framework that will allow this to be done easily? It would be nice if there w...

xml serializer treatment of collection objects
If I understand the Xml Serializer correctly, as it is serializing an object graph, if it comes across a collection object, it puts a tag in for the collection and then tries to serialize all of the members of the collection. This is roughly the same treatment when the top of my object graph is itself a collection. I'm curious, however, about 2 things with regard to passing a custom collection object to the XmlSerializer: 1) Why cannot I not use the XmlRootAttribute on my collection object to specify a custom tag name for my collection? 2) What exactly does the XmlSerializer do...

SOAP Server Application Faulted 80040217The specified object was not found.D:\crm\Build\3297\src\platform\include\OMCommon\entity.inl1542 Source: System.Web.Services
I get this exception when I execute this code to retreive a CRM contact. Any ideas as to what the proxy class is looking for that it cannot find. I do not have the directory structure the erro message calls for. Exception: SOAP Server Application Faulted 80040217The specified object was not found.D:\crm\Build\3297\src\platform\include\OMCommon\entity.inl1542 Source: System.Web.Services Code: // strServer should be set with the name of the platform Web server string strServer = "crm"; // virtualDirectory should be set with the name of the Microsoft CRM // virtual directory on the...

Control Object
I have several control objects on a worksheet linke to cells. When i protect the worksheet i cant use the objects (comobo box, text box). Can this be done? Maybe move the links to another worksheet (and even hide that one). Or just unprotect those cells. (maybe you can dedicate a column for these links and then hide the column. That usually stops most people from selecting them.) Larry wrote: > > I have several control objects on a worksheet linke to > cells. When i protect the worksheet i cant use the objects > (comobo box, text box). Can this be done? -- Dave Peterson ...

Embedded objects in Publisher 2000
Hi i have a colleague who is using Publisher 2000 in which he has ana linked external data source - an excel spreadsheet When she runs pack and go, the spreadhseet is not being included within the pack and go files. is there any reason for this please? Thanks A Which is it, linked or embedded? You have stated both. You shouldn't have any problems if it is an embedded object. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Alex" <alexdeletethishammerstein@hotmail.co.uk> wrote in message news:O0wmR26OHHA.50...

Links to web pages open browser in a blank page
What would cause this? An email that contains a link to a web page works fine for others around here but for me I get a blank page. No error message or anything. I just found out that the instant messaging software my company uses gives me the same problem. Just me - nobody else. "Amy" <ab@mdahospital.com> wrote in message news:eWRHbpaSEHA.4028@TK2MSFTNGP09.phx.gbl... > What would cause this? An email that contains a link to a web page works > fine for others around here but for me I get a blank page. No error message > or anything. > > I am sending you a ...

Insert object in MSA2007 behaves differently
I am working on a database that stores 72dpi thumbnail pictures as OLE objects for a charitable organization. When they switched to Access 2007, the pictures no longer import in the same way that they used to. When the picture is imported it appears as a pixelated version with the file name underneath. They have been importing the picture through a the bound object frame in a form. The bound object frame is controled by the OLE field in a table. To import, they select the bound ojject frame and then choose the insert object tool from the add-ins toolbar. The picture is created f...

Printing the properties of an object
I am attempting to document some of the objects in my database (Access 2007) As an example, how can I print the properties of a form named frmUnpaid_Accts I have tried using HELP, but can seem to find anything - did MS change the way it works, because it looks and feels different to me. Kelli Kelli, You should be able to do that through the Database Documentor, which is accessable through... Database Tools/Analyzer/DatabaseDocumentor -- hth Al Campagna Microsoft Access MVP 2007-2009 http://home.comcast.net/~cccsolutions/index.html "Find a...