申请试用 - Trial
函数简介
向欧拉授权平台申请试用授权,无需激活码。返回 JSON 的字段含义与结构同 激活 - Activate。
返回数据格式:
{
"EndTime": "2026-03-01 11:40:41.193",
"LicenseType": 3,
"LicenseTypeStr": "月卡",
"Message": "",
"RemainingCount": 0,
"ServerTime": "2025-12-30 11:40:41.132",
"Status": 0,
}
| 字段名 | 说明 |
|---|---|
| EndTime | 授权到期时间。 |
| LicenseType | 授权类型:0次卡,1小时卡,2日卡,3月卡,4年卡,5永久卡。 |
| LicenseTypeStr | 授权类型描述。 |
| Message | 提示信息。 |
| RemainingCount | 次卡剩余次数。 |
| ServerTime | 服务器时间。 |
| Status | 激活状态:1成功,0失败。 |
接口名称
Trial
DLL调用
long Trial(string userCode, string softCode, string softVersion, string dealerCode);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| userCode | 字符串 | 用户码。 |
| softCode | 字符串 | 软件码。 |
| softVersion | 字符串 | 软件版本。(用于区分你自己的软件版本信息,未来可用于版本控制,可空) |
| dealerCode | 字符串 | 经销商码。(用于区分你自己的经销商信息,未来可用于版本控制,可空) |
示例
C++
long instance = CreateCOLAPlugInterFace();
long result = Trial(instance, "userCode", "softCode", "1.0.0", "dealerCode");
if (result != 0) {
char* json = GetStringFromPtr(result);
printf("试用申请结果: %s\n", json);
FreeStringPtr(result);
}
Python
# 待补充
返回值
成功返回 JSON 字符串格式的授权结果(结构与激活接口相同);失败返回 0。
注意事项
- 返回的字符串指针需要调用 FreeStringPtr 接口释放内存。
- 用户码、软件码、软件版本与经销商码需与欧拉后台中该软件/试用策略的配置一致。
- 试用次数、时长、是否允许重复申请等以 授权平台当前策略 为准;失败时请关注
Message字段说明。
