# AllocateCtrlValString

int AllocateCtrlValString (int panelHandle, int controlID, char **allocatedStringValue);

## Purpose

This function returns a string that contains a copy of the value of a control.

The control must contain a string value.

The function dynamically allocates the string. Call the free function to deallocate the string when you are done with it.

## Parameters

Input
Name | Type | Description
panelHandle | integer | The specifier for a particular panel that is currently in memory. You obtain the handle by calling the LoadPanel, NewPanel, or DuplicatePanel function.
controlID | integer | The defined constant (located in the UIR header file) that you assign to the control in the User Interface Editor, or the ID that you obtain by calling the NewCtrl or DuplicateCtrl function.
Output
Name | Type | Description
allocatedStringValue | char ** | The dynamically allocated string that the function returns. Call the free function to deallocate the string when you are done with it.

## Return Value

Name | Type | Description
status | integer | Returns a negative error code if an error occurs.