C_GetTag

Call C_GetTag to get the value of an object tag.

int C_GetTag(

TOrcFxAPIHandle ObjectHandle,

LPTCSTR lpName,

LPTSTR lpValue,

int *lpStatus

);

Parameters

ObjectHandle (IN)

The handle of the object.

lpName (IN)

Points to a null-terminated string containing the name of the tag.

lpValue (OUT)

Points to a block of memory to receive the tag value string. The block of memory must be large enough for the string. To find out how much memory to allocate call C_GetTag passing NULL as the lpValue 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 tag value string (including the null-terminating character).

Remarks

If the object does not contain a tag with the specified name, a status of stTagNotFound will be returned. This can be used to test whether or not an object contains a specific tag. Call C_GetTag passing NULL as the lpValue parameter, and check the returned status against stTagNotFound.

Unicode and ANSI

The Unicode function name is C_GetTagW and the ANSI function name is C_GetTagA.

See also

C_ClearTags, C_DeleteTag, C_DestroyTags, C_GetTagCount, C_GetTags, C_SetTag.