_mbccpy, _mbccpy_l
Copy a multibyte character from one string to another string. These functions are deprecated because more secure versions are available; see _mbccpy_s, _mbccpy_s_l.
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.
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.
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.
| 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 |
| Routine | Required header | Compatibility |
|---|---|---|
| _mbccpy | <mbctype.h> | Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 |
| _mbccpy_l | <mbctype.h> | Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 |
For more compatibility information, see Compatibility in the Introduction.
Not applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.