VpeLoadTemplateAuthKey

<< Click to Display Table of Contents >>

Navigation:  Templates >

VpeLoadTemplateAuthKey

Previous pageReturn to chapter overviewNext page

This method is identical to LoadTemplate(), except that it validates the Authenticity Key which is assigned to a template by using dycodoc.

Loads a template file and creates a Template Object from it in memory.

The function returns a handle of the template which has to be used as hTemplate-parameter in the other template-processing functions.

Using the VPE API, you can query the layout- and data source structure from a template. In addition you are able to perform several operations and modifications on a Template Object by code, including the assignment of values to fields (i.e. variables).

The parameter hDoc must be a valid VPE document handle. The template is logically linked to the specified VPE document and it will be removed automatically from memory when the VPE document is closed. Of course the template will be removed latest from memory when your application terminates.

VpeHandle VpeLoadTemplateAuthKey(

VpeHandle hDoc,

LPCSTR file_name,

long key1,

long key2,

long key3,

long key4

)

VpeHandle hDoc

Document Handle

LPCSTR file_name

the path and file name of the file to load

long key1, key2, key3, key4

the Authenticity Key

Returns:

Handle of the Template Object, if the template file was found, could be loaded and the Authenticity Key validation was successful, i.e. the Authenticity Key is present and checks ok.

Otherwise NULL is returned and LastError is set.

Remarks:

In case of an error, LastError is set accordingly to the status of the load process.

 

See Also:

"dycodoc Template Processing" in the Programmer's Manual

 

"Validating the Template Authenticity Key" in the Programmer's Manual