• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1330
  • Last Modified:

Register/unregister my BHO using Delphi code

I wish to register/unregister my BHO from my application. How to do this?
0
ginsonic
Asked:
ginsonic
  • 6
  • 5
1 Solution
 
Eddie ShipmanAll-around developerCommented:
Just create the correct registry entries. Next time IE loads, it will load the BHO.
0
 
ginsonicAuthor Commented:
How?
0
 
Eddie ShipmanAll-around developerCommented:
Usign TRegistry, I KNOW you know how to do that.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
ginsonicAuthor Commented:
Sorry to say but not :( I write app from hobby and not as a job.
0
 
Eddie ShipmanAll-around developerCommented:
What is the GUID (CLSID) you used for your BHO?
0
 
Eddie ShipmanAll-around developerCommented:
Here is code from the IEBrowserHelper class to register itself:

procedure TIEBrowserHelperFactory.AddKeys;
var S: string;
begin
  S := GUIDToString(CLASS_IEBrowserHelper);
  with TRegistry.Create do
  try
    RootKey := HKEY_LOCAL_MACHINE;
    if OpenKey('Software\Microsoft\Windows\CurrentVersion\explorer\Browser Helper Objects\' + S, TRUE)
      then CloseKey;
  finally
    free;
  end;
end;

If you look at the source here is the CLASS_IEBrowserhelper definition:
const
  Class_IEBrowserHelper: TGUID = '{FCADDC14-BD46-408A-9842-CDBE1C6D37EB}';
0
 
ginsonicAuthor Commented:
I don't see anything about my dll name. Where to specified where and what is my BHO dll.

And how to unregister?
0
 
Eddie ShipmanAll-around developerCommented:
Look, if you don't provide more info, how can I help you?
It has NOTHING to do with DLL names or anything.
It goes off the GUID.

Unregister is just remove the registry entry.

Now, you may be able to register/unregister your DLL using regsvr32, but I'm not sure.
0
 
ginsonicAuthor Commented:
the BHO is a dll that in my demo case is name IEhelper.dll, but I can name it test.dll. I wish to register this dll as every time when I run an IE instance to start my dll too.

For testing I use Register ActiveX Server from Delphi IDE. But wish to add it to install or at the first time running.
0
 
ginsonicAuthor Commented:
If I don't tell to registry to use my test.dll how can IE know what to use? I can have ten BHO in the same time for same IE instance.
0
 
Eddie ShipmanAll-around developerCommented:
As I said before, it doesn't matter WHAT you name it, it MUST have a GUID.
and you HAD to create a GUID for your DLL in order for it to be a BHO.

You can use the code I showed above to add it to the registry.

Maybe you need to readup on the registering of BHO's:
http://msdn.microsoft.com/library/en-us/dnwebgen/html/bho.asp?frame=true#bho_registration

0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now