Install the SDK
The SoftActivate SDK is the free client library your application embeds. One SDK covers both halves: a native C++ library and a .NET assembly usable from C# and VB.NET.
The SDK is the client for the SoftActivate Web Services (SWS) platform - that is the
sws/SWS stem you will meet in the code: sws.dll (native), SWS.dll (.NET,
namespace SWS.Licensing) and the sws:: C++ API. The packages themselves carry
the product name: the softactivate-sdk archives and the SoftActivate.Sdk
NuGet package.
Downloads and packages
All artifacts are on the SDK download page, with a published
SHA256SUMS.txt. Windows binaries are Authenticode-signed.
| Artifact | Contents |
|---|---|
softactivate-sdk-beta.zip |
One multi-platform package: headers, prebuilt libraries and samples for every supported platform, the .NET assembly, the NuGet package |
softactivate-sdk-beta.msi / .exe |
The same package as a Windows installer (per-user, no elevation) |
NuGet package SoftActivate.Sdk |
The .NET assembly on its own (.NET 8), also included in the archive |
Filenames carry the release channel rather than the version (-beta today, no
suffix at GA), so a download link never goes stale - the exact version is in the
VERSION file inside every package and in the installer properties. Always use
the newest build from the download page.
Where everything is
Each bin/<platform>/ folder in the package holds everything for that platform in
one place - the prebuilt library, the built sample executables, the demo
certificate, and on Windows the Licensing Demo:
bin/x64-windows/ sws.dll, sws.lib, quickstart_cpp.exe,
licensing_demo.exe
bin/x64-linux/ libsws.so, quickstart_cpp
bin/dotnet/ SWS.dll, quickstart_csharp.exe, quickstart_vbnet.exe,
SoftActivate.Sdk..nupkg
One note for products that ship a native application and a .NET tool together:
sws.dll and SWS.dll cannot share one folder on Windows (filenames are
case-insensitive) - keep the managed part in its own subfolder.
Native C++
The SDK exposes two public headers, softactivate/sws.h for transport and errors and
softactivate/sws_licensing.h for the licensing domain, through a stable C-style
interface with header-only C++ wrapper classes in the sws::licensing namespace.
Installed builds export a CMake package:
find_package(sws CONFIG REQUIRED)
target_link_libraries(your_app PRIVATE sws::sws)
.NET (C# / VB.NET)
Add the NuGet package - the assembly inside is SWS.dll, the namespace you import
is SWS.Licensing, and both languages consume the same assembly:
dotnet add package SoftActivate.Sdk
The configuration surface
Every integration, in every language, configures four things:
| Setting | What it is |
|---|---|
| Service endpoint | https://lm.sws.softactivate.com for the hosted service (or your Licensing Server's URL) |
| Vendor id | your tenant's id, shown in the console under Settings |
| License key | the customer's key, minted in the console |
C++
#include "softactivate/sws_licensing.h"
// create a licensing client pointed at the activation endpoint
auto client = sws::licensing::client::create(endpointUrl);
// your tenant's licensing domain - license certificate chains are
// validated against ca.<this domain>
client->set_metadata("trusted_domain", trustedDomain);
// your vendor id and the customer's license key (both live in the console)
client->set_vendor_id(vendorId);
client->set_license_key(customerLicenseKey);
// your product's Reference Id (console -> Products) - binds licenses to
// THIS product; a key sold for a different product is refused
client->set_product_id("YOUR_PRODUCT_ID");
C#
using SWS.Licensing;
// create a licensing client pointed at the activation endpoint
var client = new LicensingClient(endpointUrl);
// your tenant's licensing domain - license certificate chains are
// validated against ca.<this domain>
client.TrustedDomain = trustedDomain;
// your vendor id and the customer's license key (both live in the console)
client.VendorId = vendorId;
client.LicenseKey = customerLicenseKey;
// your product's Reference Id (console -> Products) - binds licenses to
// THIS product; a key sold for a different product is refused
client.SetProductId("YOUR_PRODUCT_ID");
VB.NET
Imports SWS.Licensing
' create a licensing client pointed at the activation endpoint
Dim client As New LicensingClient(endpointUrl)
' your tenant's licensing domain - license certificate chains are
' validated against ca.<this domain>
client.TrustedDomain = trustedDomain
' your vendor id and the customer's license key (both live in the console)
client.VendorId = vendorId
client.LicenseKey = customerLicenseKey
' your product's Reference Id (console -> Products) - binds licenses to
' THIS product; a key sold for a different product is refused
client.SetProductId("YOUR_PRODUCT_ID")
Two optional knobs sit behind those four:
trusted_domain(native metadata key /TrustedDomainin .NET): the domain the SDK trusts when validating licenses; defaults to the endpoint host. For the hosted service, set it tosws.softactivate.com(the endpoint host is thelm.service subdomain).- Corporate TLS environments: natively, the
ca_cert_filemetadata key adds an extra TLS trust bundle (server verification always stays on); in .NET, pass your ownHttpClientto theLicensingClientconstructor instead.
Next: Quickstart: C++ or Quickstart: .NET.