Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6ISafeString::strlncpy ( P6CHAR pszDest,
P6SIZE  cDest,
const P6CHAR pszSource,
P6SIZE  cSourceLen,
P6SIZE pcCopied 
)
pure virtual

Copies cSourceLen characters from pszSource to pszDest and always NULL terminates the output.

Note
This method is safer than the original BSD strlncpy() implementation. The original strlcpy() implementation does not always null terminate the output and provides no real indication of error. For example strlcpy(buffer,"astring",2) would silently fail and NOT null terminate the output. Our implementation returns eTooBig and NULL terminates the output even on error.
Parameters
pszDest[ out ] A pointer to the destination buffer.
cDest[ in ] The maximum number of charaters to copy.
pszSource[ in ] A pointer to the NULL terminated string to copy.
cSourceLen[ in ] The number of characters to copy from pszSource.
pcCopied[out, optional] The address of a variable in which, on success, will be placed the number of characters copied to pszDest (not including the NULL terminator). On failure this will be set to zero. If this information is not required, NULL can be passed.
Returns
SuccessP6R::eOk 
FailureP6R::eInvalidArgpszDest or pszSource is NULL or cDest is zero
P6R::eTooBigpszSource is longer than cDest characters. The output was truncated.