NetworkDoubleBaseSetLoginAccount 方法 |
设置当前的登录的账户名和密码信息,并启用账户验证的功能,账户名为空时设置不生效
Set the current login account name and password information, and enable the account verification function. The account name setting will not take effect when it is empty
命名空间:
HslCommunication.Core.Net
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.2.0.0 (12.2.0.0)
语法 public void SetLoginAccount(
string userName,
string password
)
Public Sub SetLoginAccount (
userName As String,
password As String
)
public:
void SetLoginAccount(
String^ userName,
String^ password
)
member SetLoginAccount :
userName : string *
password : string -> unit
参数
- userName
- 类型:SystemString
账户名 - password
- 类型:SystemString
密码
备注
当对方的服务器是使用HslCommunication创建的虚拟服务器时,例如modbus服务器,西门子s7服务器等等,就支持进行账户名验证操作,此时的客户端连接之前,就需要调用本方法设置账户密码信息。
When the other party's server is a virtual server created by HslCommunication, such as modbus server, Siemens s7 server, etc.,
it supports account name verification operation. At this time, before the client connects, you need to call this method to set account password information.
参见