# SetChainedCallbackData

int SetChainedCallbackData (int panel, int ctrl, const char typeName[], void *callbackData);

## Purpose

This function changes the callback data for a callback function that was linked to a control by the ChainCtrlCallback function.

## Parameters

Input
Name | Type | Description
panel | integer | The specifier for a particular panel that is currently in memory. This handle will have been returned by the LoadPanel, NewPanel, or DuplicatePanel function.
ctrl | integer | Pass the ID of the control for which the callback data of its chained callback with the specified type name is to be retrieved. The ID is the defined constant (located in the UIR header file) which was assigned to the control in the User Interface Editor, or the ID returned by the NewCtrl or DuplicateCtrl function.
typeName | const char [] | Pass in the string that was passed to ChainCtrlCallback to specify the type name of the link. Pass an empty string if you want to set the original callback data (if it exists) before any ChainCtrlCallback was performed. If the control has not been previously linked by ChainCtrlCallback with specified type name, then nothing is done and the error code UIEInvalidControlType (–45) is returned.
callbackData | void * | Pass a value of type pointer to void (void *). The callback data that was specified in the call to ChainCtrlCallback will be replaced with this value.

## Return Value

Name | Type | Description
status | integer | Returns 0 if the function succeeded or a negative error code if the function failed. If the control has not been previously linked by ChainCtrlCallback with specified type name, then nothing is done and the error code UIEInvalidControlType (–45) is returned. The possible negative error codes are:
–1 to –999 | A User Interface Library error code. (Constants are available in userint.h.)
A description of any of these error codes can be obtained using the GetGeneralErrorString function in the toolbox.fp instrument driver.