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:
- .NET APIs for local and remote calls: with the interfaces and classes used by both local and remote calls.
- .NET APIs for local calls: with local .NET 4.7.2 implementations.
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:
- Install the corresponding .NET SDK version.
- Create a project with .NET 6 or later, e.g., a .NET 8 project.
- Use the Windows Compatibility Pack and add the Microsoft.Windows.Compatibility NuGet package to your project.
- Add the IntervalZero.KINGSTAR.dll reference. You can use one of the following methods:
- Using Visual Studio 2022:
- In Solution Explorer, right-click the project and select Add > Project Reference.
- 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
- 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> - Using Visual Studio 2022:
- .NET APIs for remote calls: with the remote implementation connecting through OPC UA. In .NET Standard 2.0. Users are able to link to the remote computers using Connect or Disconnect APIs.