IVsThreadPool::ScheduleTask Method (UInt32, UInt32, UInt32)

 

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)

int ScheduleTask(
	unsigned int pTaskProc,
	unsigned int pvParam,
	unsigned int priority
)

Parameters

pTaskProc
Type: System::UInt32

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

pvParam
Type: System::UInt32

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

priority
Type: System::UInt32

[in] This parameter should be set to VSBACKGROUNDTASKPRIORITY_STANDARD.

Return Value

Type: System::Int32

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Task procs have the following type:

typedef void (__cdecl * PVsBackgroundTask_Proc)(DWORD_PTR pvParam, HANDLE hThreadTerminationEvent)

From vsshell.idl:

HRESULT IVsThreadPool::ScheduleTask(
   [in] DWORD_PTR pTaskProc, 
   [in] DWORD_PTR pvParam
);
Return to top
Show: