Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Register/unregister my BHO using Delphi code

Posted on 2006-06-18
11
Medium Priority
?
1,309 Views
Last Modified: 2012-06-27
I wish to register/unregister my BHO from my application. How to do this?
0
Comment
Question by:ginsonic
[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
  • 6
  • 5
11 Comments
 
LVL 26

Expert Comment

by:EddieShipman
ID: 16936913
Just create the correct registry entries. Next time IE loads, it will load the BHO.
0
 
LVL 9

Author Comment

by:ginsonic
ID: 16939646
How?
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 16942436
Usign TRegistry, I KNOW you know how to do that.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Author Comment

by:ginsonic
ID: 16944065
Sorry to say but not :( I write app from hobby and not as a job.
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 16944145
What is the GUID (CLSID) you used for your BHO?
0
 
LVL 26

Accepted Solution

by:
EddieShipman earned 200 total points
ID: 16944380
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
 
LVL 9

Author Comment

by:ginsonic
ID: 16951628
I don't see anything about my dll name. Where to specified where and what is my BHO dll.

And how to unregister?
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 16952178
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
 
LVL 9

Author Comment

by:ginsonic
ID: 16952331
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
 
LVL 9

Author Comment

by:ginsonic
ID: 16952354
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
 
LVL 26

Expert Comment

by:EddieShipman
ID: 16952642
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

704 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