I recently registered a commercial copy of the registration component.
On my first try, the confirm_requested function always returns 0 even if a valid registration key is given or the serial and the registration key both are empty.
My environment: Win XP SP2, Borland BDS 2006, NSIS.
My steps to get a valid registration key:
1. Creating the secret code for the app as described in the documentation (e.g. testApp).
2. Creating the reg DLL as described in the documentation (reg+AppName+.DLL, e.g. regtestApp.dll)
3. Creating a registration key for the application using a serial for testing purposes (e.g. serial = Testenterprise Inc.)
I will register copies of my software thru the a build-in function and not thru the NSIS installation process.
There are several editions of the program so I'm using a key to get different license keys depending on the edition of the program to register, e.g.: 'S-Testenterprise Inc.', where 'S' means the edition and 'Testenterprise Inc' is the serial.
Now on entering valid registering data or not valid registering data the call to 'confirmed_registered' always returns '0'.
I have no idea what might be wrong and I would be glad for every help.
Best regards
Christian

![View your cart items []](/sites/all/modules/ecommerce/cart/images/cart_empty.png)

Thanks a lot, it works perfecly
Clay,
again many thanks for your help. Now registration works perfectly. The verification of the DLL will be build into the app before it will be released in September.
Though I'm not familiar to C / C++ I will have a close look at your sample.
Best regards
Christian
confirm_registered always returns 0
Clay,
first of all many thanks for your help. Because another project did hit me this week I couldn't go further testing your suggestitons. I will do so on next monday 08/27/2007 and then I will report success to you.
Best regards
Christian
A Delphi Solution
I managed to test out my theory this morning. Try using the following for your import module:
You'll need to replace 'regtest1.dll' with your DLL's name. What you do in your application will obviously be different, but here's how I checked the registration code in my application:
procedure TfrmTestApp.btnRegisterClick(Sender: TObject); var ser: PChar; reg: PChar; begin ser := PChar(edtSerial.Text); reg := PChar(edtRegistration.Text); if confirm_registered(ser, reg) = 1 then begin ilStatus.GetBitmap(2, imgStatus.Picture.Bitmap); imgStatus.Refresh; end else begin ilStatus.GetBitmap(1, imgStatus.Picture.Bitmap); imgStatus.Refresh; end; end;You should also do a verification of the DLL to make sure somebody didn't swap it out on you. I showed how to do it in C in A Working 30 Day Trial Application, but for Delphi you'll obviously need a slightly different solution. Also, make sure you use the registrationsanity.exe program I included in that post to generate your md5 hash. The md5 hash generated by genreg.exe isn't a proper md5 hash (note the 17 characters instead of the standard 32).
Let me know if this solution works for you. If it doesn't we'll have to see what else we can come up with.
--
Clay Dowling
President
Lazarus Internet Development