Home COM GDI+ WebBrowser Data Access

IDXTaskManager Interface

 

CLSID_DXTaskManager

{4CB26C03-FF93-11D0-817E-0000F87557DB}

IID_IDXTaskManager

{254DBBC1-F922-11D0-883A-3C8B00C10000}

 

 

The IDXTaskManager interface enables you to configure the task manager to specify the thread pool size and the thread concurrency limit.

 

Remarks

 

The task manager is a generic service used to schedule and execute caller-defined tasks. It automatically breaks a transform task into threads and manages their completion, which improves the efficiency of the transform.

The default thread pool size is two threads per processor, and the default concurrency limit is one thread per processor. The default implementation uses input/output completion ports on Microsoft Windows NT to optimize processor utilization.
 

 

Methods in VTable order

IUnknown Methods

Description

QueryInterface

Returns pointers to supported interfaces.

AddRef

Increments reference count.

Release

Decrements reference count.

IDXTaskManager Members

Description

QueryNumProcessors

Retrieves the number of processors installed in the system.

SetThreadPoolSize

Specifies the number of threads to create and make available to execute tasks.

GetThreadPoolSize

Retrieves the number of threads in the thread pool.

SetConcurrencyLimit

Defines the number of threads that can execute from a thread pool at a given time.

GetConcurrencyLimit

Retrieves the number of threads allowed to execute on a single processor at a given time.

ScheduleTasks

Defines a set of tasks to execute.

TerminateTasks

Terminates a set of tasks previously scheduled by the task manager.

TerminateRequest

Terminates a task based on its request identifier (ID) value that was used when the task was scheduled.

   

QueryNumProcessors

 

FUNCTION IDXTaskManager_QueryNumProcessors ( _
  BYVAL
pthis AS DWORD PTR _
, BYREF
pulNumProc AS DWORD _
  ) AS LONG

  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[3] USING IDXTaskManager_QueryNumProcessors (pthis, pulNumProc) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

SetThreadPoolSize

 

FUNCTION IDXTaskManager_SetThreadPoolSize ( _
  BYVAL
pthis AS DWORD PTR _
, BYVAL
ulNumThreads AS DWORD _
  ) AS LONG

  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[4] USING IDXTaskManager_SetThreadPoolSize (pthis, ulNumThreads) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

GetThreadPoolSize

 

FUNCTION IDXTaskManager_GetThreadPoolSize ( _
  BYVAL
pthis AS DWORD PTR _
, BYREF
pulNumThreads AS DWORD _
  ) AS LONG

  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[5] USING IDXTaskManager_GetThreadPoolSize (pthis, pulNumThreads) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

SetConcurrencyLimit

 

FUNCTION IDXTaskManager_SetConcurrencyLimit ( _
  BYVAL
pthis AS DWORD PTR _
, BYVAL
ulNumThreads AS DWORD _
  ) AS LONG

  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[6] USING IDXTaskManager_SetConcurrencyLimit (pthis, ulNumThreads) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

GetConcurrencyLimit

 

FUNCTION IDXTaskManager_GetConcurrencyLimit ( _
  BYVAL
pthis AS DWORD PTR _
, BYREF
pulNumThreads AS DWORD _
  ) AS LONG

  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[7] USING IDXTaskManager_GetConcurrencyLimit (pthis, pulNumThreads) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

ScheduleTasks

 

FUNCTION IDXTaskManager_ScheduleTasks ( _
  BYVAL
pthis AS DWORD PTR _
, BYREF
TaskInfo AS DXTMTASKINFO _
, BYVAL
Events AS DWORD _
, BYREF
TaskIDs AS DWORD _
, BYVAL
ulNumTasks AS DWORD _
, BYVAL
ulWaitPeriod AS DWORD _
  ) AS LONG

  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[8] USING IDXTaskManager_ScheduleTasks (pthis, TaskInfo, Events, TaskIDs, ulNumTasks, ulWaitPeriod) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

TerminateTasks

 

FUNCTION IDXTaskManager_TerminateTasks ( _
  BYVAL
pthis AS DWORD PTR _
, BYVAL
TaskIDs AS DWORD PTR _
, BYVAL
ulCount AS DWORD _
, BYVAL
ulTimeOut AS DWORD _
  ) AS LONG

  LOCAL
HRESULT AS LONG
  CALL DWORD
@@pthis[9] USING IDXTaskManager_TerminateTasks (pthis, TaskIDs, ulCount, ulTimeOut) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

TerminateRequest

 

FUNCTION IDXTaskManager_TerminateRequest ( _
  BYVAL
pthis AS DWORD PTR _
, BYREF
RequestID AS GUID _
, BYVAL
ulTimeOut AS DWORD _
  ) AS LONG

  LOCAL
HRESULT AS LONG
  CALL DWORD @@pthis[10] USING
IDXTaskManager_TerminateRequest (pthis, RequestID, ulTimeOut) TO HRESULT
  FUNCTION =
HRESULT

END FUNCTION
 

 

Page last updated on Monday, 03 April 2006 19:49:44 +0200