SPThreadPool.QueueUserWorkItemWithImpersonation Method
Queues a method for execution by using the identity of the remote user.
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Public Shared Function QueueUserWorkItemWithImpersonation ( _
callback As WaitCallback, _
state As Object _
) As Boolean
'Usage
Dim callback As WaitCallback
Dim state As Object
Dim returnValue As Boolean
returnValue = SPThreadPool.QueueUserWorkItemWithImpersonation(callback, _
state)
public static bool QueueUserWorkItemWithImpersonation(
WaitCallback callback,
Object state
)
Parameters
callback
Type: System.Threading.WaitCallbackA [T:System.Threading.][WaitCallback] delegate that represents the method to execute.
state
Type: System.ObjectAn object that contains data to be used by the method.
Return Value
Type: System.Boolean
true if the method is successfully queued; otherwise, false.