# dispSetParmByName

Permanently modifies the value of a default parameter.

#### Prototype

DWORD dispSetParmByName (CTAHD ctahd, char *parmname, void *buffer, unsigned size)

Argument | Description
ctahd | Handle to a Natural Access context.
parmname | Pointer to a parameter name or field.
buffer | Pointer to a buffer to receive the parameter value.
size | Size of buffer.

#### Return values

Return value | Description
SUCCESS |
CTAERR_BAD_ARGUMENT | Required pointer argument is NULL.
CTAERR_BAD_SIZE | size is set to zero.
CTAERR_INVALID_CTAHD | Specified ctahd is invalid.
CTAERR_NOT_FOUND | Specified parameter does not exist or the owning service was not initialized.
CTAERR_NOT_INITIALIZED | Natural Access was not yet initialized.

#### Details

dispSetParmByName permanently modifies the default parameter values specified by parmname on the specified context. If the parameter is a single field, only that value is updated. If the field name is missing, this function updates the entire parameter structure with the defaults contained in buffer. It is assumed that size matches exactly for either case.

Note: This function should be used very carefully since it modifies the per-context values without the knowledge of the application. It is typically the application's responsibility to maintain and modify parameter values.

#### See also

dispCheckParmByName, dispGetParmByName, dispGetParms