FUNCTION MemGrpAlloc( wGroup AS DWORD, wBytes AS DWORD ) AS IntPtr
public static IntPtr MemGrpAlloc( uint wGroup, uint wBytes )
|This function allows the direct manipulation of a memory location and should be used with extreme care.|
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.
1Function Start() 2 LOCAL ptrCurrent AS PTR 3 LOCAL wGroup AS DWORD 4 LOCAL lRet AS LOGIC 5 wGroup := MemGrpOpen() // Need to have a 6 // group ready first 7 IF wGroup != 0 8 ptrCurrent := MemGrpAlloc(wGroup, 100) 9 MemGrpClose(wGroup) 10 lRet := FALSE 11 ELSE 12 lRet := TRUE 13 ENDIF 14 RETURN lRet
Copyright © 2015-2022 XSharp BV, All rights reserved. The VO SDK classes are Copyright © Computer Associates.