Getting Started with Addins

Ready to create a KioWare for Windows Addin? You'll need Visual Studio to get started.

If you're ready, start up Visual Studio and create a new project. You'll want to create a C# Class Library. We'll call our new addin project "MyKioWareAddin". Be sure to set your .NET Framework version to 4.5

Create a New Project

Next, you need to add a reference to the KioWare library KioWareClientSharedLib.dll. To do this, right click on the project, and select "Add Reference..." from the context menu.Add a Reference

Select the DLL

Next, we'll drop in a 'using' statement at the top of the code.
Add this towards the top:

using ADSI.KioWare.Client.Platform.Addins;

Add a Using Statement

We want our new class to derive from IKioWareAddin. To derive from another class, add : IKioWareAddin after your class name.

Derive from IKioWareAddin

Hover over IKioWareAddin, click on the light bulb to see more options, and select the "Implement Interface" option.

Implement the Interface

In the Name property, add code to return the new addin's name.

Implement Name

Under the "Tools" menu, select "Create Guid" to open the GUID creation utility.

Implement Name

Select "4. Registry Format", and click the "Copy" button to copy the new GUID to the clipboard. You should generate your own GUID, and not use the one generated in this example.

Create a GUID 1

In the UniqueID property, add code to return the new addin's GUID. Paste the new GUID into the code.

Create a GUID 2

In the Version property, add code to return the new addin's version. In this example, we'll use

Implement Guid

Implement the Load function by storing the host instance into a new private variable (for later use). The host instance will provide you with multiple ways to tie into the KioWare engine, so you'll likely need this reference at some point, and this is the only opportunity to get it.

Implement Load function

Implement the UnLoad function by setting the host instance reference to null.

Implement UnLoad function

Open the project properties window by right-clicking on the project in the solution explorer menu, and going to properties.

Implement UnLoad function

Change the name of the output DLL so that it includes .Addin. In the example, the output DLL will now be: MyKioWareAddin.Addin.DLL

Implement UnLoad function

Go into the "Build Events" pane, and add the following code to the Post-Build Event:

set dir=%ProgramData%\KioWare Client\Addins\$(RootNameSpace)\
if NOT EXIST "%dir%" mkdir "%dir%"
copy /y "$(TargetPath)" "%dir%$(TargetFileName)"
if not %errorlevel%==0  exit 1
copy /y "$(TargetDir)$(TargetName).pdb" "%dir%$(TargetName).pdb"

Implement UnLoad function

At this point, you should be able to compile your project, and once the compile is finished, the output will automatically be copied into the correct place in order for KioWare to load the file: C:\ProgramData\KioWare Client\Addins\MyKioWareAddin

Addin Copied into Place

Your addin should now load with the next launch of KioWare.