Hi, I compiled the sample in VS2017 fine, and it crashes on startup with "Unable to load DLL 'enginma_ide.dll".
I have checked, there is a enginma_ide.dll at the folder root, and I place a copy in the bin\Debug and bin\Release folder too.
C:\Program Files (x86)\The Enigma Protector\Examples\HardwareID\C# (.NET)
************** Exception Text **************
System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
at Enigma_IDE.EP_RegHardwareID()
at Enigma_IDE.EP_RegistrationHardwareID()
at Test.frmMain.frmMain_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Crash with sample HardwareID C#
Re: Crash with sample HardwareID C#
Hi, you need to protect the file before you run it. Note, Enigma API will work only after protection.
If you would like to run it unprotected, compile the problem with x86 CPU (there is Any CPU now).
There is some specific for .net files which are compiled with Any CPU feature.
If you would like to run it unprotected, compile the problem with x86 CPU (there is Any CPU now).
There is some specific for .net files which are compiled with Any CPU feature.
-
- Posts: 13
- Joined: Wed Oct 24, 2018 12:55 am
Re: Crash with sample HardwareID C#
Hmm, I recompiled to x64, and protect it (default settings with hardware lock, demo version)
It still crashes on startup. If I add enigma_ide.dll in the VirtualBox Files, it just silently quit after the "Click on the window to continue execution"
It still crashes on startup. If I add enigma_ide.dll in the VirtualBox Files, it just silently quit after the "Click on the window to continue execution"
Re: Crash with sample HardwareID C#
Make sure that your enigma_ide.dll is 64 bit
-
- Posts: 13
- Joined: Wed Oct 24, 2018 12:55 am
Re: Crash with sample HardwareID C#
This is the interesting part, I download the 64bit protector, it installs in c:\program Files (x86), which means it's 32bit?
I used dependency walker to check, and the dll does seems to be 32bit. All of them
I used dependency walker to check, and the dll does seems to be 32bit. All of them
-
- Posts: 13
- Joined: Wed Oct 24, 2018 12:55 am
Re: Crash with sample HardwareID C#
Ok, I saw the problem. There is a enigma_ide64.dl but the sample folder supply the 32bit dll and dllimports it. Solved
Re: Crash with sample HardwareID C#
Enigma Protector itself is 32 bit application (x86 and x64 versions), but this does not matter. They are used for protection of 32 bit and 64 bit files.overenigma wrote: ↑Thu Oct 25, 2018 12:59 am I used dependency walker to check, and the dll does seems to be 32bit. All of them
Please note, enigma_ide64.dll is used if your .net application is compiled with x64 CPU.overenigma wrote: ↑Thu Oct 25, 2018 1:10 am Ok, I saw the problem. There is a enigma_ide64.dl but the sample folder supply the 32bit dll and dllimports it. Solved
We still recommend to use x86 version of Enigma and compile your .net application with x86 CPU.