mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:12:59 +00:00
[UCRT] Import Microsoft.Windows.SDK.CRTSource version 10.0.22621.3
Imported from https://www.nuget.org/packages/Microsoft.Windows.SDK.CRTSource/10.0.22621.3 License: MIT
This commit is contained in:
parent
f1b60c66f0
commit
04e0dc4a7a
568 changed files with 115483 additions and 0 deletions
35
sdk/lib/ucrt/string/wmemmove_s.cpp
Normal file
35
sdk/lib/ucrt/string/wmemmove_s.cpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
//
|
||||
// wmemmove_s.cpp
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// Defines wmemmove_s(), which copies wide characters from a source buffer to a
|
||||
// destination buffer. Overlapping buffers are treated specially, to avoid
|
||||
// propagation.
|
||||
//
|
||||
// Returns 0 if successful; an error code on failure.
|
||||
//
|
||||
#include <corecrt_internal.h>
|
||||
#include <wchar.h>
|
||||
|
||||
|
||||
|
||||
extern "C" errno_t __cdecl wmemmove_s(
|
||||
wchar_t* const destination,
|
||||
size_t const size_in_elements,
|
||||
wchar_t const* const source,
|
||||
size_t const count
|
||||
)
|
||||
{
|
||||
if (count == 0)
|
||||
return 0;
|
||||
|
||||
#pragma warning(suppress:__WARNING_HIGH_PRIORITY_OVERFLOW_POSTCONDITION)
|
||||
_VALIDATE_RETURN_ERRCODE(destination != nullptr, EINVAL);
|
||||
_VALIDATE_RETURN_ERRCODE(source != nullptr, EINVAL);
|
||||
_VALIDATE_RETURN_ERRCODE(size_in_elements >= count, ERANGE);
|
||||
|
||||
#pragma warning(suppress:__WARNING_BANNED_API_USAGEL2) /* 28726 */
|
||||
wmemmove(destination, source, count);
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue