IScheduler::CreatePool method

Creates a pool on a cluster based on the supplied name with a desired weight. An exception is thrown if a pool with the same name exists.

Syntax

HRESULT CreatePool(
  [in]  BSTR           *poolName,
  [in]  long           poolWeight,
  [out] ISchedulerPool *pool
);

Parameters

  • poolName [in]
    The name of the pool that will be created on the cluster.

  • poolWeight [in]
    The weight of the pool that will be created on the cluster. The pool weight must be greater or equal to 0, otherwise an exception is thrown.

  • pool [out]
    The new pool.

Return value

If the method succeeds, the return value is S_OK. Otherwise, the return value is an error code. To get a description of the error, access the ISchedulerJob::ErrorMessage property.

Requirements

Product

This method was introduced in Windows HPC Server 2008 R2 Service Pack 2 (SP2) and is not supported in previous versions.

Type library

Microsoft.Hpc.Scheduler.tlb

See also

IScheduler

IScheduler::CreatePool

IScheduler::DeletePool

IScheduler::GetPoolList

IScheduler::OpenPool

Pool Property of ISchedulerJob