C_GetDataString

Call C_GetDataString to get the value of a string data item.

int C_GetDataString(

TOrcFxAPIHandle ObjectHandle,

LPCTSTR lpDataName,

int Index,

LPTSTR lpData,

int *lpStatus

);

Parameters

ObjectHandle (IN)

The handle of the object which owns the data.

lpDataName (IN)

Points to a null-terminated string containing the name of the data item. This is the same name as used in OrcaFlex script files. To find what the name is for a particular data item you should select the data item on the OrcaFlex data form and press F7. For more information see the batch processing section of the OrcaFlex documentation.

Index (IN)

If the data item is part of a table then this is the row number of the table. The first row in the table is always 1. If the data item is not part of a table then this parameter is ignored. You can use C_DataRequiresIndex to determine whether or not an index is required.

lpData (OUT)

Points to a block of memory to receive the data item string. The block of memory must be large enough for the string. To find out how much memory to allocate call C_GetDataString passing NULL as the lpData parameter and use the return value to determine how much memory to allocate.

lpStatus (OUT)

Points to a variable in which the status result for the function call will be returned.

Return value

The length of the data item string (including the null-terminating character).

Unicode and ANSI

The Unicode function name is C_GetDataStringW and the ANSI function name is C_GetDataStringA.

See also

C_DataRequiresIndex, C_DeleteDataRow, C_GetDataRowCount, C_GetDataDouble, C_GetDataInteger, C_GetDataType, C_InsertDataRow, C_SetDataRowCount, C_SetDataDouble, C_SetDataInteger, C_SetDataString.