Discuss this help topic in SecureBlackbox Forum

SetLicenseKey

Declared in     


Filter: C#  VB.NET  Pascal  C++  PHP  


Use this function to pass license key to the library.

Declaration

[C#]
    void SetLicenseKey(byte[] Key);

[VB.NET]
    Sub SetLicenseKey(ByVal Key As Byte())

[Pascal]
    procedure SetLicenseKey(const Key: string);

[C++]
    void SetLicenseKey(const std::string & Key);

[PHP]
    void SetLicenseKey(string $Key)

Parameters

  • Key - license key.

Description

This function must be called before any library use.

To set two or more license keys (when you have different license keys for different packages of SecureBlackbox) at the same time, just call SetLicenseKey several times, passing a different license key in each call. License keys are added, not replaced.
Note that as the keys are added, passing an evaluation license key together with a production license key will enforce evaluation restrictions, so be sure to remove the evaluation license key from the list of keys being set.

SetLicenseKey() is not intended to be called several times in different threads. Doing this can cause a deadlock or other side-effects. It is recommended that you make all calls to this function at the beginning of your application. If you for design reasons need to call it before performing some operation in a threaded environment, use a process-wide critical section or mutex to guard all calls to SetLicenseKey() and ensure that they are peformed sequentially.

The evaluation key is located in <SecureBlackbox>\LicenseKey.txt file and in all sample projects, shipped with SecureBlackbox.

Declared in

.NET:
  • Namespace: SBUtils.Unit
  • Assembly: SecureBlackbox
VCL:
  • Unit: SBUtils
Java:
  • Package: SecureBlackbox.Base.jar
C++:
  • sbutils.h

Discuss this help topic in SecureBlackbox Forum