This function copies at most smax wchar_t's from src to dest, up to dmax.
- Parameters
-
[out] | dest | pointer to the memory that will be replaced by src. |
[in] | dmax | maximum length of the resulting dest, in wchar_t |
[in] | src | pointer to the memory that will be copied to dest |
[in] | smax | number of wide characters to copy |
- Precondition
- Neither dest nor src shall be a null pointer.
-
Neither dmax nor smax shall be 0.
-
dmax shall not be greater than RSIZE_MAX_MEM16.
-
smax shall not be greater than dmax.
-
Copying shall not take place between regions that overlap.
- Returns
- If there is a runtime-constraint violation, the memcpy_s function stores zeros in the first dmax bytes of the region pointed to by dest if dest is not a null pointer and smax is valid.
- Return values
-
EOK | when operation is successful |
ESNULLP | when dst/src is NULL POINTER |
ESZEROL | when dmax/smax = ZERO |
ESLEMAX | when dmax/smax > RSIZE_MAX_MEM16 |
ESNOSPC | when dmax < smax |
ESOVRLP | when src memory overlaps dst |
- See also
- memcpy_s(), memcpy16_s(), wmemmove_s(), memmove16_s()