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
)
參數
eventName
Type: System.String事件名稱。
eventSource
Type: System.String呼叫的應用程式的名稱。
userId
Type: System.Int32自訂的使用者識別碼。
xmlData
Type: System.String事件的相關資訊。
傳回值
Type: System.Boolean
true如果成功 ; 記錄事件否則, false。
備註
只有 「 系統 」 帳戶可以指定使用者識別碼。所有其他嘗試指定不同的識別碼,從他們自己的使用者會被視為詐騙,且會終止。