Skip to content

Latest commit

 

History

History
77 lines (56 loc) · 3.28 KB

mbccpy-mbccpy-l.md

File metadata and controls

77 lines (56 loc) · 3.28 KB
description title ms.date api_name api_location api_type topic_type f1_keywords helpviewer_keywords ms.assetid
Learn more about: _mbccpy, _mbccpy_l
_mbccpy, _mbccpy_l
4/2/2020
_mbccpy
_mbccpy_l
_o__mbccpy
_o__mbccpy_l
msvcrt.dll
msvcr80.dll
msvcr90.dll
msvcr100.dll
msvcr100_clr0400.dll
msvcr110.dll
msvcr110_clr0400.dll
msvcr120.dll
msvcr120_clr0400.dll
ucrtbase.dll
api-ms-win-crt-multibyte-l1-1-0.dll
DLLExport
apiref
_mbccpy
tccpy
ftccpy
mbccpy
_tccpy
_ftccpy
_tccpy function
_tccpy_l function
tccpy_l function
tccpy function
mbccpy function
_mbccpy_l function
_mbccpy function
mbccpy_l function
13f4de6e-7792-41ac-b319-dd9b135433aa

_mbccpy, _mbccpy_l

Copies a multibyte character from one string to another string. More secure versions of these functions are available; see _mbccpy_s, _mbccpy_s_l.

Important

This API cannot be used in applications that execute in the Windows Runtime. For more information, see CRT functions not supported in Universal Windows Platform apps.

Syntax

void _mbccpy(
   unsigned char *dest,
   const unsigned char *src
);
void _mbccpy_l(
   unsigned char *dest,
   const unsigned char *src,
   _locale_t locale
);

Parameters

dest
Copy destination.

src
Multibyte character to copy.

locale
Locale to use.

Remarks

The _mbccpy function copies one multibyte character from src to dest.

This function validates its parameters. If _mbccpy is passed a null pointer for dest or src, the invalid parameter handler is invoked, as described in Parameter validation. If execution is allowed to continue, errno is set to EINVAL.

_mbccpy uses the current locale for any locale-dependent behavior. _mbccpy_l is identical to _mbccpy except that _mbccpy_l uses the locale passed in for any locale-dependent behavior. For more information, see Locale.

Security Note Use a null-terminated string. The null-terminated string must not exceed the size of the destination buffer. For more information, see Avoiding buffer overruns. Buffer overrun problems are a frequent method of system attack, resulting in an unwarranted elevation of privilege.

By default, this function's global state is scoped to the application. To change this behavior, see Global state in the CRT.

Generic-text routine mappings

Tchar.h routine _UNICODE and _MBCS not defined _MBCS defined _UNICODE defined
_tccpy Maps to macro or inline function _mbccpy Maps to macro or inline function
_tccpy_l n/a _mbccpy_l n/a

Requirements

Routine Required header
_mbccpy <mbctype.h>
_mbccpy_l <mbctype.h>

For more compatibility information, see Compatibility.

See also

Locale
Interpretation of multibyte-character sequences
_mbclen, mblen, _mblen_l