Page 1 of 1
EP_RegCheckAndSaveKey works differently on Windows 7 and XP
Posted: Fri Mar 25, 2011 8:25 pm
by domador
I'm able to verify and save keys on Windows XP but not on Windows 7. When I call EP_RegCheckAndSaveKey with a valid name and key, it returns 1 on Windows XP but 0 on Windows 7. (If I run it in Windows 7, but in compatibility mode for Windows XP SP 3, it works correctly, returning 1 for valid keys.) Please help me get it working correctly! I am using Enigma Protector with
REAL Studio 2010 Release 5 Professional. The API call within my code looks like this:
Dim lResult as Int16
Declare Function EP_RegCheckAndSaveKey Lib "enigma_ide.dll" (ByVal Name As CString, ByVal Key As CString) As Short
lResult = EP_RegCheckAndSaveKey(sUsername, sKey)
I am using Enigma Protector 2.04. For testing I am using Windows 7 Ultimate 32-bit (and XP Mode for Windows XP testing.)
Re: EP_RegCheckAndSaveKey works differently on Windows 7 and
Posted: Sat Mar 26, 2011 6:56 am
by scorillo7
You run the protected application on the admin rights under WIN7?
Re: EP_RegCheckAndSaveKey works differently on Windows 7 and
Posted: Sat Mar 26, 2011 10:58 am
by Enigma
Hi domador,
I'm sure that your problem is quite simple.
EP_RegCheckAndSaveKey fails (return zero) not only registration information is incorrect, but also if the Enigma was not able to save it. I think it is your case.
Take a look at the place where you are storing registration information, REGISTRATION FEATURES - Registration Data Storing panel.
- if you are using Registry, make sure you are using HKEY_CURRENT_USER, because HKEY_LOCAL_MACHINE is not writeable in Windows 7 without administrator rights
- if you are using File system and %DEFAULT FOLDER% and you install your program in "Program Files" - "Program Files" folder is also write protected in Windows 7. You will have to use some folder like %My Documents FOLDER% or %ApplicationData FOLDER%
Re: EP_RegCheckAndSaveKey works differently on Windows 7 and
Posted: Sat Mar 26, 2011 2:10 pm
by domador
Enigma,
Thank you very much for your prompt reply. You described the exact cause of and solution to the problem! I changed the destination to HKEY_CURRENT_USER and now EP_RegCheckAndSaveKey works as I desired on Windows 7 and XP. You were correct, the problem was quite simple.
Incidentally, thanks also for creating Enigma Protector. I've found very few software protection systems that work with REAL Studio. Of the few that I found, yours was the best by far. I'm very happy with it!
Re: EP_RegCheckAndSaveKey works differently on Windows 7 and
Posted: Sun Mar 27, 2011 7:52 am
by Enigma
Thanks domador, you are welcome
