buffer_get_address

语法:

buffer_get_address(buffer);


参数 描述
buffer The index of the buffer to use.


Returns: pointer


描述

With this function you can get the a pointer to the raw, aligned buffer address. This is primarily for use with extensions as you can pass this value through to them, allowing them to access the buffer data. Note that there are a few things you cannot do with the buffer when accessing from an extension:


例如:

var b_address = buffer_get_address(buff_model);
var b_end_address = b_address + buffer_get_size(buff_model);

The above code will get the memory address of the buffer indexed in the variable "buff_model" and then get the memory address for the end of the buffer using the buffer_get_size() function, storing both values in local variables for further use.