登录 - Login
函数简介
用户登录授权系统,验证用户身份并注册插件功能。本接口登录成功会自动注册插件,不需要调用 Reg 接口重复注册,也不需要提前注册避免无效扣费。
返回数据格式:
{
"EndTime": "2026-01-30 11:40:41.193",
"LastVersion": "",
"LicenseType": 3,
"LicenseTypeStr": "月卡",
"Message": "",
"RemainingCount": 0,
"ServerTime": "2025-12-30 11:40:41.714",
"Status": 1,
"TotalCount": 0
}
| 字段名 | 说明 |
|---|---|
| EndTime | 授权到期时间。 |
| LastVersion | 最新的版本号。 |
| LicenseType | 授权类型:0次卡,1小时卡,2日卡,3月卡,4年卡,5永久卡。 |
| LicenseTypeStr | 授权类型中文描述。 |
| Message | 提示信息。 |
| RemainingCount | 次卡剩余数量。 |
| ServerTime | 服务器时间。 |
| Status | 授权状态:1正常,0失败。 |
| TotalCount | 次卡总数。 |
接口名称
Login
DLL调用
long Login(string userCode, string softCode, string featureList, string softVersion, string dealerCode);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| userCode | 字符串 | 用户码。 |
| softCode | 字符串 | 软件码。 |
| featureList | 字符串 | 功能列表。为空时只使用授权系统,不注册插件。 |
| softVersion | 字符串 | 软件版本。 |
| dealerCode | 字符串 | 经销商码。 |
示例
C++
long instance = CreateCOLAPlugInterFace();
long result = Login(instance, "userCode", "softCode", "feature1,feature2", "1.0.0", "dealerCode");
if (result != 0) {
char* json = GetStringFromPtr(result);
printf("登录结果: %s\n", json);
FreeStringPtr(result);
}
Python
# 待补充
返回值
成功返回JSON字符串格式的登录结果;失败返回 0。
注意事项
- 返回的字符串指针需要调用 FreeStringPtr 接口释放内存。
- 如果 featureList 参数为空,则只使用授权系统功能,不会注册相关插件功能。
- 用户码、软件码和经销商码需要从授权平台获取。
