TKeyGenParams passing Key as Empty

Post here messages if you have any problems with working of Enigma Protector
Enigma
Site Admin
Posts: 2413
Joined: Wed Aug 20, 2008 2:24 pm

Re: TKeyGenParams passing Key as Empty

Post by Enigma » Mon Dec 10, 2018 11:46 am

Also, try the following: rebuild the exe file, then run it directly from explorer (not from Visual Studio). Would be result the same?

I do not understand where the caption "Press any key..." comes from in your example?

Riski1588
Posts: 13
Joined: Wed Aug 22, 2018 10:54 am

Re: TKeyGenParams passing Key as Empty

Post by Riski1588 » Mon Dec 10, 2018 12:12 pm

Running from explorer is exactly the same.

The "Press any key" comes from Console.ReadKey()

Enabling Native DLL debugger I get the same exception as posted before:
Exception thrown at 0x0000000110003751 (keygen64.dll) in Test.exe: 0xC0000005: Access violation writing location 0x00000000D0F2985D.

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

Re: TKeyGenParams passing Key as Empty

Post by Enigma » Mon Dec 10, 2018 12:41 pm

We reproduced the problem on Windows 10, strange that other versions of Windows are not affected this issue.

Will keep you informed.

Riski1588
Posts: 13
Joined: Wed Aug 22, 2018 10:54 am

Re: TKeyGenParams passing Key as Empty

Post by Riski1588 » Mon Dec 10, 2018 12:45 pm

Perfect! Thought I was going insane! Thanks.

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

Re: TKeyGenParams passing Key as Empty

Post by Enigma » Mon Dec 10, 2018 1:43 pm

Thank you for the point to the very interesting problem!

We have found and fix that, thank you again.

Please use attached keygen64.dll The problem was affected x64 version of keygen only.
Attachments
keygen64.zip
(260.47 KiB) Downloaded 26 times

Riski1588
Posts: 13
Joined: Wed Aug 22, 2018 10:54 am

Re: TKeyGenParams passing Key as Empty

Post by Riski1588 » Wed Dec 12, 2018 10:05 pm

Thank you, whilst it does generate a registration key, the registration key appears to be invalid.

I've attached the CS files which show the problem and the enigma project.

The key generated in the test expires 15/12/2018 and is:
23744433232486285326311775417563147131225363221371456433345685872422125487824721568683778161436667557721742178
Attachments
tt.zip
(22.25 KiB) Downloaded 31 times

Riski1588
Posts: 13
Joined: Wed Aug 22, 2018 10:54 am

Re: TKeyGenParams passing Key as Empty

Post by Riski1588 » Thu Dec 13, 2018 12:02 pm

I noticed that when I was generating the KeyGenParams, I wasn't adding in the encrypted constant, so I've now added that in. I added in UseKeyExpiration (as somehow I missed that as well).

I've attached the updated code, funnily enough, the registration key outputted is still incorrect :(
Attachments
tt.zip
(24.55 KiB) Downloaded 28 times

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

Re: TKeyGenParams passing Key as Empty

Post by Enigma » Thu Dec 13, 2018 1:32 pm

Riski1588 wrote:
Thu Dec 13, 2018 12:02 pm
've attached the updated code, funnily enough, the registration key outputted is still incorrect
In your project file you have the option Registration Features - Common - Uncode enabled.

If so, the function KG_GenerateRegistrationKeyW should be used instead.
KG_GenerateRegistrationKey that you use is the same as KG_GenerateRegistrationKeyA and used for non-Unicode projects.

Riski1588
Posts: 13
Joined: Wed Aug 22, 2018 10:54 am

Re: TKeyGenParams passing Key as Empty

Post by Riski1588 » Thu Dec 13, 2018 1:56 pm

Enigma wrote:
Thu Dec 13, 2018 1:32 pm
In your project file you have the option Registration Features - Common - Uncode enabled.
Wow, something as simple as that. Cheers Enigma and great support as always.

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

Re: TKeyGenParams passing Key as Empty

Post by Enigma » Thu Dec 13, 2018 2:23 pm

Glad to help! :)

Post Reply