Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Schedules a task to run.
Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)
Syntax
'Declaration
Function ScheduleTask ( _
    pTaskProc As UInteger, _
    pvParam As UInteger, _
    priority As UInteger _
) As Integer
int ScheduleTask(
    uint pTaskProc,
    uint pvParam,
    uint priority
)
int ScheduleTask(
    [InAttribute] unsigned int pTaskProc, 
    [InAttribute] unsigned int pvParam, 
    [InAttribute] unsigned int priority
)
abstract ScheduleTask : 
        pTaskProc:uint32 * 
        pvParam:uint32 * 
        priority:uint32 -> int
function ScheduleTask(
    pTaskProc : uint, 
    pvParam : uint, 
    priority : uint
) : int
Parameters
- pTaskProc 
 Type: UInt32- [in] The environment explicitly casts this pointer to a PVsBackgroundTask_Function_Pointer prior to being called 
- pvParam 
 Type: UInt32- [in] The value passed to the task procedure in pTaskProc when the task is started. 
- priority 
 Type: UInt32- [in] This parameter should be set to VSBACKGROUNDTASKPRIORITY_STANDARD. 
Return Value
Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
Task procs have the following type:
typedef void (__cdecl * PVsBackgroundTask_Proc)(DWORD_PTR pvParam, HANDLE hThreadTerminationEvent)
COM Signature
From vsshell.idl:
HRESULT IVsThreadPool::ScheduleTask(
   [in] DWORD_PTR pTaskProc, 
   [in] DWORD_PTR pvParam
);
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.