ReactOS 0.4.16-dev-2110-ge3521eb
wmemmove_s.cpp
Go to the documentation of this file.
1//
2// wmemmove_s.cpp
3//
4// Copyright (c) Microsoft Corporation. All rights reserved.
5//
6// Defines wmemmove_s(), which copies wide characters from a source buffer to a
7// destination buffer. Overlapping buffers are treated specially, to avoid
8// propagation.
9//
10// Returns 0 if successful; an error code on failure.
11//
12#include <corecrt_internal.h>
13#include <wchar.h>
14
15
16
18 wchar_t* const destination,
19 size_t const size_in_elements,
20 wchar_t const* const source,
21 size_t const count
22 )
23{
24 if (count == 0)
25 return 0;
26
27#pragma warning(suppress:__WARNING_HIGH_PRIORITY_OVERFLOW_POSTCONDITION)
28 _VALIDATE_RETURN_ERRCODE(destination != nullptr, EINVAL);
31
32#pragma warning(suppress:__WARNING_BANNED_API_USAGEL2) /* 28726 */
33 wmemmove(destination, source, count);
34 return 0;
35}
size_t const size_in_elements
int errno_t
Definition: corecrt.h:249
#define __cdecl
Definition: corecrt.h:121
#define EINVAL
Definition: errno.h:44
#define ERANGE
Definition: errno.h:55
static wchar_t *__cdecl wmemmove(wchar_t *dst, const wchar_t *src, size_t n)
Definition: wchar.h:72
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define _VALIDATE_RETURN_ERRCODE(expr, errorcode)
errno_t __cdecl wmemmove_s(wchar_t *const destination, size_t const size_in_elements, wchar_t const *const source, size_t const count)
Definition: wmemmove_s.cpp:17