Share via


IVsThreadPool.ScheduleTask Method

Definition

Overloads

ScheduleTask(IntPtr, IntPtr, UInt32)
ScheduleTask(UInt32, UInt32, UInt32)

Schedules a task to run.

ScheduleTask(IntPtr, IntPtr, UInt32)

public:
 int ScheduleTask(IntPtr pTaskProc, IntPtr pvParam, System::UInt32 priority);
public int ScheduleTask (IntPtr pTaskProc, IntPtr pvParam, uint priority);
abstract member ScheduleTask : nativeint * nativeint * uint32 -> int
Public Function ScheduleTask (pTaskProc As IntPtr, pvParam As IntPtr, priority As UInteger) As Integer

Parameters

pTaskProc
IntPtr

nativeint

pvParam
IntPtr

nativeint

priority
UInt32

Returns

Applies to

ScheduleTask(UInt32, UInt32, UInt32)

Schedules a task to run.

public:
 int ScheduleTask(System::UInt32 pTaskProc, System::UInt32 pvParam, System::UInt32 priority);
public:
 int ScheduleTask(unsigned int pTaskProc, unsigned int pvParam, unsigned int priority);
int ScheduleTask(unsigned int pTaskProc, unsigned int pvParam, unsigned int priority);
public int ScheduleTask (uint pTaskProc, uint pvParam, uint priority);
abstract member ScheduleTask : uint32 * uint32 * uint32 -> int
Public Function ScheduleTask (pTaskProc As UInteger, pvParam As UInteger, priority As UInteger) As Integer

Parameters

pTaskProc
UInt32

[in] The environment explicitly casts this pointer to a PVsBackgroundTask_Function_Pointer prior to being called

pvParam
UInt32

[in] The value passed to the task procedure in pTaskProc when the task is started.

priority
UInt32

[in] This parameter should be set to VSBACKGROUNDTASKPRIORITY_STANDARD.

Returns

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  
);  

Applies to