JCL Help:SHGetMem

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Allocates memory using the Shell's memory allocator.


Pascal

 function SHGetMem(var P: Pointer; Count: Integer): Boolean;


Parameters

Parameters Description
var P: Pointer Pointer variable which returns the address of the allocated memory block
Count: Integer Size, in byte, of the block of memory to allocate.


Return Value

If the function succeeds it returns True and P contains the address of the allocated memory block. If the function fails then it returns False and P will be set to nil.


Description

SHAllocMem allocates the specified amount of memory using the Shell's memory allocator. If the allocation succeeds then P is set to point to the allocated memory and the return value will be True. You should assume that the memory contains random values. On failure, P retains its value and the return value will be False.


See Also

SHAllocMem SHFreeMem


About

Unit

JclShell


Donator

Marcel van Brakel


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page