Page 1 of 1

Print the HwId

Posted: Sun Jan 17, 2021 6:14 am
by BackGroup
Dears
I'm trying to print on screen the HwId, I use C# and call this method as documentation:

public class Enigma_IDE
{
[DllImport("enigma_ide.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.StdCall)]
public static extern string EP_RegHardwareIDW();
}

using it like this:
string hwId = Enigma_IDE.EP_RegHardwareIDW();
Console.WriteLine(hwId);

The method return nothing
where I'm making mistake??

Re: Print the HwId

Posted: Mon Jan 18, 2021 8:45 am
by Enigma
Hi, you need to protect the file first.

Enigma API functions work only in protected file. If the file is not protected, all functions returns zero or just fail.

Re: Print the HwId

Posted: Fri Jan 22, 2021 3:13 am
by BackGroup
Dear Thanks I have solved the issue.
But a I have a question, every time that I want to test some code I constricted to protect the file and run the app, this comports continuous code changing otherwise the the method EP_RegHardwareID() return an empty value and through an exception.
is there any easy way to interact with enigma_ide.dll without protecting it all the times, maybe load something or some extension in Visual Studio?

Re: Print the HwId

Posted: Wed Feb 03, 2021 8:14 am
by Enigma
Hi, currently there is no such way, but we are working on that and hope it will appear in next version update!

Re: Print the HwId

Posted: Thu Feb 04, 2021 6:42 pm
by Enigma
Just to update the thread. We have made a solution for above question.

Starting from version 6.90, you could place a file enigma_ide.ini/enigma_ide64.ini into the folder with enigma_ide.dll/enigma_ide64.dll

INI files contain settings that are used by the dll to emilate the protection.

You can specify any settings for dlls to return from Enigma API when the files is not protected, while debugging.

Please contact us at support@enigmaprotector.com to obtain this new version.