发表于:2006-02-27 20:22:00
7楼
先在WINCC中新建一个用户名和密码,再建一个按钮,在按钮的EVENTS->MOUSE->MOUSE ACTION中编写C脚本:
#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName)
{
#pragma code("useadmin.dll")
#include "PWRT_api.h"
#pragma code( )
char c;
PWRTLogin(c);
}
然后在访问按钮的PROPERIES->MISCELLANEOUS->AUTHORIZATION中选择你的授权