Cryptonite Compile error 158 LoadDLLs() Could not open mssign32.dll

I wanted a fresh install of Clarion on my computer so I install the latest version of Clarion 11.1.13845./

I added back all of my 3rd party extensions.
I updated all of my Capesoft extensions to their latest version.
For Nettalk I am running the latest version of Nettalk 12.
I have updated my Noyantis extensions to the latest version, 23.08.31
I have updated my Codejock to 22.1
I updated my image folder with any missing .ico file that I had added.

When I compile my Application I get the following error:


Not sure where to go next to correct this.

Do you have more than one instance of Cryptonite? I wonder if the lack of a FreeLibrary() on self.hLibMsSign could be the issue.

MsSign32.Dll is part of windows since Windows XP and Windows Server 2003.
It sounds like you are missing this file. On my machine it’s in \windows\System32 and windows\SysWow64.

It’s loaded in the _LoadDLLs method, and makes the SignerSign and SignerSignEx functions available.

I expect your build of Windows is either missing these files, or your AV is blocking access to them.


The file is actual located in both locations.

I did the same installation on my home computer that does not have the stringent AV protection my work computer does and I get the same error.

My application was compiling my app without issue before I did the upgrade to the latest version of Clarion, I was on 11.1.13815 and upgraded to 11.1.13845. I have gone back down to 11.1.13815 but I am still getting the error. The only other major upgrade was my Noyantis extension were I went from version 6 to 23.08.31 and Codejock 22.1.

Why would it work before the upgrades and not after?

I picked another one of my apps that has Cryptonite and SecWin7 installed on it and it compiled without any issue. Apparently I broke my one app during the upgrade

Hi Bruce - Where is it unloaded?

It’s not manually unloaded Jeff, it’s unloaded when the program terminates.

Here is where I am at, If I use Clarion 11.1.13810 and Noyantis 6.0 extensions my Application compiles without any issue. If I upgrade to the Noyantis extentions to 23.08.31, I get the error shown above.

But only for this one application.

New update, The one application that was compiling with the new version of the Noyantis extensions 23.08.31 was set to Codejock Version 19.3.

I changed the Codejock version on my App to 20.3 and it compile without any errors.
I then changed the Codejock to version on my App to 22.0 and it compiled without any errors.
Switching it to Codejock Version 22.1 and I get the cryptonite error shown above.

This looks to be a Noyantis issue, Andy…?

Just replying to tag @noyantis into the conversation.

1 Like


I like to focus on the Error message I have, then review the code and calls showing that message.

What code in _LoadDLLs() is throwing that 158 error message?
Was there a particular failing function call returning 158?

If Error 158 is a Windows Error from GetLastError() that is #Define ERROR_NOT_LOCKED 158 (0x9E) with a description of “The segment is already unlocked.” Searches show related to calling LocalUnlock(). So probably not the call causing it?