The two primitives provided for converting the UCS-2 encoded ArgList
attribute are:
Veritas Cluster Server on Windows allows users to use localized values for attributes. Therefore, Windows agents must handle UCS-2 encoded or OS encoded values. All arguments in the ArgList
attribute are passed to the Windows agents in UTF-8 encoding, which the agent must convert to UCS-2 encoding or OS encoding. The VCSAgGetEncodedArgList
is provided for this purpose.
VCSAgGetEncodedArgList
allocates memory as needed to the encoded ArgList
array output. This memory can be freed by the caller using the primitive VCSAgDelEncodedArgList
.
See VCSAgDelEncodedArgList).
int VCSAgGetEncodedArgList (VCSAgEncodingType from_encoding, void
**input_arglist_values, VCSAgEncodingType to_encoding, void
This primitive converts the ArgList values in UTF-8 encoding to UCS-2 or the OS encoding. VCSAgGetEncodedArgList
stores a pointer to the encoded array in the "output_arglist_values
" and returns 0 on success and 1 on failure.
The input ArgList
array must be terminated with a NULL string to indicate the end of the input ArgList
.
Note This primitive only supports conversions to UCS-2 and OS encoding.
void VCSAgDelEncodedArgList (void **enc_arg_list)
This primitive must be used to free the memory allocated by the agent in the primitive VCSAgGetEncodedArgList
. This primitive expects the input, enc_arg_list
, to be terminated by a NULL string. VCSAgDelEncodedArgList
can be called from any entry point that is passed the ArgList
values.