Protecting a C++ Builder application
Last updated
Last updated
I attach my adaptation of vc10 sample project, for protecting a C++Builder application. Details follow.
Development
You also need to run command prompt with elevated privileges and do (I use .NET 2.0, but you can use .NET 4.0 if you have the DLL for such framework) - C:\Windows\Microsoft.NET\Framework\v2.0.50727\regasm /tlb "C:\...etc...\TestQlmWizard\Win32\Debug\license\QlmLicenseLib.dll"
- C:\Windows\Microsoft.NET\Framework\v2.0.50727\regasm /codebase "C:\...etc...\TestQlmWizard\Win32\Debug\license\QlmLicenseLib.dll"
Then in C++Builder do (this creates COM wrapper units, in my attached project they are already there, but it could be better to generate them in your workstation):
Component > Import component... > Import a Type Library > select QlmLicenseLib Unit Dir Name = <my project folder> and uncheck "Generate Component Wrappers" "Add unit to TestQlmWizard.cbproj project" > Finish
Create configuration files (.lw.xml and .lw.ui.xml) for QlmLicenseWizard.exe, with "Protect your application" in QLM program (they are already there in my attachment but you have to generate yours).
Distribution
- inside the executable folder create a folder named "license" (as you can see in my attached project), in which you have to insert (depending on .NET version on the target machine (2.0 or 4.0)) - either .net 2.0/QlmLicenseLib.dll or .net 4.0/QlmLicenseLib.Net4.dll (rename it QlmLicenseLib.dll to make it coherent) - either .net 2.0/QlmLicenseWizard.exe or .net 4.0/QlmLicenseWizard.exe if none of these .NET versions is present prompt the user for installing one of them - x86\IsLicense50.dll - x64\IsLicense50.dll - configuration files for QlmLicenseWizard.exe, created with "Protect your application" in QLM program: - My application 1.2.lw.xml - My application 1.2.lw.ui.xml - depending on .NET version on the target machine (2.0 or 4.0) register the DLL running either C:\Windows\Microsoft.NET\Framework\v2.0.50727\regasm /codebase QlmLicenseLib.dll or C:\Windows\Microsoft.NET\Framework\v4.0.30319\regasm /codebase QlmLicenseLib.dll - configure LicenseValidator constants correctly for your application