zoukankan      html  css  js  c++  java
  • InsertAuditEntryNew

    Function InsertAuditEntryNew(strOldValue, strNewValue, strOpComments, iComment) 
        
         
        ' WinCC Audit Scripting PlugIn Instance
        Dim objWinCCAuditPlugIn
        
        'Obtain the Audit PlugIn
        Set objWinCCAuditPlugIn = CreateObject("CCAuditCollector.CCAuditScriptPlugIn.1")
        
        If (Not (objWinCCAuditPlugIn Is Nothing))  Then
            
            
            Dim objAuditTag
            Set objAuditTag = Nothing 
            
            Dim strTargetName 
            Dim strApplicationUser
            Dim strAuditType
            
            Dim strReturnBuffer
            
            Set objAuditTag = HMIRuntime.Tags("@local::@CurrentUser")
            strApplicationUser = objAuditTag.Read()
            If (Len(strApplicationUser) = 0) Then
                strApplicationUser = "NOT_LOGGED_ON"
            End If
            
            strTargetName = "VBScripting Runtime"
            strAuditType = "OA"
            
            Dim currentLang 
            currentLang = HMIRuntime.Language
            
            objWinCCAuditPlugIn.SetCurrentLanguage(currentLang)
        
            Call objWinCCAuditPlugIn.InsertEntry(strApplicationUser, _
                                                                0, _ 
                                                                strTargetName, _
                                                                strOldValue, _ 
                                                                strNewValue, _
                                                                0, _ 
                                                                iComment, _
                                                                strOpComments, _					
                                                                strAuditType) 
        
        Else
            HMIRuntime.Traces(err.Description)
        End If
    
        'Release the Audit PlugIn 
        Set objWinCCAuditPlugIn = Nothing
    
        InsertAuditEntryNew = err.Description
        HMIRuntime.Trace(err.Description)
        
        
    End Function
    

      

  • 相关阅读:
    爬虫心得
    WSL windows子系统ubuntu18.04建设自己的乌云
    WSL windwos 子系统 ubuntu18.04安装mysql
    python 163 email 554
    Centos 安装Oracle
    JS带进度 文件 重复 自动 异步上传
    xadmin 小组件默认折叠
    grep
    sed
    awk
  • 原文地址:https://www.cnblogs.com/yada/p/13821116.html
Copyright © 2011-2022 走看看