visit SOFTPRO GmbH Website

SPLicenseClient.h File Reference


Detailed Description

SignWare Dynamic Development toolkit, license registration client.

Author:
uko
This header defines the deprecated SPLicenseClient object. See SignWare License for details on licenses.

License Client

Note:
SignWare now uses license keys, usage of license files is deprecated. The following description only applies if you still use license files.
The license client access a SOFTPRO HTTP service to load a license.

You must properly initialize the license management to use this feature, see Using the SOFTPRO License Manager and Typical startup code.

The license service can neither transfer ticket licenses nor recharge a transfer license. The license service only supports local license model.

The SOFTPRO license service will be located using the registry, all values are read from HKCR\Software\SOFTPRO\SPRegLic

The typical minimum configuration requires the Url to be set to the service URL. Example
   REGEDIT4
   
   [HKEY_CLASSES_ROOT\\Software\\SOFTPRO\\SPRegLic]
   "Url" = "http://Register.SOFTPRO.de/RegLicService.php"

You may use the APIs SPLicenseClientSetPropertyInt, SPLicenseClientSetPropertyString to overrule the defaults that were read from the registry.

The license client can be used either with builtin GUI or with a custom GUI.

The builtin GUI pops up a multipage dialog to enter the registration key, optional proxy data and finally connects with the license service to load the license file, see SPLicenseClientGuiRequest. Internationalisation is supported through xml translation files, which must be located in the path.

The application may built a custom GUI to enter the registration code and optionally more fields to specify proxy connection parameters and finally call SPLicenseClientRequest to upload the license file.

Note:
The SOFTPRO license service is currently in a test phase. Please contact SOFTPRO service for details on availability of this service.

Properties

The license client connects with a SOFTPRO license service. The properties define the connection parameters.


Functions

SPINT32 __cdecl SPLicenseClientClone (pSPLICENSECLIENT_T pLicenseClient, pSPLICENSECLIENT_T *ppClone)
 Clone a SPLicenseClient object.
SPINT32 __cdecl SPLicenseClientCreate (pSPLICENSECLIENT_T *ppLicenseClient)
 Create a new SPLicenseClient object.
SPINT32 __cdecl SPLicenseClientFree (pSPLICENSECLIENT_T *ppLicenseClient)
 Deallocate an SPLicenseClient object.
SPINT32 __cdecl SPLicenseClientGetDetailError (pSPLICENSECLIENT_T pLicenseClient, const SPCHAR *pszLanguage, SPINT32 iResult, SPCHAR **ppszErrorString)
 Get a description of the error returned by SPLicenseClientRequest or SPLicenseClientGuiRequest.
SPINT32 __cdecl SPLicenseClientGetPropertyInt (pSPLICENSECLIENT_T pLicenseClient, const SPCHAR *pszName, SPINT32 *piValue)
 Query an integer property.
SPINT32 __cdecl SPLicenseClientGetPropertyString (pSPLICENSECLIENT_T pLicenseClient, const SPCHAR *pszName, char **ppszValue)
 Set a string property.
SPINT32 __cdecl SPLicenseClientGuiRequest (pSPLICENSECLIENT_T pLicenseClient, SPHWND hwndParent, const SPCHAR *pszLanguage, SPINT32 *piResult)
 Get a license file from the SOFTPRO license service.
SPINT32 __cdecl SPLicenseClientRequest (pSPLICENSECLIENT_T pLicenseClient, const char *pszRegistrationCode, SPINT32 *piResult)
 Get a license file from the SOFTPRO license service without GUI.
SPINT32 __cdecl SPLicenseClientSetPropertyInt (pSPLICENSECLIENT_T pLicenseClient, const SPCHAR *pszName, SPINT32 iValue)
 Set an integer property.
SPINT32 __cdecl SPLicenseClientSetPropertyString (pSPLICENSECLIENT_T pLicenseClient, const SPCHAR *pszName, const char *pszValue)
 Set a string property.


Function Documentation

SPINT32 __cdecl SPLicenseClientClone pSPLICENSECLIENT_T  pLicenseClient,
pSPLICENSECLIENT_T ppClone
 

Clone a SPLicenseClient object.

Deprecated:
Please use a license key.
Parameters:
pLicenseClient [i] pointer to a valid SPLicenseClient object that will be cloned
ppClone [o] pointer to a variable that will be filled with a pointer to a new SPLicenseClient object. The caller is responsible for deallocating the new object by calling SPLicenseClientFree.
Returns:
SP_NOERR on sucess, else error code:
Operating Systems:
Windows (Win32)
See also:
SPLicenseClientCreate, SPLicenseClientFree

SPINT32 __cdecl SPLicenseClientCreate pSPLICENSECLIENT_T ppLicenseClient  ) 
 

Create a new SPLicenseClient object.

Deprecated:
Please use a license key.
Parameters:
ppLicenseClient [o] pointer to a variable that will be filled with a pointer to a new SPLicenseClient object. The caller is responsible for deallocating the new object by calling SPLicenseClientFree.
Returns:
SP_NOERR on sucess, else error code:
Operating Systems:
Windows (Win32)
See also:
SPLicenseClientClone, SPLicenseClientFree

SPINT32 __cdecl SPLicenseClientFree pSPLICENSECLIENT_T ppLicenseClient  ) 
 

Deallocate an SPLicenseClient object.

The SPLicenseClient object must have been created by SPLicenseClientCreate or SPLicenseClientClone.

Deprecated:
Please use a license key.
Parameters:
ppLicenseClient [io] pointer to a variable containing a pointer to an SPLicenseClient object. The variable will be set to NULL if this function succeeds.
Returns:
SP_NOERR on sucess, else error code:
Operating Systems:
Windows (Win32)
See also:
SPLicenseClientCreate, SPLicenseClientClone

