Install the native library

Install .NET

The DeviceAPI for native programs depends on .NET6.
It may also work with .NET5. But note that .NET5 reaches end of life in May 2022.
Install the .NET SDK or the runtime or the .NET Desktop runtime for Windows.

The .NET installation should put a hostfxr library into a directory
DOTNET_ROOT/host/fxr/VERSION/hostfxr/
where DOTNET_ROOT and VERSION vary.

On Linux and MacOS

 -  Consider setting the DOTNET_ROOT environment variable to the directory of the dotnet program
such that the command "$DOTNET_ROOT/dotnet --version" works.

-  Install the library libgdiplus.

Fetch a release

To get the DeviceAPI library fetch a release for your platform
and deploy it by extracting the release archive to a suitable location.



The archive contains a shared library

SigDeviceAPI.WrapperNE.dll on Windows or
SigDeviceAPI.WrapperNE.so on Linux or
SigDeviceAPI.WrapperNE.dylib on MacOS.

Make sure that your app can find that shared library.

One way to achieve this is to put the application to the same folder,

Another way is to deploy the native DeviceAPI to one of your operating system's standard directory for shared libraries,

Yet another way is to deploy the native DeviceAPI to a custom directory and add that directory
to a suitable environment variable.

On Windows there is the PATH environment variable.

On Linux and MacOS there is the LD_LIBRARY_PATH environment variable.
Linux further has ldconfig (Linux).

Usage

Call the functions of the shared library "SigDeviceAPI.WrapperNE.{dll, so, dylib}.

The releases for Windows contain an import library: SigDeviceAPI.WrapperNE.lib.