函数参考


_WinAPI_CreateBuffer

Allocates a block of memory from the internal library heap.

#Include <WinAPIEx.au3>
_WinAPI_CreateBuffer ( $iLength [, $pBuffer [, $fAbort]] )

参数

$iLength The required buffer length, in bytes.
$pBuffer [可选参数] A pointer to a buffer that to be replaced by a new buffer. If this parameter is a valid buffer pointer,
the memory will be reallocated for a new buffer. However, a new memory is allocated at a different
location. Therefore, you should always use a pointer that returns this function. If this parameter is
0, omitted, or an invalid buffer pointer, the function just allocates a new memory.
$fAbort [可选参数] Specifies whether to exit the script if not enough memory, valid values:
TRUE - Displaying an error message and exit the script with code 1. (Default)
FALSE - Continue the script and return an error.

返回值

Success A pointer to the new buffer.
Failure 0 and sets the @error flag to non-zero (if an exceptions is not set).

注意/说明

When a buffer is no longer needed, you must destroy it by calling the _WinAPI_FreeMemory() function.

相关

详情参考

None