3

From my previous question, SOLIDWORKS ErrorCode:1722 CA:Register_DocMgrDLL, I am missing the swdocumentmgr.dll library. So I downloaded the library from https://error-dll.info/file/swdocumentmgrdll and paste it in the C:\Program Files\Common Files\SOLIDWORKS Shared directory. When I try to register that library by

C:\Windows\System32>regsvr32 "C:\Program Files\Common Files\SOLIDWORKS Shared\swdocumentmgr.dll"

I get: The module C:\Program Files\...\swdocmentmgr.dll failed to load, make sure the binary is stored in specified path. But it is in the path (in the directory). I have even tried to do it with administrator privileges but to no avail. How should I then load that library in order to install the solidworks?

I have tried to cd in the directory of the library but still the same error:

C:\>cd "C:\Program Files (x86)\Common Files\SOLIDWORKS Shared"

C:\Program Files (x86)\Common Files\SOLIDWORKS Shared>dir Volume in drive C is Windows Volume Serial Number is D4F4-75C5

Directory of C:\Program Files (x86)\Common Files\SOLIDWORKS Shared

10/20/2020 04:28 PM <DIR> . 10/20/2020 04:28 PM <DIR> .. 10/20/2020 04:28 PM 0 dir 10/19/2020 05:51 PM <DIR> Service 10/20/2020 01:34 PM 6,325,544 swdocumentmgr.dll 2 File(s) 6,325,544 bytes 3 Dir(s) 28,109,045,760 bytes free

C:\Program Files (x86)\Common Files\SOLIDWORKS Shared>regsvr32 swdocumentmgr.dll

Gets the same error -> the module swdocumentmgr.dll failed to load even in the directory

I do not know whether the dll library could be register by regsvr32.exe, but that is at least what SolidWorks installer is trying to do:

17:57:04    Error   Status  149 0   "Product:SOLIDWORKS ErrorCode:1722 CA:Register_DocMgrDLL.A48C1CF2_EBF8_48E8_ACAD_68CA04F776A2 Location:C:\Windows\system32\ Command:regsvr32 "regsvr32 “C:\Program Files\Common Files\SOLIDWORKS Shared\swdocumentmgr.dll" /s"
17:57:46    Warning Message 9   55200   "Dialog Shown: {0: Internal error: The Windows Installer for this product component did not run as expected: Register_DocMgrDLL.A48C1CF2_EBF8_48E8_ACAD_68CA04F776A2.: Contact Technical Support.}.  User selected: {1: 1}"
17:58:21    Info    Status  58  55803   "Received data from Installation Manager server (Script: {0: http://im.solidworks.com/2019/Connect.aspx?Release=20190-40500-1100-100&Debug=0&ini=0&osa=8192:0:2&lid=1033&app=I&cx=4097:6&cm=-1&lfr=&lfp=&lfv=}, Code: {1: 0}, Error: {2: }, File: {3: <none>})"
18:00:02    Error   Status  156 0   "***START DUMP OF WINDOWS INSTALLER DATA***"
...

emphasizing this part:

Command:regsvr32 "regsvr32 “C:\Program Files\Common Files\SOLIDWORKS Shared\swdocumentmgr.dll" /s"

So the installer is surely trying to execute the regsvr32.exe upon the swdocumentmgr.dll library. (So when I first encounter the error, I tried it register myself exactly as seen above, and when I could not register it manually, then it makes sense that the installer could not too).

EDIT: what libraries (with relation to solidwork I have right now):

c:\Windows\SysWOW64\zlib.dll
c:\Program Files (x86)\Common Files\SOLIDWORKS Shared\zlib.dll
c:\Windows\SysWOW64\swdocumentmgr.dll
c:\Program Files (x86)\Common Files\SOLIDWORKS Shared\swdocumentmgr.dll

2 Answers2

2

EDIT: It seems that that this problem on the poster's Windows 10 (and mine) comes from having a Windows 10 system that was upgraded. Perhaps some previous software remnant causes this problem. For the poster, a complete reinstall of Windows 10 has "fixed" the problem.


I have looked into this DLL, and I don't think that it's usable on Windows 10.

I have first looked into the digital certificate with which it's signed, created for Dassault Systemes SolidWorks Corp., valid from June 2007 to June 2012. The certificate has elapsed, but that should not be a problem since an elapsed certificate is still valid. Just in case, I digitally resigned the DLL, but this didn't change anything.

I have then looked into the question of missing dependencies and loaded the DLL into the Dependency Walker, which gave me a heap of errors. The error that worries me is:

Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module

This message means that the DLL (or a DLL that it imports) has an import from another DLL (call it bad.dll). When the Dependency Walker scans bad.dll, it finds that it does not export the required function. This missing export is most likely the reason that regsvr32 fails to load the DLL in order to register it.

In other words, the DLL references a Windows API function that doesn't exist any more.

To verify further, I analyzed the DLL using PEStudio, which found many details that it didn't like, of which the most serious are:

The count of imports is suspicious,count: 1264
The file imports deprecated function(s),count: 54
The file imports undocumented function(s),count: 1
The file imports anonymous function(s),count: 605

The part that worries me here is the number of anonymous functions, meaning entries in Windows DLLs that are referred-to by their ordinals and not by name. If the ordinals have changed in later versions of Windows, this can cause havoc.

From the date of the digital signature, I would say that the SolidWorks software was developed on Windows Vista or at most early Windows 7. The problem can't be with a wrong Visual C++ redistributable, because I have on my computer basically installed all the versions, up to and including for 2005.

You might have better luck creating a virtual machine of Windows Vista or Windows 7 and installing SolidWorks in there, than in Windows 10.

harrymc
  • 498,455
0

It looks like as if you are running into some form of the Windows automatic path-redirection mechanism for 32 bit binaries on a 64 bit system.

Try this:

  • Start a Command Prompt or PowerShell with admin-rights (needed to register the DLL anyway).
  • Change current directory to the folder where the DLL is located and then run regsvr32 while specifying the DLL name without a path.
Giacomo1968
  • 58,727
Tonny
  • 33,276