BHO and internet explorer 11 - c++

I saw some code on codeproject like this and this. but both are not compatible with the new security policy of internet explorer add-ons, when i insert then on registry they show up on the IE add-ons list, but with the "incompatible" status. Some can show me a working example for IE11 add-on? or can show me what i need to change? (i already disabled the security mode, but even with that i couldn't make it work) there is something to do with EPM (Enhanced Protected Mode)?

Have you used regsvr32.exe to register your BHO? I have IE 11 and used your second link as a boilerplate project, and I have no problems getting the dll to work in IE (besides having problems with working with the IE api - but that's not relevant).
What I did to get the BHO to work:
Have IE 11
Have Visual Studio 2015
Download the project from codeproject, doubleclick the solution
Convert it to the new format and download the dependencies (VS asked me to convert it, and I didn't have VisualC++ for Visual Studio or something)
Build it in release (I haven't actually tried debug)
Execute regsvr32.exe in an admin command prompt
Start IE and enable the BHO when IE asks you to
That's basically everything I did, and I didn't get an error on the way.
EDIT: Oops, sorry for necroing this. That was not my intention.

Related

How to write a IE BHO in Plain C++ which executes my javascript

According to my client's demand, I am aiming to write a Internet Explorer BHO which on button click executes my custom Javascript. I have started with this link which contains an example BHO which is inplemented in C++,
http://www.codeproject.com/Articles/37044/Writing-a-BHO-in-Plain-C
But when I try to run it in Visual C++ 2010 Express, it doesnot build. I have these question regarding IE BHO:-
1) On which platform can I build and make changes to the above example code , in VC++ 2010 or Windows 7 SDK?
2) Any other tutorial you can refer me; which can guide me how to make BHO in C++ ?
3) I intend to make a button while using IE BHO, such that whenever it is clicked, my custom javascript is executed. Can anybody give me a general guidance on how to do this?
I have searched alot about this matter on Internet, but it seems that majority of the people are implementing BHO in C#. I am in need of some good suggestions.
First question: You should not ask a question saying "it does not build" and saying nothing about your build problem. Do you want us to download the project and guess what is Ok and what is not depending on VS and OS versions? Update your question with your build problem.
Second question: Use Google: Building Browser Helper Objects with Visual Studio 2005 It's old now, but nothing has really changed since then. Alas, you must have an ATL capable version of VS, and the Express versions are not. Anyway,I very strongly discourage writing a C++ BHO without the help of ATL. You may get the ATL sources by downloading a recent SDK, but you will not have the wizards. If you have a "full" VS2008, it will do the job perfectly well.
Third question: general guidance is the IHTMLWindow2 execScript method

HOw do you uninstall Dot42

Two weeks ago I downloaded and installed Dot42AndroidSetup.exe.
There was helpful info on running Android on Hyper-V and hopeful possibilities about using VS and C# to directly target Android x86 and debug.
Since then I've seen strange behavior from an automatic update program "TallApplications.Update.exe"
There were 16 entrees in Control Panel\All Control Panel Items\Notification Area Icons for the same program.
When I checked on the web, I saw that Dot42 is associated with this update service. (http://www.tallapplications.com/)
I was able to uninstall the Tallapplications from control panel, however I had to manually delete many registry entries associated with it.
If anyone knows, please tell me how to remove Dot42 without harming VS2010 or VS2012.
There are registry entrees associated with Dot42 product for both versions of Visual Studio.
I also noticed the multiple entries in the Notification Area Icons which doesn't look good. You say you uninstalled 'TallApplications' - did you mean 'dot42'? What registry entries are left after uninstalling? Did you check the \Common7\IDE\Extensions folder? The dot42 folder should be gone after uninstalling. This is the dot42 integration with Visual Studio.
PS. this is not really a programming question - superuser.com or the dot42.com support area is probably a better entry.

Qt ActiveX Server Debugging Strategy

I am having problems with building an ActiveX object via activeqt. I attempted to follow a "Simple Example" via the qt 5 documentation (source, but when I run the demo IE page, the page only displays "Object not available! Did you forget to build and register the server?". My steps consisted of the following:
Install Visual Studio 2012 Express
Install Qt creator with extra sources (64 bit on 64 bit Windows 7)
Build the QAxServer library
Run qmake on the Simple example project
Build the "Simple" example project
Try the page with IE
I verified the classid is at least showing in the registry, and the compile output notes that activex server was successfully registered. I checked the event logs, but nothing is showing. The IE console notes that the "Object doesn't support property or method 'about'", but I get that error even if I use a bogus class id, so I'm assuming it could be throwing that error for many reasons. Does anybody have any other debugging strategies? Anywhere else IE might be hiding some useful logs? Thanks!

MFC Ribbon app not displaying ribbon - when .exe is copy pasted to a different machine

Well, I am facing a strange problem. I have developed a sample MFC ribbon application on my machine - Windows 7 , with Visual Studio 2008. When I copy paste the .exe onto my laptop and run the app , I don't see the ribbon menu (in fact the app has not menu now) .
I have tried looking up the .dll that load in each case(on my work machine and laptop) using process monitor but I am unable to locate what I might be missing. Any help will be greatly appreciated.
Edit 1 -
Ok, So thanks for your responses. Some progress has been made with this issue
I changed my IDE to VS 2010. The ribbon was coded manually and I figured out if I could add it as a resource maybe the problem would be solved. VS 2008 did not have the option of adding a ribbon as a resource.
I installed the VS 2010 Service Pack Redistributable X86/X64 depending on whether the machine is 32 or 64 bit.
I built a new "ribbontest.exe" app from VS 2010 and deployed it on other machines on which I would test my actual app. The ribbon for "ribbontest.exe" loads without any problems.
When I deploy my app and run it, first the old menubar loads for a sec or two, then the ribbon flashes and disappears.
A little history of the app I am referring to -
Initially my application had the menubar view. I followed this article http://www.codeguru.com/cpp/cpp/cpp_mfc/tutorials/article.php/c14929/MFC-Feature-Pack-An-Introduction.htm to accommodate a ribbon.
Any suggestions?
Most likely there's a conflict in the settings 'paths'. In your InitInstance() handler, you've got a statement like this:
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need
// Change the registry key under which our settings are stored
SetRegistryKey(_T("yourappname"));
If you haven't changed that name yet, do it. If you did, open regedit.exe on your target machine and remove the whole key under HKCU\Software\yourappname and then try again.
MFC stores user customizations of Ribbons/Menus/... under that key. But if you changed your app those settings don't necessarily match anymore and you can end up with stuff not showing correctly or not at all.
Make sure you download and install the Visual C++ Redistributable Runtime on your destination machine: http://www.microsoft.com/en-us/download/details.aspx?id=29
Or, something like it. Make sure you have architecture (x86/x64) correct and make sure it matches with the service pack version you compile with.
Joe is right: you need redistributable.
Joe is right: you cannot run 64-bit program on 32-bit machine.
All of the above would be indicated by the system (missing DLL, configuration incorrect, or 64/32 bit discrepancy)
Joe is right: your application must be built for specific set of minimum Windows version and service pack.
In addition to Joe’s post you must run release build not debug build.
If all of those requirements are met and you still have this problem, try linking MFC statically and see if problem persists.

Windows 7 and the case of the missing regtlib

I've just discovered that regtlib.exe appears to be missing from Windows 7 (and apparently from Vista as well).
I've just installed Windows 7 RC in a VM and I'm attempting to build our existing projects on the new OS. The projects are c/c++ based and I'm using visual studio 2008. In order to build these projects I need to register several tlb files that are referenced within the code base.
Has anyone also encountered this problem? And, has anyone managed to solve this?
Thanks.
Yeah regtlib was removed from vista and up. As far as I know, all it does is call LoadTypeLibEx with the REGKIND_REGISTER flag (http://msdn.microsoft.com/en-us/library/ms221249.aspx). Maybe you could write a simple replacement.
Just came across this issue (couldn't add any components to a VB6 project on Win7). This post (Error accessing the system registry in VB 6 IDE) pointed to regtlib (which is missing from Win7). I just
set the VB6 start menu icon to 'Run As Administrator' and it worked fine for adding components and should fix any problems relating to updating the registry as well.
Regards
Ian
Finally got back to trying to build our code base on windows 7. Anyway, I went back to the installer for one of the dependencies that was causing me grief. The error message from the installer wasn't to helpful but it did point to a regasm that was being run from inside the installer.
I ran the regasm command from a cmd prompt and got more information. It appears that you need administrative credentials to perform this task and our current installers don't do the privilege escalation properly.
So, long story short, I got dlls registered and the build appears to be working.