|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Creating an OCX that is a BHO (Browser Helper Object)the VB5CCE. However, I am stuck from the getgo, and can't even get out the barn door. Near as I understand, I need to do like so: Implements IObjectWithSite and Private Sub IObjectWithSite_GetSite(ByVal priid As VBShellLib.REFIID, _ ppvObj As VBShellLib.VOID) and Private Sub IObjectWithSite_SetSite(ByVal pSite As VBShellLib.IUnknownVB) When I type the first word (in the user control), intellisense shows me a whole list of possibilities, but IObjectWithSite is not one of them. If I write that in anyway and try to create the .OCX, VB5CCE complains mightily with: Compile Error: User-defined type is not defined But I have not a clue as to whether I need to set a reference, move Implements elsewhere (e.g. class/module/user control - I've tried them all), or what I should do. Similarly, intellisense doesn't know about VBShellLib. If someone could just help me get started or provide a framework, I'd be much obliged. Thanks, Csaba Gabor from Vienna Background: I want to write some code in VB/VBScript that monitors all instances of IE. I've posted the framework for one way to accomplish this (along with numerous references) using SHDocVW at: http://groups-beta.google.com/group/microsoft.public.scripting.vbscript/browse_frm/thread/fb37977720411d57/ The method described there is a VBScript TSR that loads up a single intance of an .OCX (thanks for your comments, Joe Earnest). However, the web says that the standard technique is actually to use a BHO. At this point, I don't know if it should be more efficient, but it certainly seems like it would cut down on the overhead associated with maintaining the single instanceness of the SHDocVW variant.
Show quote
Hide quote
"Csaba Gabor" <Cs***@z6.com> wrote in message You need to set a reference. I have no idea what typelib to tell you to news:1117621076.473472.38230@f14g2000cwb.googlegroups.com... >I would like to create a BHO (Browser Helper Object) as an .OCX using > the VB5CCE. However, I am stuck from the getgo, and can't even get out > the barn door. Near as I understand, I need to do like so: > > Implements IObjectWithSite > and > Private Sub IObjectWithSite_GetSite(ByVal priid As VBShellLib.REFIID, _ > ppvObj As VBShellLib.VOID) > and > Private Sub IObjectWithSite_SetSite(ByVal pSite As > VBShellLib.IUnknownVB) > > > When I type the first word (in the user control), intellisense shows me > a whole list of possibilities, but IObjectWithSite is not one of them. > If I write that in anyway and try to create the .OCX, VB5CCE complains > mightily with: > Compile Error: > User-defined type is not defined > > But I have not a clue as to whether I need to set a reference refer to, but that's what you need.
http://surl.co.uk/?1499
Original URL: http://www.avidoffice.com/docushare/dsweb/Get/Document-2918/Builder.com+Add+functionality+with+a+BHO.htm Show quoteHide quote "Jeff Johnson [MVP: VB]" <i.get@enough.spam> wrote in message news:uK62aGuZFHA.580@TK2MSFTNGP15.phx.gbl... > > "Csaba Gabor" <Cs***@z6.com> wrote in message > news:1117621076.473472.38230@f14g2000cwb.googlegroups.com... > > >I would like to create a BHO (Browser Helper Object) as an .OCX using > > the VB5CCE. However, I am stuck from the getgo, and can't even get out > > the barn door. Near as I understand, I need to do like so: > > > > Implements IObjectWithSite > > and > > Private Sub IObjectWithSite_GetSite(ByVal priid As VBShellLib.REFIID, _ > > ppvObj As VBShellLib.VOID) > > and > > Private Sub IObjectWithSite_SetSite(ByVal pSite As > > VBShellLib.IUnknownVB) > > > > > > When I type the first word (in the user control), intellisense shows me > > a whole list of possibilities, but IObjectWithSite is not one of them. > > If I write that in anyway and try to create the .OCX, VB5CCE complains > > mightily with: > > Compile Error: > > User-defined type is not defined > > > > But I have not a clue as to whether I need to set a reference > > You need to set a reference. I have no idea what typelib to tell you to > refer to, but that's what you need. > >
Creating a DLL and calling it from an app
How to calculate this? Sudden automation error with MS XML object memory leak ? Runtime error 53 Parse and preserve an object in a class SP5 to SP6: To update or not? App Protection How do I deploy a VB6 program to folder whose filename has spaces? Problem with multiple forms |
|||||||||||||||||||||||