GetContinuousUser 方法示例

下列示例确保输入的用户名有效,创建ESignature对象,检查节点是否启用了电子签名,设置并获取连续用户的名称。

Dim ESig As Object

Dim bNodeSignEnabled As Boolean

Dim bSigRequired As Boolean

Dim UserName As String

Dim SetName As String

'有效的用户名

SetName = "TestUser"

'创建 ESignature 对象

Set ESig = CreateObject("ElectronicSignature.ESignature")

'检查节点是否启用了电子签名

ESig.IsNodeSignEnabled bNodeSignEnabled

If bNodeSignEnabled = True Then

'Set the name of the continuous user to "TestUser"

ESig.SetContinuousUser SetName

'取得连续用户的名称

ESig.GetContinuousUser UserName

MsgBox “连续用户:” & UserName

Else

'未对签名启用硬件密钥,已禁用安全性,或者已启用绕过签名

MsgBox "Signature is not enabled on this node."

End If

 

您最近了解过 iFIX 吗 ?

查看最新版 iFIX 的所有新功能。

让 iFIX 帮助您提高效率,降低成本。