Klient 2 C++ SDK
Updated: August 01, 2005, 03:59
This C++ SDK is a port of the original Klient 2 Delphi SDK. The purpose of this SDK is to help Klient users to write Klient DLL Plugins in C++.
The SDK provides type definitions and constant declarations for C++ developers. These defintions are used in DLL script code to communicate with Klient.
Additionally, the SDK also includes classes, which wraps all available functionality for ease of use.
Requirements
MSVC 6 or later. To compile the library with MSVC 6 at least WTL 3.1 is needed. The latest version of WTL can be found here
To use the SDK with VS.NET, no additional libaries are needed, only the samples use WTL7 for the UI.
Quickstart
- Examine the examples :)
- Compile the library using the provided workspace.
- Create a DLL project and add the Klient2SDK and Klient2SDK/lib directories to the projects includes and linker paths
- Add the following includes:
#include <uKlientConstants.h> #include <uKlientTypedefs.h> #include <uKlientExternals.h> #include <KlientScript.h>
- Name your plug-in class
CKlientScript
and inherit fromklient2::CScriptT
- Define the macro
SCRIPT_NAME
- Define a global variable
CKlientScript* g_pKlientScript = NULL
- Include
KlientEntriesImpl.h
, which implements theKlientScriptStartup
,KlientInitialize
,KlientFinalize
and a defaultDllMain
. To use your ownDllMain
, defineCUSTOM_DLLMAIN
(See the Ignores sample). - Link with
K2SDK.lib
(for release builds) andK2SDKD.lib
(for debug builds)