Share via


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)

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

  • state
    Type: System.Object

    An object that contains data to be used by the method.

Return value

Type: System.Boolean
true if the method is successfully queued; otherwise, false.

See also

Reference

SPThreadPool class

SPThreadPool members

Microsoft.SharePoint.Utilities namespace