Activating a License

To activate a license, follow these steps:

  1. In Visual Studio, create a new project or open the code of your existing application. For more information on creating a new project, see the Microsoft documentation. It’s recommended to create a project that runs on .NET 6.0 or newer.

  2. Create a LicenseManager object in the code file where the application loads before using any of the methods of GdPicture.NET.

  3. Pass the license key to the RegisterKEY method of the LicenseManager object.

  4. Repeat this process for all the code files where you use GdPicture.NET SDK.

LicenseManager licenseManager = new LicenseManager();
licenseManager.RegisterKEY("LICENSE_KEY");
Dim licenseManager As New LicenseManager
licenseManager.RegisterKEY("LICENSE_KEY")
CLicenseManager licenseManager;
licenseManager.CreateDispatch(L"GdPicture14.LicenseManager");
licenseManager.RegisterKEY(L"LICENSE_KEY");
BSTR bstrLicense = ::SysAllocString(L"LICENSE_KEY");
if (bstrLicense != NULL)
{
   _LicenseManagerPtr licenseManager(__uuidof(LicenseManager));
   VARIANT_BOOL result = licenseManager->RegisterKEY(bstrLicense);
   ::SysFreeString(bstrLicense);
}
BSTR bstrLicense = ::SysAllocString(L"LICENSE_KEY");
if (bstrLicense != NULL)
{
   _LicenseManagerPtr licenseManager;
   licenseManager = (_LicenseManagerPtr)CreateComObject(CLSID_LicenseManager);
   licenseManager->RegisterKEY(bstrLicense);
   ::SysFreeString(bstrLicense);
   bstrLicense = NULL;
}
var
   LicenseManager1: Variant;
begin
   LicenseManager1 := CreateOleObject('GdPicture14.LicenseManager');
   LicenseManager1.RegisterKey('LICENSE_KEY');
var licenseManager;
licenseManager = new ActiveXObject('GdPicture14.LicenseManager');
licenseManager.RegisterKey('LICENSE_KEY');
long ll_result
OLEObject licenseManager
licenseManager = CREATE OLEObject
ll_result = licenseManager.ConnectToNewObject("GdPicture14.LicenseManager")
licenseManager.RegisterKey("LICENSE_KEY")
Dim licenseManager As New LicenseManager
Call licenseManager.RegisterKEY("LICENSE_KEY")
Dim licenseManager As New GdPicture_NET_14.LicenseManager
licenseManager.RegisterKey ("LICENSE_KEY")