W10 ocx registration fails

Jochen Wollenhaupt
Jochen Wollenhaupt used Ask the Experts™
in this forum i found the below quoted post which exactly describes my problem. However the soulution given does not help in my case.
In a Foxpro9 installation under W10pro64 I need the DayView.ocx which i copied to System32 and Syswow64.
On one system the manual regsvr32 procedure works on another it does not.
Thanks for help and here the old question:

"In a command prompt I am running this line:  

C:\Windows\System32> regsvr32 C:\Windows\System32\ImageViewer2.OCX

I get the following error:

The Module "C:\Windows\System32\ImageViewer2.OCX" failed to load.
Make sure the binary is stored at the specified path or debug it to check for problems with the binary or dependent .DLL files.  
The Specified module could not be found.  

This is a new 64 bit, Win7 laptop.  The OCX file has been transferred from a 64 bit Win 7 system it succesfully installed on.  I am logged in as Administrator and running cmd as Administrator.  I have a VFP app that relies on this OCX to run. "
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®


I checked but the ocx file does not have this property, have tried different access rights in the property window before. But thanks for the fast reply!!
The OCX folder does not matter but you should use appropriate regsvr32 based on the OCX bit depth, so SysWoW64 for 32 bit OCX and  System32 for 64 bit OCX. You have to use CMD.EXE with elevated rights (Run As Administrator).

The "OCX failed to load" error itself obviously means there is missing C or C++ runtime library in your system. Some OCXes need MSVCR71.DLL, MSVCP71.DLL, MSVCR80.DLL, MSVCR100.DLL etc. Everything depends on the C++ version used for their compilation.

Your FoxPro application also uses DLLs which are not delivered together with operating system but you have to add them to the installation together with VFP Run-time.

So the best approach is to place all the OCXes to application folder together with appropriate C++ DLLs and register them from application folder.

Which DLL is necessary for your OCX could tell the OCX vendor or you may use Dependency walker (http://www.dependencywalker.com/) and investigate this small issue yourself.
I would run process monitor while doing regsvr32, looking for anything "not found".


Thanks!!! I tried process monitor and dependency walker and the latter gave out the missing msvbvm50.dll which i installed manually and now it works!! Thank you for the fast help!!!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial