EP_RegCheckAndSaveKey works differently on Windows 7 and XP

Post here messages if you have any problems with working of Enigma Protector
Post Reply
domador
Posts: 12
Joined: Fri Mar 25, 2011 8:08 pm

EP_RegCheckAndSaveKey works differently on Windows 7 and XP

Post 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.)
scorillo7
Posts: 90
Joined: Mon May 11, 2009 11:16 am

Re: EP_RegCheckAndSaveKey works differently on Windows 7 and

Post by scorillo7 »

You run the protected application on the admin rights under WIN7?
Enigma
Site Admin
Posts: 3085
Joined: Wed Aug 20, 2008 2:24 pm

Re: EP_RegCheckAndSaveKey works differently on Windows 7 and

Post 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%
domador
Posts: 12
Joined: Fri Mar 25, 2011 8:08 pm

Re: EP_RegCheckAndSaveKey works differently on Windows 7 and

Post 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!
Enigma
Site Admin
Posts: 3085
Joined: Wed Aug 20, 2008 2:24 pm

Re: EP_RegCheckAndSaveKey works differently on Windows 7 and

Post by Enigma »

Thanks domador, you are welcome :)
Post Reply