Files
2026-04-06 17:42:09 +08:00

26 lines
559 B
C++

/*
* C++ 调用示例:初始化、校验许可、销毁句柄。
*
* 版权所有 © 广州创飞人工智能技术有限公司
* 开发者:huangping@craftlabs.cn
*/
#include "craftlabs_auth.h"
#include <cstdio>
#include <cstdlib>
int main() {
AuthHandle h = auth_initialize("{}");
if (!h) {
return EXIT_FAILURE;
}
AuthResult r = auth_check_license(h);
if (r.success == 0) {
auth_destroy(h);
return EXIT_FAILURE;
}
auth_destroy(h);
std::printf("example cpp ok\n");
return EXIT_SUCCESS;
}