I have a solution, which successfully builds/runs on Windows 7. I am porting the solution to Windows 10. DigiCert no longer supports Win7, etc.
My OCX project successfully builds, however when I go to register the OCX, I receive
“The module failed to load. The specified module could not be found”
The project contains no references.
I did research and saw many articles, most of them saying the same thing and none helpful. Here is what I have done.
Note: I know that I have a 64-bit OCX, given the obvious path “x64DebugDriveOps.ocx”, but in my quest to try every option that people mentioned both here on SO and on a general Google search, I tried, as mentioned below, the SysWOW64 and regular regsvr32.exe, just so that I can be thorough, even though the SysWOW64 is for 32-bit DLLs/OCX files.
- Added temporary MessageBox() statements to DllRegisterServer() and InitInstance() methods. I saw no message box appear when running
regsvr32.exe
. - I tried
%systemroot%SysWOW64regsvr32.exe <complete path to x64Debugocx"
. - sfc /scannow turned up nothing
- dism /Online /Cleanup-Image /CheckHealth turned up nothing, system fine
- dism /Online /Cleanup-Image /ScanHealth turned up nothing, system fine
- Giving full control permissions (regedit) to ComputerHKEY_CLASSES_ROOTTypeLibALL APPLICATION PACKAGES did nothing
- Release and Debug version build fine and both versions yield the same error when registering either straight or with the
SysWOW64
variant. - I searched the entire registry for the base name and that turned up nothing. I searched for
DriveOps
. My OCX name is DriveOps.ocx. I was hoping that there is an existing entry in the registry that causes havoc. No dice. - Yes, I am running from an administrative command prompt. I even tried all the above from a VS2010 terminal booth with and without running
vsvars32.bat
beforehand. This route turned up nothing too. - The %errorlevel% from regsvr32 from the administrative command prompt is always 9009, file not fund, however and rather interesting, the %errorlevel% is 0 from a VS2010 terminal, with or without the vsvars32.bat running first, even though the output of the registration displays the ‘the system cannot find the path specified” error message. Weird.
I was hoping to debug the entry points by running the OCX by specifying the exe to use, in this case regsvr32.exe, however either because OCX debugging does not support this feature or VS2010 does not. I know that newer versions of Visual Studio can debug DLLs by specifying an exe, as I have done that many times. No luck this route.
Thoughts?