SPINT32 __cdecl SPLicenseClientGetDetailError pSPLICENSECLIENT_T  pLicenseClient,
const SPCHAR pszLanguage,
SPINT32  iResult,
SPCHAR **  ppszErrorString
 

Get a description of the error returned by SPLicenseClientRequest or SPLicenseClientGuiRequest.

Extract the returned detailed error information to a readable error string in UTF-8 notation

Deprecated:
Please use a license key.
Parameters:
pLicenseClient [i] pointer to a valid SPLicenseClient object
pszLanguage [i] desired language, 2 character language code, "de" for German, "en" for English
iResult [i] the error code as returned in the piResult parameter in SPLicenseClientRequest or SPLicenseClientGuiRequest
ppszErrorString [o] pointer to a character pointer that will be filled with the error description.
Call SPFreeString to free the memory when the string is no longer needed
Returns:
SP_NOERR on success, else error code

SPINT32 __cdecl SPLicenseClientGetPropertyInt pSPLICENSECLIENT_T  pLicenseClient,
const SPCHAR pszName,
SPINT32 piValue
 

Query an integer property.

Please read Properties for details on the evaluated properties

Deprecated:
Please use a license key.
Parameters:
pLicenseClient [i] pointer to a valid SPLicenseClient object
pszName [i] name of the property
piValue [o] pointer to an integer that will be filled with value of the property
Returns:
SP_NOERR on sucess, else error code:
Operating Systems:
Windows (Win32)
See also:
SPLicenseClientGetPropertyInt

SPINT32 __cdecl SPLicenseClientGetPropertyString pSPLICENSECLIENT_T  pLicenseClient,
const SPCHAR pszName,
char **  ppszValue
 

Set a string property.

Please read Properties for details on the evaluated properties

Deprecated:
Please use a license key.
Parameters:
pLicenseClient [i] pointer to a valid SPLicenseClient object
pszName [i] name of the property
ppszValue [o] pointer to a SPCHAR * that will be filled with value of the property, use SPFreeString to free the allocated memory if you no longer need the value
Returns:
SP_NOERR on sucess, else error code:
Operating Systems:
Windows (Win32)
See also:
SPLicenseClientGetPropertyInt, SPFreeString

SPINT32 __cdecl SPLicenseClientGuiRequest pSPLICENSECLIENT_T  pLicenseClient,
SPHWND  hwndParent,
const SPCHAR pszLanguage,
SPINT32 piResult
 

Get a license file from the SOFTPRO license service.

Popup a multipage dialog to enter registration key and optional proxy settings
The dialog will be translated to the according language if the translation file SPRegLic_{language}.xml can be loaded in the path variable.

Note:
URL of the license service and proxy settings are read from the registry and may be overruled by SPLicenseClientSetPropertyInt and SPLicenseClientSetPropertyString

The return code will be SP_NOERR on success or an error code. A detailed error description will be returned via SPLicenseClientGetDetailError

Deprecated:
Please use a license key.
Parameters:
pLicenseClient [i] pointer to a valid SPLicenseClient object
hwndParent [i] Window handle of the pearent window
pszLanguage [i] desired language, 2 character language code, "de" for German, "en" for English or a two-character language code, which will be used to read the translation file SPRegLic_{pszLanguage}.xml.
The language defaults to "en" if the translation file cannot be found or read.
piResult [o] pointer to an integer that will be filled with the detailed result, may be NULL, see SPLicenseClientGetDetailError
Returns:
SP_NOERR on success, else error code
Operating Systems:
Windows (Win32)

SPINT32 __cdecl SPLicenseClientRequest pSPLICENSECLIENT_T  pLicenseClient,
const char *  pszRegistrationCode,
SPINT32 piResult
 

Get a license file from the SOFTPRO license service without GUI.

Note:
URL of the license service and proxy settings are read from the registry and may be overruled by SPLicenseClientSetPropertyInt and SPLicenseClientSetPropertyString

The return code will be SP_NOERR on success or an error code. A detailed error description will be returned via SPLicenseClientGetDetailError

Deprecated:
Please use a license key.
Parameters:
pLicenseClient [i] pointer to a valid SPLicenseClient object
pszRegistrationCode [i] the registration code for the desired product and license
piResult [o] pointer to an integer that will be filled with the detailed result, may be NULL, see SPLicenseClientGetDetailError
Returns:
SP_NOERR on success, else error code
Operating Systems:
Windows (Win32)

SPINT32 __cdecl SPLicenseClientSetPropertyInt pSPLICENSECLIENT_T  pLicenseClient,
const SPCHAR pszName,
SPINT32  iValue
 

Set an integer property.

Please read Properties for details on the evaluated properties

Deprecated:
Please use a license key.
Parameters:
pLicenseClient [i] pointer to a valid SPLicenseClient object
pszName [i] name of the property
iValue [i] value of the property
Returns:
SP_NOERR on sucess, else error code:
Operating Systems:
Windows (Win32)
See also:
SPLicenseClientGetPropertyInt

SPINT32 __cdecl SPLicenseClientSetPropertyString pSPLICENSECLIENT_T  pLicenseClient,
const SPCHAR pszName,
const char *  pszValue
 

Set a string property.

Please read Properties for details on the evaluated properties

Deprecated:
Please use a license key.
Parameters:
pLicenseClient [i] pointer to a valid SPLicenseClient object
pszName [i] name of the property
pszValue [i] value of the property
Returns:
SP_NOERR on sucess, else error code:
Operating Systems:
Windows (Win32)
See also:
SPLicenseClientGetPropertyInt