As promised, the beta version for SimpleLicensingSystem, aka SLS, is now available in beta. This first version is designed for .NET application, and will let you setup the licensing of your app in no time:
- - Add SLSLib.dll as a reference of your project
- - Create a instance of a TWLicense, with your product name and a private ID
- - Test the presence of a license with methods such as IsTrial or IsExpired
- - Allow your users to enter a license key to enable their license
A tool (SLSKeyGen) is included to generate your license keys.
A sample (in C#) is also included in the package. As you can see, it’s a less-than-10-lines piece of code.
More functions will come soon, such as a C++ API, a more optimized license format, and the possibility to use the license as a container for variables & files. Please contact me if you need more info about the project.
About the security:
The main goal of this project is to provide a very straightforward API. The license and the keys are heavily encoded, and shouldn’t be easy to crack, however the API itself is based on .net, and even it was obfuscated, it could still be reverse-engineered. On the other hand, it’ll do the job to protect your app from what a standard user can do. If someone skilled enough decides to crack your app, he will probably succeed, even if you spent big bucks in the security. That doesn’t mean I won’t improve the tool: the next version will be based on native code, with a lot more of security locks/checks. However, the main objective of this project will remain the ease of use.
Download the package
(you’ll need the .net 3.5 framework)
October 18th, 2011 in
| tags: .NET
It’s been a while since I didn’t post anything on my blog. As a result, there are plenty of news I’d like to share.
First of all, I fathered my first kid a little more than a month ago. (Which mainly explains why I was so silent on this blog). The name is Akio, and both the mom and the baby are healthy. We’re now both discovering the real value of sleeping…
Celine Piat, from LivingColors took many superb photos of the baby. If you need a professional photographer to take pictures of your wedding/baby/family, I couldn’t recommend you more to check her website.
It’s not the only good news: I also registered Teapot-Hosting as a company. There is sting many things to do, and things don’t go as fast as I wanted, but the business is on its rail. The website was reshaped, business cards were printed, and every user of the service seem to be happy.
As for Teapot, while the hosting is still the main activity, I also planned to release the tools I designed to help me to handle the business. Namely EasyBiz, a piece of software to handle customers/invoices/transactions with many cool features (graphical dashboard, customizable API, reports, plugins…). SLS, The licensing API and the keygen I use to deliver license keys for the Gametools Suite will also be released soon.
I’ll post here as soon as the betas are available.
I wanted to use the Paypal API from a C# project recently. Since they propose a SOAP interface for their API, I naïvely thought I could just consume it with the great “web reference” tool from visual studio.
However, I faced many disappointments: first, the WSDL contains errors, and if you want to use it in VS, you’ll have to manually download the wsdl (and every included definition files), correct the errors, and add a web reference from your locally modified WSDL.
This was not a good sign: clearly the people from paypal didn’t bother to check their WSDL, and on paypal forums, they suggest the complaining developpers to use their former web API (NVP).
I kept trying, and eventually could make VS create my web reference. But then faced another issue: the interface doesn’t match the informations you have. To access the API, paypal gives you an ID, a password, and a Signature string. There were several fields, but nothing was close to this, and there was absolutely no documentation.
On the paypal website, they suggest to use a .net 2.0 class library you have to compile, but I feel there is something wrong about this: First, what’s the point to publish a WSDL to expose a webservice if you need a special wrapper to use it correctly. Then, if we have to use a wrapper, then the old style API is more accurate, since it’ll avoid the SOAP overhead. And the binary they ask us to compile is fairly complex, so I really didn’t feel like using it.
Since I didn’t want to use the wrapper they suggested, and couldn’t consume their service directly, I decided to create my own class library to access the service.
It’s small, simple, and accurate (it uses the NVP).
So far, I implemented 2 method: TransactionSearch and GetBalance. The first will list all the transactions between 2 dates, and the second returns your current account balance. Both method are very straightforward:
PaypalMgr mgr = new PaypalMgr();
mgr.SetCredentials("paypal_api1.yyy.com", "MYAPIPASSWORD", "MyApiSignature");
double balance = 0;
// Prints the account balance
if (mgr.GetBalance(ref balance)) Console.Out.WriteLine("Current account balance: " + balance.ToString());
else Console.Error.WriteLine("An error occured: "+mgr.LastError);
// Prints all the transactions of the last you received during a month (until now)
List<PaypalTransaction> list = mgr.TransactionSearch(DateTime.Now.AddMonths(-1), DateTime.Now);
if (list == null) Console.Error.WriteLine("An error occured: " + mgr.LastError);
Console.Out.WriteLine("Last month transactions\n---------------------------------------");
foreach (PaypalTransaction pt in list) Console.Out.WriteLine(pt.ToString());
As you can see, it only takes a couple of lines to retrieve your balance or a transaction list. In order to use the PaypalMgr class, you only need to add TWCS.dll as a reference in your project. If you need to support more methods, don’t hesitate to contact me.
Download TWCS.dll: here
ps: for those who remember TeapotWare, twcs is the rebirth of the project, as a .net class library.
August 17th, 2011 in
| tags: Paypal API
Hello à tous,
Petit post rapide pour la vente de notre appartement sur Paris. 65m² proche de toutes commodités. 2 Chambres et un grand salon, WC séparés, cuisine récente, cave et parking. 390000 euros négociable.
Plus d’infos sur http://gruaz.net/appart
(I’m selling our flat in Paris. Check the above links for photos and details, and contact me if you need a translation)
I’m glad to announce the release of GameTools 1.2. As explained in a previous post, the biggest modification is the support of XNA 4.0. GXView has been completely reshaped, and so was the core of the suite.
Another major modification was the licensing model. Until now, the suite had an unlimited trial, and a “pay what you want” license. I decided to keep the “pay what you want”, but to remove the unlimited trial. Several features will now require a valid license to work. On the other hand, the annoying screen was removed, and all the experimental features will remain license free.
I am now working on the next release. Several issues have been reported during the beta, so my priority is to fix them. I also need to update the documentation, and to add software description on the website. Based on my own needs, I had several idea for the next release of gametools: Here below are projects I already prototyped.
- - A license manager (something you can use to protect your software, and generate license keys)
- - An automated builder, to allow you to simply batch build big projects
- - A php based versionning/source control system
Don’t hesitate to tell me what you would like to see in the suite.
The homepage of the project didn’t change: http://gruaz.net/projects/gametools. You can download the latest version from this page.
Finally, I would like to thank all the people who sent money, even the suite was still in a beta state. It really helped!
June 12th, 2011 in
| tags: Gametools