# GetChainedPanelCallbackData

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

## Purpose

This function retrieves the callback data for a callback function that was linked to a panel by the ChainPanelCallback function.

This function is typically used to implement helper functions which operate on panels which have been customized using ChainPanelCallback.

As an example, imagine that ChainPanelCallback is used to cause a help window to appear when the right mouse button is clicked on a panel. If the callback data for the chained callback contained a pointer to a structure which described what help information to display, then GetChainedPanelCallbackData could be used to implement hypothetical functions such as GetHelpInfo(panel, info) and SetHelpInfo(panel, newInfo). These functions would use GetChainedPanelCallbackData to retrieve and/or modify the help information pointed to by the callback data.

## 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.
typeName | const char [] | Pass in the string that was passed to ChainPanelCallback to specify the type name of the link. If the control has not been previously linked by ChainPanelCallback with specified type name, then nothing is done and the error code UIEInvalidControlType (–45) is returned.
Output
Name | Type | Description
callbackData | void ** | Pass the address of a variable of type pointer to void (void *). The callback data that was specified in the call to ChainPanelCallback will be placed in this variable.

## 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 ChainPanelCallback 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.