Admin Production ni-theme
Current Publication

AllocateCtrlValString

LabWindows/CVI

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 int The specifier for a particular panel that is currently in memory.

You obtain the handle by calling the LoadPanel, NewPanel, or DuplicatePanel function.
controlID int 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 int Returns a negative error code if an error occurs.

Additional Information

Library: Programmer's Toolbox

Include file: toolbox\toolbox.h

LabWindows/CVI compatibility: LabWindows/CVI 6.0 and later