Поделиться через


CeSafeCopyMemory (Compact 2013)

3/28/2014

This function copies data in memory between buffers.

Syntax

BOOL CeSafeCopyMemory (
LPVOID pDst,
LPCVOID pSrc,
DWORD cbSize
);

Parameters

  • pDst
    [in] Pointer to the destination memory buffer.
  • pSrc
    [in] Pointer to the source buffer to copy from.
  • cbSize
    [in] Number of bytes to copy.

Return Value

Returns TRUE if successful; otherwise, returns FALSE.

Remarks

This function wraps a call to the memcpy function in a try-except block. If the source and destination overlap, the behavior of this function is undefined. Use the memmove function to handle overlapping regions.

JJ200477.security(en-us,WinEmbedded.80).gifSecurity Note:
Make sure that the destination buffer is the same size or larger than the source buffer to avoid a buffer overrun.

Requirements

Header

winnt.h

Library

coredll.lib

See Also

Reference

Memory Management Functions