发布于 2004-08-22 02:20:54
0楼
QUESTION:
How can I change the password for the user logged in in WinCC runtime?
ANSWER:
You can use the WinCC API function "PWGENChangePassword". The function requires four parameters:
The user name
The old password of the user
The new password of the user
And a pointer to an error structure.
The feedback value of the function is "TRUE" if the password was successfully changed and "FALSE" if an error occurred.
Before starting this function, you must first make a connection to the database. To do this you can use the "PWGENConnect" function. This function needs the parameters "DataSourceName" of project and a pointer to an error structure. If a successful connection is made to the database, the feedback value of the function is "TRUE", otherwise it is "FALSE".
After successfully changing the password, you should terminate the connection to the database using the"PWGENDisconnect" function. This function needs a pointer to an error structure as parameter, and when successfully disconnected gives a "TRUE" feedback and otherwise "FALSE".
Note:
Pay attention to your plant configuration while using this functionality. In the server-client/multiclient mode, the password has to be adapted on every station.
As of a higher version than SIMATIC WinCC V6.0 the functionality described here, is not available any more.