Do EP_RegSave/Check change the input parameters?

Post here any topics that related to Enigma Protector, its functionality, your misunderstanding, offers to improvements etc etc etc
Post Reply
rii
Posts: 8
Joined: Fri Aug 13, 2010 5:29 pm

Do EP_RegSave/Check change the input parameters?

Post by rii » Fri Aug 13, 2010 6:17 pm

Hi
I am investigating the possibility to use Enigma for protection of my new software product. And the first issue, which appears is missing "const" specifier in mentioned arguments of functions. Or will these functions modify their input parameters anyway?
Of course I can "const_cast" but this solution grows from one place I think.

Thanks

scorillo7
Posts: 90
Joined: Mon May 11, 2009 11:16 am

Re: Do EP_RegSave/Check change the input parameters?

Post by scorillo7 » Sat Aug 14, 2010 10:29 am

Hello rii,
"EP_RegCheckAndSaveKey function serves for verifying and saving the registration information. It combines couple functions EP_RegCheckKey and EP_RegSaveKey. If the registration information is valid for current project then it will have been saved, otherwise function fails.

Parameters
Name - registration name - pointer to the null terminated ansi string.
Key - registration key - pointer to the null terminated ansi string.
Return Value
If the function succeeds, the return value is 1. If the function fails, the return value is 0.

Remark
UNICODE Registration Scheme should be disabled at REGISTRATION FEATURES - Common panel.
The function fails in the following cases:

the registration information is incorrect;
there is an error while saving of registration information (it can occurs due to protection to write files on the drive or entries of the registry);
application is not protected.
"

and will see examples in the dir of Enigma , nobody complain about that api until now.

Please be more explicit.
REMEMBER this is just a Enigma user's opinion and is pure unofficial
Your freedom stops where another man freedom begin.

Enigma
Site Admin
Posts: 2516
Joined: Wed Aug 20, 2008 2:24 pm

Re: Do EP_RegSave/Check change the input parameters?

Post by Enigma » Sun Aug 15, 2010 10:22 am

Hi rii,

No, these functions do not change the input parameters. To simplify parameters passing Enigma requires just a pointer to the buffer where the registration name and key are located. Same pass method are using most of Windows API, and it is made so for the compatibility with the different compilers.

You do not have to do any type casts I think, current pointers schema is quite easy!

If you have any problems (types casting and so on), just post your code here and I will help!

scorillo7 thanks for the helpful comment!

Post Reply