PP_LFCOPY()

Copies a License File to another location

Applies to:

Win32, Win64

Syntax-VB:

Declare Function pp_lfcopy(ByVal handle As Long, ByVal filename As String, ByVal type As Long) As Long

Syntax-C:

LONG pp_lfcopy(PPLFHANDLE handle, LPSTR filename, LONG type)

Arguments:

<handle> is the handle to the License File given by pp_lfopen()

<filename> denotes the location to find the License File to open. The value for this field is dependant on the <lftype> parameter.

LF_FILE:

The complete path and filename of the License File. The maximum length for the path and filename is 255 characters.

LF_REGISTRY:

A unique string (255 characters max) to identify the encrypted registry key. This string can be any arbitrary string that will identify your company or product. In this case, the License File and string name will be encrypted and hidden in the Windows Registry. If you want to store the license information in a particular location in the Windows registry, refer to pp_lfopen() for syntax of this parameter.

<type> is the location where the License File is to be located, defined as:

LF_FILE [1] - normal filesystem

LF_REGISTRY [2] - Windows registry

Returns:

Refer to pp_errorstr() for a table of possible return codes and their meaning. Typically, PP_SUCCESS [1] (file was copied) is returned.

Description:

Copies the contents of the initialized License File into another location. The old License File may be deleted with pp_filedelete() if it is of type LF_FILE or pp_lfdelete() if LF_REGISTRY.

CAUTION
The previously open License File is automatically closed and the <handle> then will refer to the new License File.

Example:

' Open local License File and copy it

' to a floppy disk

Dim rc As Long

 

rc = pp_lfopen(App.Path & "\sample.ini", 0, LF_FILE, "password", lfhandle)

 

rc = pp_lfcopy(lfhandle, "a:\sample.ini", LF_FILE)

rc = pp_lfclose(lfhandle)

See Also:

PP_FILEDELETE(), PP_LFDELETE() and PP_LFOPEN()

Concept Link IconRelated Topics