|
KeyGen API - Keygen structures and constants
Keygen structures and constants
|
|
Constant
|
Value
|
Meaning
|
| KEYGEN_OK |
0
|
The key is generated successfully |
| ERR_DLL_INIT_ERROR |
1
|
The keygen dll initializtion fails |
| ERR_NO_USERNAME |
2
|
lpUserName is NULL or the length of string it point to is 0 |
| ERR_NO_ORDERID |
3
|
lpOrderID is NULL or the length of string it point to is 0 |
| ERR_INVALID_EXP_DATE |
4
|
Expiration date lpExpDate point to is invalid |
| ERR_INSUFFICIENT_BUFFER |
5
|
The data area passed to GenerateTextKey, where key string will be copied to,is too small. |
| ERR_CANNOT_CREATE_FILE |
6
|
The specified keyfile can not be created. |
| ERR_WRITEFILE_FAILED |
7
|
The specified keyfile can not be written. |
C\C++
typedef struct
{
char *lpUserName; // Pointer to user name string
char *lpOrderID; // Pointer to order ID string
char *lpHardwareID; // Pointer to hardware ID string
char *lpExpVersion; // Pointer to expiration version string
SYSTEMTIME *lpExpDate; // Pointer to expiration date ( SYSTEMTIME structure)
} KEY_DATA;
Delphi:
TKeyData = packed record
lpUserName : PChar; // Pointer to user name string
lpOrderID : PChar; // Pointer to order ID string
lpHardwareID : PChar; // Pointer to hardware ID string
lpExpVersion : PChar; // Pointer to expiration version string
lpExpDate : PSystemTime; // Pointer to expiration date ( SYSTEMTIME structure)
end;