[id] = AllocMemFromPointer(id, ptr, size)
#LIGHTUSERDATAinto a memory block that you can read from and write to using the memory block functions. The new memory block object will be made available under the handle
id, or, if you specify Nil as
AllocMemFromPointer()automatically chooses a vacant identifier and returns it.
AllocMemFromPointer() will not make a local copy of the memory
pointed to by parameter 2. It will just allocate a container object
so that you can access the memory data using the memory block functions. The
size argument is only used to prevent read or write operations that are
outside the memory block's boundaries. If you don't know the size of the
memory block, you can also pass 0 in the
size argument. In that case,
Hollywood will never forbid any read and write operation on this memory
Be warned that this is a dangerous function and should only be used by people who know what they are doing. Reading from or writing to non-allocated memory can easily crash your program.
#LIGHTUSERDATAvariable pointing to a memory block