###User Defined Function###
_WinAPI_CoTaskMemRealloc

###Description###
Changes the size of a previously allocated block of task memory.

###Syntax###
#include <WinAPICom.au3>
_WinAPI_CoTaskMemRealloc ( $pMemory, $iSize )


###Parameters###
@@ParamTable@@
$pMemory
	The pointer to the memory block to be reallocated.
$iSize
	The size of the memory block to be reallocated, in bytes.
@@End@@

###ReturnValue###
@@ReturnTable@@
Success 	The reallocated memory block.
Failure 	0.
@@End@@


###Remarks###
If $pMemory is 0, function allocates a new memory block in the same way as the <a href="_WinAPI_CoTaskMemAlloc.htm">_WinAPI_CoTaskMemAlloc()</a> function.
If $pMemory is not 0, it should be a pointer returned by a prior call to <a href="_WinAPI_CoTaskMemAlloc.htm">_WinAPI_CoTaskMemAlloc()</a>.

The contents of the block are unchanged up to the shorter of the new and old sizes, although the new block can be in a different location.
If $pMemory is not 0 and $iSize is 0, then the memory pointed to by $pMemory is freed.


###Related###


###See Also###
@@MsdnLink@@ CoTaskMemRealloc
