Re: How to enable IE Toolbar plugin on installing
- The documentation only mentions to add one registry item
(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer
\Browser Helper Objects\<CLSID>). Is this really the only one?
Yes.
Thanks again for your reply Igor, you info is really helpful.
I added my BHO CLSDI to the registry, but I wonder how the link is
made to my DLL file? And what triggers the activation of my BHO?
I have implemented the my BHO, I created a factory class for it, and
implemented DllClassobject like this:
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID
*ppReturn)
{
*ppReturn = NULL;
if (IsEqualCLSID(rclsid, CLSID_Toolbar))
{
working code for toolbar....
return hResult;
}
else if (IsEqualCLSID(rclsid, CLSID_BandActivator))
{
BandActivatorFactory* pClassFactory = new
BandActivatorFactory(rclsid, TEXT(""));
if(!pClassFactory)
{
return E_OUTOFMEMORY;
}
HRESULT hResult = pClassFactory->QueryInterface(riid, ppReturn);
//call Release to decement the ref count - creating the object set
it to one
//and QueryInterface incremented it - since its being used
externally (not by
//us), we only want the ref count to be 1
pClassFactory->Release();
if(!SUCCEEDED(hResult))
{
MessageBox(0, TEXT("GetClassObject failed"), TEXT("Toolbar"),
MB_OK);
}
return hResult;
}
else
{
return CLASS_E_CLASSNOTAVAILABLE;
}
}
So I am sharing DllGetClassObject for both BHO and Toolbar, which is a
logical choice I think because both are in the same DLL. Is this
correct?
The BHO code never gets executed. I suspect that I am missing
something obvious. Do you have any idea?
Grtz,
Francis