Processes EZ Trigger™ algorithm
Declare Function pp_eztrig1ex(ByVal handle As Long, ByVal regkey1 As Long, ByVal regkey2 As Long, ByVal flags As Long, ByVal usercode1 As Long, ByVal usercode2 As Long, ByVal tcseed As Long, ByVal regkey2seed As Long, ByRef tcvalue As Long, ByRef tcdata As Long) As Long
LONG pp_eztrig1ex(LONG handle, LONG regkey1, LONG regkey2, LONG flags, LONG usercode1, LONG usercode2, LONG tcseed, LONG regkey2seed, LPLONG tcvalue, LPLONG tcdata)
<handle> is the handle to the License File given by pp_lfopen()
<regkey1> is the value of Reg Key 1 entered by user
<regkey2> is the value of Reg Key 2 entered by user
<flags> is reserved; set to 0 always
<usercode1> was used as User Code 1 or Session Code
<usercode2> was used as User Code 2 or Computer ID
<tcseed> is the Trigger Code seed used to randomize the algorithm
<regkey2seed> is the Trigger Code Event Data seed
<tcvalue> is a buffer to place the Trigger Code number. Use 0 to ignore this parameter.
<tcdata> is a buffer to place the Trigger Code Event Data. Use 0 to ignore this parameter.
Refer to pp_errorstr() for a table of possible return codes and their meaning. Typically, PP_SUCCESS  (valid Trigger Code was entered and processed), or ERR_INVALID_CODE_ENTERED  (user entered an invalid Trigger Code) is returned. The values of the Trigger Code Event ID and Event Data entered by the user can be optionally retrieved from the parameters <tcvalue> and <tcdata>.
This function will call pp_tcode() to decode the Trigger Code Event ID that the user entered. It will call pp_ndecrypt() to decrypt the Trigger Code Event Data. With these two pieces of data, the appropriate actions defined by the EZ Trigger algorithm are processed. Refer to the EZ Trigger topic in the Concepts and Definitions chapter for a list of features.
The function pp_eztrig1dlg() can display a completed Trigger Code dialog and call this function automatically. Call this function if you would like to design your own Trigger Code dialog but want EZ Trigger to process the result.
' lfhandle was previously obtained by pp_lfopen()
' Trigger Code Event ID seed=400, Event Data seed=123
Dim result As Long, usercode1 As Long
Dim usercode2 As Long, regkey1 As Long
Dim regkey2 As Long
' initialize the dialog box values
usercode2=pp_compno(1, "", "")
lblUserCode1.Caption = usercode1
lblUserCode2.Caption = usercode2
[ Display Dialog Box and wait for user input }
' get the codes the user entered
result=pp_eztrig1ex(lfhandle, regkey1, regkey2, 0, usercode1, usercode2, 400, 123, 0, 0)
If result = PP_SUCCESS Then
MsgBox "Action Complete!"
PP_EZTRIG1DLG(), PP_TCODE(), and PP_NDECRYPT()