# CmtSetThreadPoolAttribute

int CmtSetThreadPoolAttribute (int poolHandle, int attributeID, ...);

## Purpose

Sets the value of thread pool attributes.

You can set certain attributes only before any threads in the thread pool are created. If you want to modify these attributes, you must do so before you schedule any functions in the thread pool. You cannot set any attributes of the default thread pool.

## Parameters

Input
Name | Type | Description
poolHandle | integer | The handle you obtained from CmtNewThreadPool to identify the thread pool. Do not pass DEFAULT_THREAD_POOL_HANDLE to this function.
attributeID | integer | The ID of a thread pool attribute.
attributeValue | Depends on the attribute | The value to which you want to set the attribute.

## Return Value

Name | Type | Description
CmtStatus | integer | The CmtStatus code that the function call returns. This function returns 0 to indicate success and negative values to indicate failure. Pass the CmtStatus code to CmtGetErrorMessage to get a description of the error code.