AIR 3.0 and later


FREResult FREAcquireByteArray ( 
            FREObject                 object, 
            FREByteArray*                 byteArrayToSet 


An FREObject. This FREObject parameter represents an ActionScript ByteArray class object.

A pointer to a variable of type FREByteArray. The runtime sets the fields of this structure when the native C implementation calls this method. See FREByteArray .


An FREResult. The possible return values include, but are not limited to, the following:

The function succeeded. The FREByteArray parameter is set. The ActionScript ByteArray object is available for you to manipulate.

The extension context has already acquired an ActionScript BitmapData or ByteArray object. The context cannot call this method until it releases that BitmapData or ByteArray object.

The byteArrayToSet parameter is NULL .

The FREObject object parameter is invalid.

The FREObject object parameter does not represent an ActionScript ByteArray class object.

The method was called from a thread other than the one on which the runtime has an outstanding call to a native extension function.


Call this function to acquire the bytes of an ActionScript ByteArray class object. Once you have successfully called this function, you cannot successfully call any other C API function until you call FREReleaseByteArray() . This prohibition is because other calls could, as a side effect, execute code that invalidates the pointer to the byte array contents.

After calling this function, you can manipulate the bytes of the ByteArray object. The bytes are available in the byteArrayToSet parameter, along with the number of bytes. When you have finished working with the bytes, call FREReleaseByteArray() .

// Ethnio survey code removed