visit Kofax web site

ACTIVESWLib::ISPTemplate Interface Reference


Detailed Description

SignWare Dynamic Development toolkit, ActiveX wrapper for SPTemplateInterface ISPTemplate.

A template is a compressed reference data structure. Templates should be used to save references when the flatfile size is limited, such as smartcards.


Public Member Functions

HRESULT AddOption ([in] long iOptionType,[in] VARIANT lValue,[out, retval] long *result)
 Add an optional parameter to a Template object.
HRESULT AddOptionId ([in] long iOptionTyp,[in] long iId,[in] VARIANT lValue,[out, retval] long *result)
 Add an optional parameter with id to a Template object.
HRESULT Clone ([out] ISPTemplate **ppTemplate,[out, retval] long *result)
 Create a clone of a valid template data structure.
HRESULT CreateFromFlatFile ([in] ISPFlatFile *pbFlatFile,[out, retval] long *result)
 Create a template data structure from valid a flat file.
HRESULT CreateFromReference ([in] ISPReference *pReference,[in] long iMaxTemplateSize,[out, retval] long *result)
 Create a flat file from a valid reference structure.
HRESULT CreateFromSmartcard ([in] ISPSmartCard *pSmartcard,[out, retval] long *result)
 Load a Template from a Smartcard.
HRESULT DelOptionId ([in] long iId,[out, retval] long *result)
 Delete an optional parameter (described by its ID) from a Template object.
HRESULT GetImage ([in] double dZoom,[in] long iImageFormat,[out] ISPFlatFile **ppImage,[out, retval] long *result)
 Convert a template to a standard image file format.
HRESULT GetImageSize ([out] long *piWidth,[out] long *piHeight,[out, retval] long *result)
 Query the image size of this template object.
HRESULT GetOption ([in] long iIndex,[out] long *piOptionType,[out] VARIANT *plValue,[out, retval] long *result)
 Get an optional parameter from a Template object.
HRESULT GetOptionId ([in] long iId,[out] long *piOptionType,[out] VARIANT *plValue,[out, retval] long *result)
 Get an optional parameter (described by its ID) from a Template object.


Member Function Documentation

HRESULT ACTIVESWLib::ISPTemplate::AddOption [in] long  iOptionType,
[in] VARIANT  lValue,
[out, retval] long *  result
 

Add an optional parameter to a Template object.

Parameters:
iOptionType [i] specify the option type
  • SP_TEMPLATE_OPTION_STR
  • SP_TEMPLATE_OPTION_INT
  • SP_TEMPLATE_OPTION_SHORT
  • SP_TEMPLATE_OPTION_BYTE
lValue [i] Value of the option. The type must be casted to a long, but will be interpreted as a type specified by iOptionType.
result [io] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
Returns:
0: success, else error code
errors:
See also:
SPTemplateGetOption

HRESULT ACTIVESWLib::ISPTemplate::AddOptionId [in] long  iOptionTyp,
[in] long  iId,
[in] VARIANT  lValue,
[out, retval] long *  result
 

Add an optional parameter with id to a Template object.

Parameters:
iOptionTyp [i] specify the option type
  • SP_TEMPLATE_OPTION_STR
  • SP_TEMPLATE_OPTION_INT
  • SP_TEMPLATE_OPTION_SHORT
  • SP_TEMPLATE_OPTION_BYTE
iId [i] Identification of the option parameter, range 0 ... 65535, Kofax reserves the range 0 .. 1024
lValue [i] Value of the option. The type must be casted to a long, but will be interpreted as a type specified by iOptionType.
result [io] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
Returns:
0: success, else error code
errors:
See also:
SPTemplateGetOptionId, SPTemplateDelOptionId
Note:
The ID must be a unique number within the template.

HRESULT ACTIVESWLib::ISPTemplate::Clone [out] ISPTemplate **  ppTemplate,
[out, retval] long *  result
 

Create a clone of a valid template data structure.

Parameters:
ppTemplate [o] pointer to a variable that contains a template data structure.The variable may be initialized to NULL on entry, and will be filled with a pointer to a template data structure.
result [io] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
Returns:
0: success, else error code
errors:
See also:
SPFlatFileFree

HRESULT ACTIVESWLib::ISPTemplate::CreateFromFlatFile [in] ISPFlatFile pbFlatFile,
[out, retval] long *  result
 

Create a template data structure from valid a flat file.

Parameters:
pbFlatFile [i] pointer to an unsigned * char array containing the FlatFile data structure. data structure.
result [io] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
Returns:
0: success, else error code
errors:
See also:
SPFlatFileFree

