恭喜,你发布的帖子
发布于 2018-08-05 15:23:02
1楼
1.WINCC密码修改和设置,添加如下C脚本:
#pragma code("UseGen.dll")
#include "USEGENAP.H"
#pragma code()
LPCMN_ERROR err;
CHAR* txtnewpassword = NULL;
CHAR* txtconfirmpassword = NULL;
SetTagBit("ChangePasswordOk",FALSE);
SetTagBit("PasswordError",FALSE);
txtnewpassword = GetTagChar("newpassword");
txtconfirmpassword = GetTagChar("confirmpassword");
if (strcmp(txtnewpassword,txtconfirmpassword) == 0) //Return-Type: long int
{
if (PWGENConnect("CC_OS_13_02_05_14_59_10",err))
{
if(PWGENChangePassword(GetTagChar("user"),GetTagChar("oldpassword"),GetTagChar("newpassword"),err))
{
SetTagBit("ChangePasswordOk",TRUE); //Return-Type: BOOL
}
else
{
SetTagBit("PasswordError",TRUE);
}
}
}
else
{
SetTagBit("PasswordError",TRUE);
}
PWGENDisconnect(err);
2.退出WINCC的VBS脚本:
hmiruntime.stop
请填写推广理由:
分享
只看
楼主