C++
C++ needs header files. Depending on the compiler you use they can be automatically created.
First download the c++ sample you need from the FAQ area on our website (there is a sample for C++ with MFC and without MFC)
Using C++ with MFC
Find below how to add a DLL to Visual Studio C++
• | In Visual Studio right click on the project and Add a new class |
• | Choose type "MFC class from TypeLib" |
• | In the Class Wizard set "Add class from file" and select in "Location" the DLL you have just registered. The DLL can be found in the folder ....\Licence Protector\3.0\files for distribution\signed-uncompressed |
• | Press Button ">>" to generate the class from the provided interface |
• | Keep the Name (e.g. CLicProtectorEasyGo300.h) and press "Finish" |
• | Now you have a file CLicProtectorEasyGo300.h in your project. |
• | In file EasyGoDemoView.cpp sample modify the line using the latest version number |
#include "CLicProtectorEasyGo300.h"
• | In function CEasyGoDemoView::ProtectMe() adapt the lines |
CLicProtectorEasyGo300 licProtector; // Licence Protector object
// Create the automation object
BOOL bRes = licProtector.CreateDispatch("LicProtectorEasyGo.licProtectorEasyGo300");
• | Rebuild the project |
Using C++ without MFC
• | The DLL can be imported in a c++ project by adding the following line at the top of the source code: |
#import "progid:LicProtectorEasyGo.LicProtectorEasyGo300
• | All neccessary include files are generated automatically. |
• | To create an instance of the Licence Protector object the following lines are needed: |
CoInitialize(NULL);
ILicProtectorEasyGo300* lp = NULL;
CoCreateInstance(__uuidof(LicProtectorEasyGo300), NULL, CLSCTX_INPROC_SERVER, __uuidof(ILicProtectorEasyGo300), (void**)&lp);
Only if the #import command is not available with your C compiler use the following method to build a header file
#include "CLicProtectorEasyGo300.h"
CLicProtectorEasyGo300 licProtector; // Licence Protector object
// Create the automation object BOOL bRes = licProtector.CreateDispatch("LicProtectorEasyGo.licProtectorEasyGo300");
|
Additional information
The latest information about the ProgID, ClASSID, IID, LIBID can be found here.
As Licence Protector is a COM server DLL it is used the same way you would integrate a Word automation. Just google for - Word Automation DLL C++ to find guides for different compilers.
Code Protection with Multimedia Protector
To protect the code against de-compilation or reverse engineering, you can combine Licence Protector with Multimedia Protector for a special bundle price.
See chapter: Code Protection / Decompile Protection