NWSMCopyGenericString

Copies the source string to the destination string.

Syntax

  #include <smsutapi.h> 
   
  void* NWSMCopyGenericString ( 
     UINT32             nameSpaceType, 
     STRING_BUFFER **dest, 
     void              *src);
  

Parameters

nameSpaceType

(IN) Specifies the name space type of the source and destination strings (see nameSpaceType Values).

dest

(OUT) Points to the buffer to receive the copied string.

src

(IN) Points to the string to copy.

Return Values

The following table lists the return values associated with the function.

NULL

Cannot copy the strings.

Nonzero

The strings are copied and the pointer points to dest.string.

Remarks

NWSMCopyGenericString supports strings in UTF-8 format and mult-byte formatting.

To free the string, call NWSMFreeString.

If dest is NULL, NWSMCopyGenericString allocates memory for the string. If dest.string is too small to contain the concatenated strings, NWSMCopyGenericString frees the memory and allocates a new structure with more memory.

See Also

NWSMFreeString

NWSMCopyGenericString Example

  #include <smsutapi.h> 
   
  STRING resultString; 
  STRING_BUFFER *dest = NULL; 
  char *src = “string”; 
  INT16 srcLen = sizeof(src);  
   
  resultString = NWSMCopyString(&dest, src, srcLen);