TutOptionGetStr get the value of a string option
option
option that contains a string value.
str_val_return
pointer to a T_STR into which TutOptionGetStr copies a pointer to the string.
TRUE
if the value is retrieved successfully, FALSE
otherwise.
If TutOptionGetStr fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TutOptionGetStr gets the string value of option
. A T_STR pointer value is copied into storage pointed to by str_val_return
, but no additional space is allocated for the string itself.
The storage pointed to by str_val_return
should not be modified or freed. The storage is thread safe, but may be overwritten by subsequent calls to SmartSockets APIs within the same thread. If you wish to preserve the value, you should make a copy of the value.
This example gets the value of the option named str_opt
:
T_OPTION str_opt; T_STR str_val; str_opt = TutOptionLookup("str_opt"); if (str_opt == NULL) {/* error */
} if (!TutOptionGetStr(str_opt, &str_val)) {/* error */
}
TIBCO SmartSockets™ Utilities Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |