PP_ERRORSTR()
Converts a return value error code into a string
Applies to:
Win32, Win64
Syntax-VB:
Declare Sub pp_errorstr(ByVal number As Long, ByVal buffer As String)
Syntax-C:
VOID pp_errorstr(LONG number, LPSTR buffer)
Arguments:
<number> is the number that was returned from a PPP function
<buffer> is the buffer to place the error message
Returns:
VOID - nothing. The error string is returned in the buffer.
Description:
This function is used for debugging. When a PLUS system function returns a condition other than PP_SUCCESS [1], this function can be used to retrieve an error message for printing purposes.
Note that there are two types of functions in the PLUS system - ones that a return code of PP_SUCCESS [1] is expected and ones that either a PP_TRUE [1] or PP_FALSE [0] is expected. In either case, a number other than one or zero indicates that the function could not be completed.
Note that <buffer> must be initialized to a length of at least 50 characters before calling this function.
The following table is an exhaustive list of all of the possible error codes that may be returned from the PLUS library.
|
ERROR NUMBER |
DEFINE |
|
0 |
PP_FALSE |
|
|
The function call failed. |
|
1 |
PP_TRUE or PP_SUCCESS |
|
|
The function call succeeded. |
|
2 |
ERR_INVALID_ATTRIBUTES |
|
|
Invalid parameters have been passed to the function PP_LFCREATE. Please make sure you are passing valid values into the parameters of the function. If you are receiving this under PP_LFOPEN, please contact Technical Support. |
|
3 |
ERR_CANNOT_CHANGE_ATTRIBS |
|
|
The license file is in a state that can not be manipulated. Please make sure the user has permissions to modify this file. On Windows NT based operating systems make sure they have at least Power User permissions on the file in question. |
|
4 |
ERR_HFILE_ERROR |
|
|
No longer used. |
|
5 |
ERR_CANNOT_WRITE_FILE |
|
|
Verify that the directory and license file in question are not marked as READ-ONLY. Also verify that the user has access to write this file into this directory. |
|
6 |
ERR_CANNOT_CLOSE_FILE |
|
|
This can happen for many reasons, contact Technical Support for further information with troubleshooting this problem. |
|
7 |
ERR_CANNOT_OPEN_FILE |
|
|
Verify that the user has the correct permissions to the file and folder which contains the file. |
|
8 |
ERR_CANNOT_READ_FILE |
|
|
The license file could be empty (0 bytes). Verify with LFEdit or LFRW that the file is complete. |
|
9 |
ERR_CANNOT_CREATE_FILE |
|
|
The license file could not be created. The most common reason is due to user’s security restrictions. |
|
10 |
ERR_CANNOT_DELETE_FILE |
|
|
The license file could not be deleted. Either the file is currently in use, or the user does not have the proper security rights on the computer. |
|
11 |
ERR_FILE_WAS_CREATED |
|
|
No longer used. |
|
12 |
ERR_INVALID_PASSWORD |
|
|
Internal error. Please contact Technical Support for further assistance. |
|
13 |
ERR_WRONG_PASSWORD |
|
|
The password used to open the license file is not the same password used when creating the license file with LFEdit. |
|
14 |
ERR_INCORRECT_PARAMETERS |
|
|
Please verify the correct syntax of the function is used. This error may be returned if the handle to the license file is NULL or 0. |
|
15 |
ERR_FILE_MISSING |
|
|
The license file could not be found. Verify the license file is in the application folder or a valid path is specified when opening the file. If this error is returned from pp_compno or pp_compno32drivers make sure the driver is in the correct location (either the current working directory or the Windows System32 directory). |
|
16 |
ERR_MEMORY_ALLOCATION |
|
|
The memory could not be allocated to either read the license file or create dialog boxes. |
|
17 |
ERR_MEMORY_FREE |
|
|
The memory to the license file or semaphore file handle was not released after the file was closed or created. Please contact Technical Support. |
|
18 |
ERR_INVALID_LFHANDLE |
|
|
The handle passed into the function is not the handle to the master license file. Make sure the license file was successfully opened. If using the LFile object, make sure the IsLFOpen property is True. |
|
19 |
ERR_SLOT_NUM_INVALID |
|
|
The slot specified is not a valid slot. Verify the slot specified is greater or equal to 1 and less than or equal to the maximum number of computer ids that the license file can hold. This maximum number is currently 100 slots. |
|
20 |
ERR_SLOT_EMPTY |
|
|
The slot specified is empty. |
|
21 |
ERR_SLOTS_FULL |
|
|
An attempt has been made to add a computer id to a license file that has reached the maximum capacity of computer ids (100) in the Authorized Computers list. |
|
22 |
ERR_SLOT_ALREADY_ASSIGNED |
|
|
A duplicate computer id is being added to the license file without specifying the flag allowing duplicate computer ids. |
|
23 |
ERR_NET_LIC_FULL |
|
|
The Network LAN Count is greater or equal to the LAN Limit. |
|
24 |
ERR_COMPNO_NOT_FOUND |
|
|
The Computer ID was not found (PP_COPYDELETE) or did not match (PP_IMPORTACTFILE). |
|
25 |
ERR_VAR_NO_INVALID |
|
|
The field number used during a Get or Set function call is not a valid field in the license file. |
|
26 |
ERR_SOFT_EXPIRATION |
|
|
You are using the Soft Expiration Date and PP_EXPIRED when the license has not expired. |
|
27 |
ERR_EXPTYPE_INVALID |
|
|
The character in the license file for Expiration Type is not valid or not related to the function called. (The pp_daysleft and pp_expired functions can return this error.) |
|
28 |
ERR_EXP_DATE_EMPTY |
|
|
The Hard Expiration Date is not set in the license file. Make sure that all the fields in the date are not Zero as this field must contain a value. |
|
29 |
ERR_STRING_TOO_LONG |
|
|
No longer in use. |
|
30 |
ERR_CURRENT_DATE_OLDER |
|
|
The current date and time is older than the last used date and time stored in the license file. Generally occurs when the system clock has been turned back. |
|
31 |
ERR_CANNOT_LOCK_FILE |
|
|
PP_LFLOCK cannot lock the file. Usually occurs when the user has insufficient permissions. |
|
32 |
ERR_WRONG_LF_VERSION |
|
|
No longer in use. |
|
33 |
ERR_CORRUPT_LICENSE_FILE |
|
|
No longer in use. |
|
34 |
ERR_SEM_FILE_LOCKED |
|
|
No longer in use. |
|
35 |
ERR_CORRUPT_CONTROL_FILE |
|
|
The control file relating to PP_CONVERTV3 can not be verified. |
|
36 |
ERR_WRONG_CF_SERIAL_NUM |
|
|
The serial number relating to PP_CONVERTV3 can not be verified. |
|
37 |
ERR_LF_LOCKED |
|
|
The license file is already locked. |
|
38 |
ERR_LF_CHECKSUM_INVALID |
|
|
The internal checksum for the license file could not be verified. This may indicate the license file has been tampered with or is corrupt. |
|
39 |
ERR_NOT_APPLICABLE |
|
|
The function is not available with your current hardware dongle. |
|
40 |
ERR_NOT_IMPLEMENTED_YET |
|
|
No longer used. |
|
41 |
ERR_FILE_EXISTS |
|
|
Returns when you to try use PP_LFCREATE and the file already exists. |
|
42 |
ERR_REGISTRY_OPEN |
|
|
There are insufficient user permissions to the registry. Make sure that the program is run first by the Administrator so that the "aliases" in the registry get properly created. In Windows Vista, Windows 7 or higher, try right clicking on the application or shortcut and clicking "Run as administrator". |
|
43 |
ERR_REGISTRY_QUERY |
|
|
There are insufficient user permissions to the registry. Make sure that the program is run first by the Administrator so that the "aliases" in the registry get properly created. |
|
44 |
ERR_REGISTRY_CLOSE |
|
|
There are insufficient user permissions to the registry. Make sure that the program is run first by the Administrator so that the "aliases" in the registry get properly created. |
|
45 |
ERR_REGISTRY_READ |
|
|
There are insufficient user permissions to the registry. Make sure that the program is run first by the Administrator so that the "aliases" in the registry get properly created. |
|
46 |
ERR_REGISTRY_SET |
|
|
There are insufficient user permissions to the registry. Make sure that the program is run first by the Administrator so that the "aliases" in the registry get properly created. |
|
47 |
ERR_CBOX_NOT_PRESENT |
|
|
If you are using hardware dongles the computer does not recognize the hardware dongle is attached to the computer. Please make sure the port in question is activated and the drivers are loaded correctly. |
|
48 |
ERR_CBOX_WRONG_TYPE |
|
|
The hardware dongle attached is not the dongle that is currently programmed for. |
|
49 |
ERR_CBOX_READ_RAM1_ERROR |
|
|
Could not read the license file form the hardware dongle. Contact Technical Support |
|
50 |
ERR_CBOX_READ_RAM2_ERROR |
|
|
Could not read the license file form the hardware dongle. Contact Technical Support |
|
51 |
ERR_CBOX_WRITE_RAM1_ERROR |
|
|
Could not write the license to the hardware dongle. Contact Technical Support |
|
52 |
ERR_CBOX_WRITE_RAM2_ERROR |
|
|
Could not write the license to the hardware dongle. Contact Technical Support |
|
53 |
ERR_CBOX_ID1_ERROR |
|
|
Security code 1 does not match what is currently in the hardware dongle. |
|
54 |
ERR_CBOX_ID2_ERROR |
|
|
Security code 2 does not match what is currently in the hardware dongle. |
|
55 |
ERR_CBOX_ID3_ERROR |
|
|
Security code 3 does not match what is currently in the hardware dongle. |
|
56 |
ERR_VAR_NOT_AVAILABLE |
|
|
The parameter supplied does not match the parameter input into one of the functions. This is most commonly caused by using a slot that does not exist into the pp_getvar and pp_setvar functions. |
|
57 |
ERR_DEMO_HAS_EXPIRED |
|
|
(Deprecated) Used in the older libraries when the demo of an application has expired. |
|
58 |
ERR_WINSOCK_STARTUP_ERROR |
|
|
No longer used with the Protection PLUS libraries. Exported to the Automation Client. |
|
59 |
ERR_WINSOCK_CANNOT_RESOLVE_HOST |
|
|
No longer used with the Protection PLUS libraries. Exported to the Automation Client. |
|
60 |
ERR_WINSOCK_CANNOT_CREATE_SOCKET |
|
|
No longer used with the Protection PLUS libraries. Exported to the Automation Client. |
|
61 |
ERR_WINSOCK_CANNOT_CONNECT_TO_SERVER |
|
|
No longer used with the Protection PLUS libraries. Exported to the Automation Client. |
|
62 |
ERR_WINSOCK_CANNOT_SEND_DATA |
|
|
No longer used with the Protection PLUS libraries. Exported to the Automation Client. |
|
63 |
ERR_WINSOCK_CANNOT_READ_DATA |
|
|
No longer used with the Protection PLUS libraries. Exported to the Automation Client. |
|
64 |
ERR_NO_MORE_SOFTWARE_KEYS_AVAILABLE |
|
|
No longer used with the Protection PLUS libraries. Exported to the Automation Client. |
|
65 |
ERR_INVALID_SERVER_RESPONSE |
|
|
Error returned when the response back from SOLO could not be parsed out correctly. This is normally caused by invalid data sent. |
|
66 |
ERR_CANNOT_ALLOCATE_MEMORY |
|
|
No longer used with the Protection PLUS libraries. Exported to the Automation Client. |
|
67 |
ERR_WINSOCK_CANNOT_RESOLVE_PROXY |
|
|
No longer used with the Protection PLUS libraries. Exported to the Automation Client. |
|
68 |
ERR_ALIAS_FILE_DOES_NOT_MATCH |
|
|
When comparing the aliases to the master license file, the aliases do not contain the same information as the master. |
|
69 |
ERR_INVALID_CODE_ENTERED |
|
|
The activation code was incorrect. This can be caused by a user incorrectly typing in the activation code, or it may be caused by attempting to activate with the wrong trigger code seed value. |
|
70 |
ERR_INVALID_REGKEY2_ENTERED |
|
|
When using EZTrigger the regkey2 value has been decrypted and found invalid. Verify the seed values match for regkey2. |
|
71 |
ERR_ACCESS_DENIED |
|
|
When trying to install Machnm32.sys onto a computer the user installing it MUST be the Administrator or in the Administrative Group of the local machine. |
|
72 |
ERR_NON_WIN32_OS |
|
|
The function requires an NT based operating system (Windows 2000 and up). |
|
73 |
ERR_DRIVER_CORRUPT |
|
|
The installation or un-installation of Machnm32.sys was interrupted. Contact Technical Support. |
|
74 |
ERR_MARKED_FOR_DELETE |
|
|
The driver Machnm32.sys has been marked for delete or uninstalled. This error only happens when you have been installing and uninstalling Machnm32.sys multiple times. Most of the time restarting your program will clear the flag, but some times you must reboot the computer to clear this error. |
|
75 |
ERR_INVALID_NETHANDLE |
|
|
The handle passed into the Network Broadcast functions (PP_NETTEST, and PP_NETCLOSE) is invalid. |
|
76 |
ERR_NO_MESSAGES |
|
|
Currently unused. |
|
77 |
ERR_ALREADY_OPEN |
|
|
Network Broadcast socket connection already open. |
|
78 |
ERR_INVALID_NETWORK_ADDRESS |
|
|
Currently unused. |
|
79 |
ERR_NON_WIN64_OS |
|
|
This function requires 64-bit Windows (Windows XP Pro x64 Edition and higher). |
|
80 |
ERR_NOT_SUPPORTED_BY_OS |
|
|
Function requires Windows 2000 or higher. |
|
81 |
ERR_COULD_NOT_LOAD_DLL |
|
|
Call to LoadLibrary failed. |
|
82 |
ERR_FUNCTION_NOT_AVAILABLE |
|
|
Call to GetProcAddress failed. |
|
83 |
ERR_NO_DRIVES_FOUND |
|
|
Function failed to locate any hard disk drives. |
|
84 |
ERR_INTERNAL_BROADCAST |
|
|
Currently unused. |
|
85 |
ERR_BIND_FAILED |
|
|
Failed to late bind to dependent library. |
|
86 |
ERR_CANNOT_CREATE_THREAD |
|
|
Function failed to create thread. |
|
87 |
ERR_NETWORK_CONNECTIVITY |
|
|
Unable to connect to network. |
|
88 |
ERR_COULD_NOT_INSTALL_DRIVER |
|
|
The driver Machnm32.sys or Machnm64.sys failed to install. |
|
89 |
ERR_NETWORK_RECONNECTED |
|
|
|
|
90 |
ERR_NET_MULTI_STARTUP |
|
|
There are more Network Broadcast requests than network seats available. |
|
91 |
ERR_BUFFER_TOO_SMALL |
|
|
The output buffer is of insufficient size. |
Example:
Dim result as Long
Dim errBuf As String * 50
' Set the expiration type
result = pp_setvarchar( lfhandle, VAR_EXPIRE_TYPE, "D" )
If (result <> PP_SUCCESS) Then
' Something went wrong - display an error message
pp_errorstr result, errBuf
MsgBox errBuf, 0, "Application Error"
End If