共用方式為


SPAudit.WriteAuditEvent method (String, String, Int32, String)

寫入稽核項目,以自訂的使用者識別碼。

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Public Function WriteAuditEvent ( _
    eventName As String, _
    eventSource As String, _
    userId As Integer, _
    xmlData As String _
) As Boolean
'用途
Dim instance As SPAudit
Dim eventName As String
Dim eventSource As String
Dim userId As Integer
Dim xmlData As String
Dim returnValue As Boolean

returnValue = instance.WriteAuditEvent(eventName, _
    eventSource, userId, xmlData)
public bool WriteAuditEvent(
    string eventName,
    string eventSource,
    int userId,
    string xmlData
)

參數

  • eventSource
    Type: System.String

    呼叫的應用程式的名稱。

傳回值

Type: System.Boolean
true如果成功 ; 記錄事件否則, false。

備註

只有 「 系統 」 帳戶可以指定使用者識別碼。所有其他嘗試指定不同的識別碼,從他們自己的使用者會被視為詐騙,且會終止。

請參閱

參照

SPAudit class

SPAudit members

WriteAuditEvent overload

Microsoft.SharePoint namespace