KINGSTAR .NET APIs

This section contains the non-real-time application programming interface for KINGSTAR applications written for Windows .NET APIs. The APIs include .NET API, .NET Class, and classes and enums shared between .NET API and .NET Class, which can be used for local or remote calls. The .NET API uses C-style functions, while the .NET Class uses .NET features such as exceptions, properties, and methods.

NOTE:  As of KINGSTAR 4.4, the DLLs include the .NET API and .NET Class interfaces that can be used from a remote computer.

SECTIONS IN THIS TOPIC:

NOTE:  In addition to .NET Framework 4.7.2 and later, KINGSTAR .NET APIs for local calls also support .NET 6 and later. The following steps demonstrate how to use the APIs in .NET 6 or later applications by leveraging the Windows Compatibility Pack:

  1. Install the corresponding .NET SDK version.
  2. Create a project with .NET 6 or later, e.g., a .NET 8 project.
  3. Use the Windows Compatibility Pack and add the Microsoft.Windows.Compatibility NuGet package to your project.
  4. Add the IntervalZero.KINGSTAR.dll reference. You can use one of the following methods:
    • Using Visual Studio 2022:
      1. In Solution Explorer, right-click the project and select Add > Project Reference.
      2. Click Browse and select IntervalZero.KINGSTAR.dll.
        • If KINGSTAR Runtime is installed, select it from C:\Program Files\IntervalZero\KINGSTAR\bin
        • If KINGSTAR SDK is installed, select it from C:\Program Files\IntervalZero\KINGSTAR SDK\[version]\bin
      3. Click OK.
    • Manually: Modify the .csproj file by adding the following XML snippet:
    Copy
    <ItemGroup>
      <Reference Include="IntervalZero.KINGSTAR">
        <HintPath>C:\Program Files\IntervalZero\KINGSTAR\bin\IntervalZero.KINGSTAR.dll</HintPath>
      </Reference>
    </ItemGroup>