PP_GETCODE()
Displays generic Trigger Code dialog box and returns Trigger Code number
CAUTION
This function is no longer available, use PP_EZTRIG1DLG()
instead. Reference for historical purposes only.
Applies to:
Win32
Syntax-VB:
Declare Function pp_getcode(ByVal hwnd as Long, ByVal str_title As String, ByVal str_cenum As String, ByVal str_comp As String, ByVal str_code As String) As Long
Syntax-C:
LONG pp_getcode(LONG hwnd, LPSTR str_title, LPSTR str_cenum, LPSTR str_comp, LPSTR str_code)
Arguments:
<hwnd> is the HWND of the application (use 0 if unknown)
<str_title> is the string to display on the title of the dialog box
<str_cenum> is the string to display next to the code entry number
<str_comp> is the string to display next to the computer number
<str_code> is the string to display next to the user-entered number
Returns:
1 through 50 - (representing sequence number for Trigger Codes), 0 - ERROR
Description:
This function is included for backward compatibility. It has been replaced by the function pp_eztrig1dlg(). All new applications should use this function instead.
Displays a Trigger Code dialog box consisting of the code entry number (see pp_cenum()), computer ID number (see pp_compno()), and asks the user to enter a number. All of the strings on the dialog box are user-definable. Once the user types in a number and clicks the Ok button, pp_tcode() is evaluated to see if a valid Trigger Code was entered. This result is then returned. The computer number is generated using the COMPNO_BIOS algorithm. The computer number used for this dialog is independent of the computer number passed to other functions such as pp_copyadd(). This function is typically used to help quickly implement a Trigger Code screen. The <handle> parameter allows the dialog displayed to be a child of the parent window. Passing a 0 will cause the dialog displayed to be independent of any other displayed windows.
The Trigger Code seed used in this function is fixed at 1000.
Example:
' Allow the user to enter a trigger code. We will only
' look for trigger code 1. We could have used any of the
' 50 possible trigger codes
Dim tcode As Long
tcode = pp_getcode(Me.hwnd, "Application Registration",
"Regestration No:", "Client ID:", "Authorization No:")
If (tcode = 1) Then
MsgBox "Authorization Successful!", 0, ""
End If
See Also: