C++ BHO (IE addin) issue
I am creating a BHO using helloworld sample. Building Browser Helper Objects with Visual Studio 2005
the BHO is not getting loaded, and i am not able to hit the breakpoints in SetSite function.
Please let me know what additional settings are required to register BHO a开发者_开发知识库nd subsequently debug it.
I am using IE9, VS2008.
Thank you very much
This is because the debugger is not attaching to the right IE9 process. To work around this you need to dictate IE9 to use a single process for all tabs. This can be done by setting the registry value: HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\TabProcGrowth = 0
Hope this helps.
Are you certain that you've registered it? Assuming that you've accurately implemented the example in the link above (particularly the section about using the correct CLSID in the .rgs file), try from an elevated/admin CMD window:
regsrv32 /s mybho.dll
This will register the COM objects within the DLL, as well as registering it with Internet Explorer as a BHO
Additionally, with IE9 you'll need to make sure it's enabled in the Addons manager (tools/manage addons)
I had the same issue. I was using 64 bit IE9 but I changed the debugger to use 32 bit and it works for me now.
In VS 2008 go to the menu:
Project -> Project Name Properties -> Configuration Properties -> Debugging -> Command
C:\Program Files (x86)\Internet Explorer\iexplore.exe
I was using 64 bit before:
C:\Program Files\Internet Explorer\iexplore.exe
Also use a local file to avoid issues with protected mode:
Command Arguments:
path to some local html file
Good Luck...
Are you running in protected mode? If yes , then the breakpoint in SetSite will never be hit. Refer http://msdn.microsoft.com/en-us/library/bb250462.aspx to know more about protected mode.
Also did you try registering the BHO using regasm ?
精彩评论