Overview
Type:
|
Function
|
Available as of:
|
SystemInterface_1.32.6.0
|
Versions:
|
Current version
|
Task
Reserve dynamic memory area.
Description
With this function, a memory area is reserved with the size i_dwSize. The function returns the initial address of the memory area. Zero is returned if there is not sufficient memory available. The return value of the function must therefore be checked before using the memory.
Interface
Input
|
Data type
|
Description
|
i_dwSize
|
DWORD
|
Size of the memory area to be reserved.
|
Return Value
Data type
|
Description
|
DWORD
|
<>0: start address of the provided data area
0: There is not enough memory available.
|
Example
pastTest_DYN : POINTER TO struct1;
if (pastTest_DYN = 0)
pastTest_DYN := FC_DynIECDataAlloc(100* SIZEOF(pastTest_DYN ^));
IF (pastTest_DYN > 0) THEN
;
ELSE
END_IF
END_IF
FC_MemorySet(
dwDest := pastTest_DYN,
byCharacter := 0,
dwCount := 100* SIZEOF(pastTest_DYN ^));