there are three possible sources of the problem you describe that I can think of.
First of all, if you installed an x64 build of and you are running your application as a 32 bit process, then the application might seem to be working up to a certain degree, but it certainly would not be possible to create overlay plugins on the display OCX (simply because the 32 bit build of the overlay plugins has not been installed). Keep in mind the nefarious “Prefer 32bit” option in the recent versions of Visual Studio which might lead to your “AnyCPU” project coming up as a 32 bit process on a 64 bit machine (in other words: You might be sure you are building for 64 bit, but it can’t hurt to double check if that really is the case; see for example here…).
The other cause for this issue might be a bug that was around before 13.01.001: The signature of
AddOverlayObjectNET was broken in a way that will lead to pointer aliasing in a 64 bit application on the last parameter of the function. The funny thing is that this was around since the very first 64 bit build of but only seems to have kicked in recently. Anyway: If you are using a version prior to 13.01.001, get 13.01.001 or higher and use
AddOverlayObjectNET2 instead of
The third possible reason: You are running your application on an installation of 13.01.001 or higher and you are still using
AddOverlayObjectNET. Starting with 13.01.001 (when
AddOverlayObjectNET2 was introduced), the old
AddOverlayObjectNET will always return
false in the 64 bit build. This is a safety precaution because pointer aliasing can lead to undefined behaviour (in other words: crashes…), which is why the decision was taken to shunt that method in the 64 bit build.
- Make sure you do not have “Prefer 32bit” checked unintentionally in your project settings.
- Make sure you are using 13.01.001 or higher.
- Make sure you are using
(general advice: when switching between versions it generally is a good idea to delete the bin and obj directory of your project to make sure that the OCX wrappers are rebuilt by Visual Studio - otherwise you might not even see new methods like