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
milanHrabos
  • 83
  • 2
  • 7
  • The error message starts with c:\windows... which is odd given that command above. Can you supply the whole text of the error message? – Tonny Oct 20 '20 at 12:52
  • @Tonny sorry, misspelled from the error. The error just give the full path to the library. – milanHrabos Oct 20 '20 at 12:58
  • Are you using the correct (32-bit) version of `regsvr32`? Also, are you sure this DLL can even be used with `regsvr32`? Not every DLL can be. – Daniel B Oct 22 '20 at 17:57
  • @DanielB see the edits. It was not me trying to register that library, but the installer. I assume the library is very important for the SolidWorks, yet I did not installed the library (so I have to downloaded it from http://www.dll-found.com/swdocumentmgr.dll_download.html) and manually paste it in the "SOLIDWORKS Shared" directory (where is should be) and to the `C:\Windows\SysWOW64` directory. And then execute the `regsvr32.exe` (see from the post). But I have no idea if the `swdocumentmgr.dll` could be registered that way, but since the SW installer is trying to do, I assume so – milanHrabos Oct 22 '20 at 19:35
  • @DanielB also see the previous question (first line of this post), here: https://superuser.com/questions/1595604/solidworks-errorcode1722-caregister-docmgrdll?noredirect=1#comment2431741_1595604 – milanHrabos Oct 22 '20 at 19:36
  • Again: Are you using the correct version of `regsvr32`? With 32-bit DLLs you _must_ use the 32-bit version in `C:\Windows\SysWOW64`! This is not what you get by default in Command Prompt. – Daniel B Oct 23 '20 at 06:39
  • @DanielB the `swdocumentmgr.dll` I downloaded from here: https://error-dll.info/file/swdocumentmgrdll --> 64x version, pasted it in `C:\Windows\SysWOW64` and call `regsvr32` from there (exactly what you are suggesting), still the same error – milanHrabos Oct 23 '20 at 17:11

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
  • 455,459
  • 31
  • 526
  • 924
  • I solved it. By fully reinstalling the windows10. I do no like my solution I am quite disappointed that company like SolidWork is unable to manage proper installation and removal of their product. The problem occurred once I remove The SW because of not enough space on disk `C:\`. But while the removal, important libraries (like `swdocumentmgr` were also removed, without my intention). But I do not think the problem is on the side of these companies trying to produce their products. But the way Windows works. Unfortunately. – milanHrabos Oct 29 '20 at 23:17
  • I should not write biased opinions, but for me the Win10 is the most fragile OS I used. It is full of libraries incompatible or older from other-older version of the system, buggy system. But unfortunately the Win is "standard" in companies and universities. So I have no other option to have it installed at least as side OS (Alongside with Ubuntu say). And the only reason I have it is because of the `SolidWorks` and its requirement for registry system. If my university give me a freedom to use another CAD system available for linux, I would readily use that instead. That said. – milanHrabos Oct 29 '20 at 23:21
  • Anyway, thanks for your analysis of the library. I do not know the system of registering and versioning dynamic libraries in Windows yet. – milanHrabos Oct 29 '20 at 23:24
  • It seems that that the problem on your previous Windows 10 (and mine) comes from having a system that was upgraded. Some previous software remnant causes this problem. So the reinstall has "fixed" the problem. – harrymc Oct 30 '20 at 05:58
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
  • 53,069
  • 19
  • 162
  • 212
Tonny
  • 29,601
  • 7
  • 52
  • 84