HRESULT ACTIVESWLib::ISPTemplate::CreateFromReference [in] ISPReference pReference,
[in] long  iMaxTemplateSize,
[out, retval] long *  result
 

Create a flat file from a valid reference structure.

Parameters:
pReference [i] pointer to a pSPREFERENCE_T structure
iMaxTemplateSize [i] Max size of FlatFile, when creating a FlatFile from the resulting Template
result [io] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
Returns:
0: success, else error code
errors:
Note:
The parameter iMaxTemplateSize limits the template size but reduces resolution when too small. It typically ranges from 2 KByte to 10 KByte, depending on limitations that may arise e.g. from maximum available space on a smartcard.
See also:
SPFlatFileCreateFromTemplate

SPFlatFileFree

HRESULT ACTIVESWLib::ISPTemplate::CreateFromSmartcard [in] ISPSmartCard pSmartcard,
[out, retval] long *  result
 

Load a Template from a Smartcard.

Parameters:
pSmartcard [i] A valid pSPSMARTCARD_T object
result [io] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
Returns:
0: success, else error code
errors:
See also:
SPSmartcardLoadTemplate, SPSmartcardSaveTemplate

HRESULT ACTIVESWLib::ISPTemplate::DelOptionId [in] long  iId,
[out, retval] long *  result
 

Delete an optional parameter (described by its ID) from a Template object.

Parameters:
iId [i] Identification of the Option queried, range 0 .. 65535
result [io] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
Returns:
0: success, else error code
errors:

HRESULT ACTIVESWLib::ISPTemplate::GetImage [in] double  dZoom,
[in] long  iImageFormat,
[out] ISPFlatFile **  ppImage,
[out, retval] long *  result
 

Convert a template to a standard image file format.

Parameters:
dZoom [i] magnification value of the resulting image
iImageFormat [i] desired format of the resulting image
ppImage [o] pointer to a variable that will be filled with the address of the data buffer
result [io] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
Returns:
0: success, else error code
errors:
See also:
SPTemplateGetImage

HRESULT ACTIVESWLib::ISPTemplate::GetImageSize [out] long *  piWidth,
[out] long *  piHeight,
[out, retval] long *  result
 

Query the image size of this template object.

Parameters:
piWidth [o] pointer to an integer that will be filled with the width of the image
piHeight [o] pointer to an integer that will be filled with the height of the image
result [io] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
Returns:
0: success, else error code
errors:
See also:
SPTemplateGetImageSize

HRESULT ACTIVESWLib::ISPTemplate::GetOption [in] long  iIndex,
[out] long *  piOptionType,
[out] VARIANT *  plValue,
[out, retval] long *  result
 

Get an optional parameter from a Template object.

Parameters:
iIndex [i] 0-based Index of the Option queried
piOptionType [o] pointer to an integer, that will be filled with the option type
  • SP_TEMPLATE_OPTION_STR
  • SP_TEMPLATE_OPTION_INT
  • SP_TEMPLATE_OPTION_SHORT
  • SP_TEMPLATE_OPTION_BYTE
plValue [o] Pointer to a long, that will be filled with the value from the option. The type must be casted as specified by *piOptionType.
result [io] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
Returns:
0: success, else error code
errors:
Note:
piOptionType will be set to 0, if the option was not found

if piOptionTyp == SP_TEMPLATE_OPTION_STR: The application must free the String, when the application does not require it any more.

See also:
SPTemplateAddOption, SPTemplateFree, SPTemplateFreeOption

HRESULT ACTIVESWLib::ISPTemplate::GetOptionId [in] long  iId,
[out] long *  piOptionType,
[out] VARIANT *  plValue,
[out, retval] long *  result
 

Get an optional parameter (described by its ID) from a Template object.

Parameters:
iId [i] Identification of the option queried, range 0 ... 65535, Kofax reserves the range 0 .. 1024
piOptionType [o] pointer to an integer, that will be filled with the option type
  • SP_TEMPLATE_OPTION_STR
  • SP_TEMPLATE_OPTION_INT
  • SP_TEMPLATE_OPTION_SHORT
  • SP_TEMPLATE_OPTION_BYTE
plValue [o] Pointer to a long, that will be filled with the value from the option. The type must be casted as specified by *piOptionType.
result [io] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
Returns:
0: success, else error code
errors:
Note:
piOptionType will be set to 0, if the option was not found

if piOptionTyp == SP_TEMPLATE_OPTION_STR: The application must free the String, when the application does not require it any more.

See also:
SPTemplateAddOptionId, SPTemplateDelOptionId, SPTemplateFreeOption


The documentation for this interface was generated from the following file: