📄 getfirmversion.c
字号:
#include <string.h>
#include "ServerUtl.h"
#include "mainprofile_error.h"
char chFileName[255];
int main(int argc, char* argv[])
{
TSERVERUTL_PACK_VERSION_INFO tPackVersionInfo;
if (HandleFileArgument(argc, argv) < 0)
return -1;
if (GetFirmwareVersion(chFileName, &tPackVersionInfo) != 0)
return -1;
printf("FirmVersion: %s\n", tPackVersionInfo.szFirmVersion);
printf("SupportScriptVersion: %s\n", tPackVersionInfo.szSupportScriptVersion);
printf("WebVersion: %s\n", tPackVersionInfo.szWebVersion);
printf("ScriptVersion: %s\n", tPackVersionInfo.szScriptVersion);
printf("ViewerPluginVersion: %s\n", tPackVersionInfo.szViewerPluginVersion);
printf("UpgragePluginVersion: %s\n", tPackVersionInfo.szUpgragePluginVersion);
printf("SupportedModel: %s\n", tPackVersionInfo.szSupportedModel);
printf("Language: %s\n", tPackVersionInfo.szLanguage);
return 0;
}
int HandleFileArgument(int argc, char* argv[])
{
int nCnt;
chFileName[0] = 0;
for (nCnt = 1; nCnt < argc; nCnt++)
{
if (strncmp(argv[nCnt], "-R", 2) == 0 && strlen(argv[nCnt]) > 2)
{
strncpy(chFileName, &argv[nCnt][2], sizeof(chFileName));
chFileName[sizeof(chFileName) - 1] = 0;
}
}
if (chFileName[0] == 0)
{
printf("please input file path");
return -1;
}
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -