Click or drag to resize

MemRealloc Function

X#
ReAllocate a static memory buffer of a specified size.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax
 FUNCTION MemRealloc(
	pBuffer AS IntPtr,
	nSize AS DWORD
) AS IntPtr
Request Example View Source

Parameters

pBuffer
Type: IntPtr
nSize
Type: DWord

Return Value

Type: IntPtr
Returns the original pointer when the nSize parameter is smaller or equal to the current size.
Remarks
Tip Tip
The Static Memory Functions (MemAlloc, MemSet etc) are included for compatibility only. In most cases the static memory blocks can (and should) be replaced with arrays of bytes.
Many of the functions in the runtime that take memory blocks as parameter, such as the low level IO functions, now have overloads that take arrays of bytes as parameter.
We recommend that you use these overloads, because their performance is somewhat better.
See Also