NCS_WherePools

Passes in the number of pools allocated and fills in an array.

Syntax

 #include <ncssdk.h> 
  
 NCS_RETURN NCS_WherePools (
   NCS_HANDLE       Handle, 
   UINT32          *NumPools, 
   NCS_POOL_INFO   *PoolArray);
 

Parameters

Handle

(IN) Specifies the application’s handle.

NumPools

(IN) Points to the number of cluster-enabled pools in the cluster.

PoolArray

(OUT) Points to a preallocated array of NCS_POOL_INFO structures, which are filled in with pool information for all cluster-enabled pools. For any particular pool in the array, call NCS_WhatVolumes to fill in additional information concerning the volumes on that pool.

Return Values

Name

Description

SUCCESS

NCS_SUCCESS.

NCS_ALLOC_ERROR

Insufficient memory to perform the operation.

NCS_BAD_PARAMETER

See NDS Error Codes.

NCS_UNKNOWN

Unspecified error.

Remarks

There are three functions used to enumerate pools and volumes in a cluster as described below:

  1. NCS_NumPools determines how many cluster-enabled pools there are within a cluster. The return value from this fuction is an integer specifying the number of pools. You then allocate sufficient memory to hold an array of structures that matches the number of pools within the cluster.

  2. Call NCS_WherePools and pass in the number of pools defined above. This provides the information required from all of the pools included with the cluster. Some of the information passed in might include the DN of the pool, the directory name of the pool, etc.

  3. For each element in the array, call NCS_WhatVolumes to fill in the volume parameters of type NCS_POOL_INFO for that member of the array. In most cases, you have only one volume on each pool, but multiple volumes are allowed if you wish.

The numVols field is used to allocate Volinfo structures for calling NCS_WhatVolumes. On NetWare 5.1, the numVols only returns 1, and NCS_WhatVolumes shouldn’t be called. On NW 5.1, the pool name and FDN become volume fields.