Index: src/client/c/hu/varadiistvan/xplra/MultiBuffer.h
===================================================================
--- src/client/c/hu/varadiistvan/xplra/MultiBuffer.h	(revision 26)
+++ src/client/c/hu/varadiistvan/xplra/MultiBuffer.h	(revision 29)
@@ -163,7 +163,12 @@
 public:
     /**
+     * Get the X-Plane object this buffer belongs to.
+     */
+    XPlane& getXPlane() const throw();
+
+    /**
      * Add an integer dataref.
      *
-     * @return the ID if the dataref, that can be used later to set or
+     * @return the ID of the dataref, that can be used later to set or
      * get the value.
      */
@@ -173,5 +178,5 @@
      * Add a float dataref.
      *
-     * @return the ID if the dataref, that can be used later to set or
+     * @return the ID of the dataref, that can be used later to set or
      * get the value.
      */
@@ -181,5 +186,5 @@
      * Add a double dataref.
      *
-     * @return the ID if the dataref, that can be used later to set or
+     * @return the ID of the dataref, that can be used later to set or
      * get the value.
      */
@@ -189,5 +194,5 @@
      * Add a float array dataref.
      *
-     * @return the ID if the dataref, that can be used later to set or
+     * @return the ID of the dataref, that can be used later to set or
      * get the value.
      */
@@ -198,5 +203,5 @@
      * Add an integer array dataref.
      *
-     * @return the ID if the dataref, that can be used later to set or
+     * @return the ID of the dataref, that can be used later to set or
      * get the value.
      */
@@ -207,5 +212,5 @@
      * Add a byte array dataref.
      *
-     * @return the ID if the dataref, that can be used later to set or
+     * @return the ID of the dataref, that can be used later to set or
      * get the value.
      */
@@ -535,4 +540,13 @@
     friend class XPlane;
 };
+
+//------------------------------------------------------------------------------
+// Inline definitions
+//------------------------------------------------------------------------------
+
+inline XPlane& MultiBuffer::getXPlane() const throw()
+{
+    return xplane;
+}
 
 //------------------------------------------------------------------------------
Index: src/client/c/hu/varadiistvan/xplra/xplra.cc
===================================================================
--- src/client/c/hu/varadiistvan/xplra/xplra.cc	(revision 28)
+++ src/client/c/hu/varadiistvan/xplra/xplra.cc	(revision 29)
@@ -244,4 +244,11 @@
     typedef std::set<int> multiBufferIDs_t;
 
+public:
+    /**
+     * Get the connection for the given multi-dataref buffer.
+     */
+    static Connection& get(const MultiBuffer& buffer) throw();
+
+private:
     /**
      * The last error code.
@@ -319,4 +326,11 @@
     bool destroyMultiBuffer(int bufferID) throw(Exception);
 };
+
+//------------------------------------------------------------------------------
+
+inline Connection& Connection::get(const MultiBuffer& buffer) throw()
+{
+    return static_cast<Connection&>(buffer.getXPlane());
+}
 
 //------------------------------------------------------------------------------
@@ -737,5 +751,5 @@
 //------------------------------------------------------------------------------
 
-extern "C" int xplra_create_multi_getter(int connectionID)
+extern "C" int xplra_multi_create_getter(int connectionID)
 {
     Connection* connection = ConnectionSlot::getValue(connectionID);
@@ -745,5 +759,5 @@
 //------------------------------------------------------------------------------
 
-extern "C" int xplra_create_multi_setter(int connectionID)
+extern "C" int xplra_multi_create_setter(int connectionID)
 {
     Connection* connection = ConnectionSlot::getValue(connectionID);
@@ -753,5 +767,481 @@
 //------------------------------------------------------------------------------
 
-extern "C" int xplra_destroy_multi_buffer(int connectionID, int bufferID)
+extern "C" size_t xplra_multi_add_int(int bufferID, const char* name)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    return (buffer==0) ? INVALID_DATAREF_ID : buffer->addInt(name);
+}
+
+//------------------------------------------------------------------------------
+
+extern "C" size_t xplra_multi_add_float(int bufferID, const char* name)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    return (buffer==0) ? INVALID_DATAREF_ID : buffer->addFloat(name);
+}
+
+//------------------------------------------------------------------------------
+
+extern "C" size_t xplra_multi_add_double(int bufferID, const char* name)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    return (buffer==0) ? INVALID_DATAREF_ID : buffer->addDouble(name);
+}
+
+/*----------------------------------------------------------------------------*/
+
+extern "C" size_t xplra_multi_add_float_array(int bufferID, const char* name,
+                                              size_t length, size_t offset)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    return (buffer==0) ?
+        INVALID_DATAREF_ID : buffer->addFloatArray(name, length, offset);
+}
+
+/*----------------------------------------------------------------------------*/
+
+extern "C" size_t xplra_multi_add_int_array(int bufferID, const char* name,
+                                            size_t length, size_t offset)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    return (buffer==0) ?
+        INVALID_DATAREF_ID : buffer->addIntArray(name, length, offset);
+}
+
+/*----------------------------------------------------------------------------*/
+
+extern "C" size_t xplra_multi_add_byte_array(int bufferID, const char* name,
+                                             size_t length, size_t offset)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    return (buffer==0) ?
+        INVALID_DATAREF_ID : buffer->addByteArray(name, length, offset);
+}
+
+/*----------------------------------------------------------------------------*/
+
+extern "C" int xplra_multi_finalize(int bufferID)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    return (buffer==0) ? -1 : (buffer->finalize() ? 1 : 0);
+}
+
+/*----------------------------------------------------------------------------*/
+
+extern "C" int xplra_multi_register(int bufferID)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    if (buffer==0) return -1;
+    try {
+        buffer->registerInXPlane();
+        return 0;
+    } catch (...) {
+        Connection::get(*buffer).handleException();
+        return -1;
+    }
+}
+
+/*----------------------------------------------------------------------------*/
+
+extern "C" int xplra_multi_unregister(int bufferID)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    if (buffer==0) return -1;
+    try {
+        buffer->unregisterFromXPlane();
+        return 0;
+    } catch (...) {
+        Connection::get(*buffer).handleException();
+        return -1;
+    }
+}
+
+/*----------------------------------------------------------------------------*/
+
+extern "C" int xplra_multi_execute(int bufferID)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    if (buffer==0) return -1;
+    try {
+        buffer->execute();
+        return 0;
+    } catch (...) {
+        Connection::get(*buffer).handleException();
+        return -1;
+    }
+}
+
+//------------------------------------------------------------------------------
+
+extern "C" int xplra_multi_set_int(int bufferID, size_t datarefID, int value)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    if (buffer==0) return -1;
+    try {
+        buffer->setInt(datarefID, value);
+        return 0;
+    } catch (...) {
+        Connection::get(*buffer).handleException();
+        return -1;
+    }
+}
+
+/*----------------------------------------------------------------------------*/
+
+extern "C" int xplra_multi_get_int(int* dest, int bufferID, size_t datarefID)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    if (buffer==0) return -1;
+    try {
+        *dest = buffer->getInt(datarefID);
+        return 0;
+    } catch (...) {
+        Connection::get(*buffer).handleException();
+        return -1;
+    }
+}
+
+/*----------------------------------------------------------------------------*/
+
+extern "C"
+const int32_t* xplra_multi_get_int_const_ptr(int bufferID, size_t datarefID)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    if (buffer==0) return 0;
+    try {
+        return &(buffer->getIntRef(datarefID));
+    } catch (...) {
+        Connection::get(*buffer).handleException();
+        return 0;
+    }
+}
+
+/*----------------------------------------------------------------------------*/
+
+extern "C"
+int32_t* xplra_multi_get_int_ptr(int bufferID, size_t datarefID)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    if (buffer==0) return 0;
+    try {
+        return &(buffer->getIntRef(datarefID));
+    } catch (...) {
+        Connection::get(*buffer).handleException();
+        return 0;
+    }
+}
+
+//------------------------------------------------------------------------------
+
+extern "C"
+int xplra_multi_set_float(int bufferID, size_t datarefID, float value)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    if (buffer==0) return -1;
+    try {
+        buffer->setFloat(datarefID, value);
+        return 0;
+    } catch (...) {
+        Connection::get(*buffer).handleException();
+        return -1;
+    }
+}
+
+/*----------------------------------------------------------------------------*/
+
+extern "C"
+int xplra_multi_get_float(float* dest, int bufferID, size_t datarefID)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    if (buffer==0) return -1;
+    try {
+        *dest = buffer->getFloat(datarefID);
+        return 0;
+    } catch (...) {
+        Connection::get(*buffer).handleException();
+        return -1;
+    }
+}
+
+/*----------------------------------------------------------------------------*/
+
+extern "C"
+const float* xplra_multi_get_float_const_ptr(int bufferID, size_t datarefID)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    if (buffer==0) return 0;
+    try {
+        return &(buffer->getFloatRef(datarefID));
+    } catch (...) {
+        Connection::get(*buffer).handleException();
+        return 0;
+    }
+}
+
+/*----------------------------------------------------------------------------*/
+
+extern "C"
+float* xplra_multi_get_float_ptr(int bufferID, size_t datarefID)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    if (buffer==0) return 0;
+    try {
+        return &(buffer->getFloatRef(datarefID));
+    } catch (...) {
+        Connection::get(*buffer).handleException();
+        return 0;
+    }
+}
+
+//------------------------------------------------------------------------------
+
+extern "C"
+int xplra_multi_set_double(int bufferID, size_t datarefID, double value)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    if (buffer==0) return -1;
+    try {
+        buffer->setDouble(datarefID, value);
+        return 0;
+    } catch (...) {
+        Connection::get(*buffer).handleException();
+        return -1;
+    }
+}
+
+/*----------------------------------------------------------------------------*/
+
+extern "C"
+int xplra_multi_get_double(double* dest, int bufferID, size_t datarefID)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    if (buffer==0) return -1;
+    try {
+        *dest = buffer->getDouble(datarefID);
+        return 0;
+    } catch (...) {
+        Connection::get(*buffer).handleException();
+        return -1;
+    }
+}
+
+/*----------------------------------------------------------------------------*/
+
+extern "C"
+const double* xplra_multi_get_double_const_ptr(int bufferID, size_t datarefID)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    if (buffer==0) return 0;
+    try {
+        return &(buffer->getDoubleRef(datarefID));
+    } catch (...) {
+        Connection::get(*buffer).handleException();
+        return 0;
+    }
+}
+
+/*----------------------------------------------------------------------------*/
+
+extern "C"
+double* xplra_multi_get_double_ptr(int bufferID, size_t datarefID)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    if (buffer==0) return 0;
+    try {
+        return &(buffer->getDoubleRef(datarefID));
+    } catch (...) {
+        Connection::get(*buffer).handleException();
+        return 0;
+    }
+}
+
+//------------------------------------------------------------------------------
+
+extern "C"
+ssize_t xplra_multi_set_float_array(int bufferID, size_t datarefID,
+                                    const float* value, size_t length,
+                                    size_t offset)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    if (buffer==0) return -1;
+    try {
+        return buffer->setFloatArray(datarefID, value, length, offset);
+    } catch (...) {
+        Connection::get(*buffer).handleException();
+        return -1;
+    }
+}
+
+/*----------------------------------------------------------------------------*/
+
+extern "C"
+ssize_t xplra_multi_get_float_array(float* value,
+                                    size_t length, size_t offset,
+                                    int bufferID, size_t datarefID)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    if (buffer==0) return -1;
+    try {
+        return buffer->getFloatArray(datarefID, value, length, offset);
+    } catch (...) {
+        Connection::get(*buffer).handleException();
+        return -1;
+    }
+}
+
+/*----------------------------------------------------------------------------*/
+
+extern "C"
+const float* xplra_multi_get_float_array_ptr(int bufferID, size_t datarefID,
+                                             size_t offset)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    if (buffer==0) return 0;
+    try {
+        return buffer->getFloatArray(datarefID, offset);
+    } catch (...) {
+        Connection::get(*buffer).handleException();
+        return 0;
+    }
+}
+
+//------------------------------------------------------------------------------
+
+extern "C"
+ssize_t xplra_multi_set_int_array(int bufferID, size_t datarefID,
+                                  const int32_t* value, size_t length,
+                                  size_t offset)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    if (buffer==0) return -1;
+    try {
+        return buffer->setIntArray(datarefID, value, length, offset);
+    } catch (...) {
+        Connection::get(*buffer).handleException();
+        return -1;
+    }
+}
+
+/*----------------------------------------------------------------------------*/
+
+extern "C"
+ssize_t xplra_multi_get_int_array(int32_t* value,
+                                  size_t length, size_t offset,
+                                  int bufferID, size_t datarefID)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    if (buffer==0) return -1;
+    try {
+        return buffer->getIntArray(datarefID, value, length, offset);
+    } catch (...) {
+        Connection::get(*buffer).handleException();
+        return -1;
+    }
+}
+
+/*----------------------------------------------------------------------------*/
+
+extern "C"
+const int32_t* xplra_multi_get_int_array_ptr(int bufferID, size_t datarefID,
+                                             size_t offset)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    if (buffer==0) return 0;
+    try {
+        return buffer->getIntArray(datarefID, offset);
+    } catch (...) {
+        Connection::get(*buffer).handleException();
+        return 0;
+    }
+}
+
+//------------------------------------------------------------------------------
+
+extern "C"
+ssize_t xplra_multi_set_byte_array(int bufferID, size_t datarefID,
+                                   const void* value, size_t length,
+                                   size_t offset)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    if (buffer==0) return -1;
+    try {
+        return buffer->setByteArray(datarefID,
+                                    reinterpret_cast<const uint8_t*>(value),
+                                    length, offset);
+    } catch (...) {
+        Connection::get(*buffer).handleException();
+        return -1;
+    }
+}
+
+/*----------------------------------------------------------------------------*/
+
+extern "C"
+ssize_t xplra_multi_get_byte_array(void* value,
+                                   size_t length, size_t offset,
+                                   int bufferID, size_t datarefID)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    if (buffer==0) return -1;
+    try {
+        return buffer->getByteArray(datarefID,
+                                    reinterpret_cast<uint8_t*>(value),
+                                    length, offset);
+    } catch (...) {
+        Connection::get(*buffer).handleException();
+        return -1;
+    }
+}
+
+/*----------------------------------------------------------------------------*/
+
+extern "C"
+const uint8_t* xplra_multi_get_byte_array_ptr(int bufferID, size_t datarefID,
+                                              size_t offset)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    if (buffer==0) return 0;
+    try {
+        return buffer->getByteArray(datarefID, offset);
+    } catch (...) {
+        Connection::get(*buffer).handleException();
+        return 0;
+    }
+}
+
+//------------------------------------------------------------------------------
+
+extern "C" ssize_t xplra_multi_set_string(int bufferID, size_t datarefID,
+                                          const char* value, size_t offset)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    if (buffer==0) return -1;
+    try {
+        return buffer->setString(datarefID, value, offset);
+    } catch (...) {
+        Connection::get(*buffer).handleException();
+        return -1;
+    }
+}
+
+/*----------------------------------------------------------------------------*/
+
+extern "C"
+const char* xplra_multi_get_string_ptr(int bufferID, size_t datarefID,
+                                       size_t offset)
+{
+    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
+    if (buffer==0) return 0;
+    try {
+        return buffer->getStringPtr(datarefID, offset);
+    } catch (...) {
+        Connection::get(*buffer).handleException();
+        return 0;
+    }
+}
+
+//------------------------------------------------------------------------------
+
+extern "C" int xplra_multi_destroy_buffer(int connectionID, int bufferID)
 {
     Connection* connection = ConnectionSlot::getValue(connectionID);
Index: src/client/c/hu/varadiistvan/xplra/xplra.h
===================================================================
--- src/client/c/hu/varadiistvan/xplra/xplra.h	(revision 28)
+++ src/client/c/hu/varadiistvan/xplra/xplra.h	(revision 29)
@@ -96,4 +96,8 @@
 /*----------------------------------------------------------------------------*/
 
+#define INVALID_DATAREF_ID ((size_t)-1)
+
+/*----------------------------------------------------------------------------*/
+
 /**
  * Get the last error code with the subcode.
@@ -325,5 +329,5 @@
  * @return the ID of the new getter, or -1 on error
  */
-int xplra_create_multi_getter(int connectionID);
+int xplra_multi_create_getter(int connectionID);
 
 /*----------------------------------------------------------------------------*/
@@ -334,5 +338,373 @@
  * @return the ID of the new setter, or -1 on error
  */
-int xplra_create_multi_setter(int connectionID);
+int xplra_multi_create_setter(int connectionID);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Add an integer dataref to a multi-dataref buffer.
+ *
+ * @return the ID of the dataref that can be used later. If the buffer
+ * ID is invalid, INVALID_DATAREF_ID is returned.
+ */
+size_t xplra_multi_add_int(int bufferID, const char* name);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Add a float dataref to a multi-dataref buffer.
+ *
+ * @return the ID of the dataref that can be used later. If the buffer
+ * ID is invalid, INVALID_DATAREF_ID is returned.
+ */
+size_t xplra_multi_add_float(int bufferID, const char* name);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Add a double dataref to a multi-dataref buffer.
+ *
+ * @return the ID of the dataref that can be used later. If the buffer
+ * ID is invalid, INVALID_DATAREF_ID is returned.
+ */
+size_t xplra_multi_add_double(int bufferID, const char* name);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Add a float array dataref to a multi-dataref buffer.
+ *
+ * @return the ID of the dataref that can be used later. If the buffer
+ * ID is invalid, INVALID_DATAREF_ID is returned.
+ */
+size_t xplra_multi_add_float_array(int bufferID, const char* name,
+                                   size_t length, size_t offset);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Add an integer array dataref to a multi-dataref buffer.
+ *
+ * @return the ID of the dataref that can be used later. If the buffer
+ * ID is invalid, INVALID_DATAREF_ID is returned.
+ */
+size_t xplra_multi_add_int_array(int bufferID, const char* name,
+                                 size_t length, size_t offset);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Add a byte array dataref to a multi-dataref buffer.
+ *
+ * @return the ID of the dataref that can be used later. If the buffer
+ * ID is invalid, INVALID_DATAREF_ID is returned.
+ */
+size_t xplra_multi_add_byte_array(int bufferID, const char* name,
+                                  size_t length, size_t offset);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Finalize the given buffer, if not finalized yet.
+ *
+ * @return -1 on error (if the buffer ID is invalid), 0 if there is no
+ * data in the buffer, 1 if there is data in it.
+ */
+int xplra_multi_finalize(int bufferID);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Register the buffer with the given ID in X-Plane. If needed, it
+ * will be finalized too.
+ *
+ * @return 0 on success, -1 on error
+ */
+int xplra_multi_register(int bufferID);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Unregister the buffer with the given ID from X-Plane. If needed, it
+ * will be finalized too.
+ *
+ * @return 0 on success, -1 on error
+ */
+int xplra_multi_unregister(int bufferID);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Execute the buffer with the given ID. If the buffer is not
+ * finalized, it will be finalized. If it is not finalized, but
+ * registered, the registration will be cleared, and it will be
+ * re-registered after finalizing.
+ *
+ * @return 0 on success, -1 on error
+ */
+int xplra_multi_execute(int bufferID);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Set the value of an integer dataref with the given ID.
+ *
+ * @return 0 on success, -1 on error.
+ */
+int xplra_multi_set_int(int bufferID, size_t datarefID, int value);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Get the value of an integer dataref with the given ID.
+ *
+ * @param dest pointer to the variable that will receive the value
+ *
+ * @return 0 on success, -1 on error.
+ */
+int xplra_multi_get_int(int* dest, int bufferID, size_t datarefID);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Get a const pointer to the integer dataref with the given ID
+ *
+ * @return the pointer or success, 0 on error.
+ */
+const int32_t* xplra_multi_get_int_const_ptr(int bufferID, size_t datarefID);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Get a pointer to the integer dataref with the given ID
+ *
+ * @return the pointer or success, 0 on error.
+ */
+int32_t* xplra_multi_get_int_ptr(int bufferID, size_t datarefID);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Set the value of a float dataref with the given ID.
+ *
+ * @return 0 on success, -1 on error.
+ */
+int xplra_multi_set_float(int bufferID, size_t datarefID, float value);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Get the value of a float dataref with the given ID.
+ *
+ * @param dest pointer to the variable that will receive the value
+ *
+ * @return 0 on success, -1 on error.
+ */
+int xplra_multi_get_float(float* dest, int bufferID, size_t datarefID);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Get a const pointer to the float dataref with the given ID
+ *
+ * @return the pointer or success, 0 on error.
+ */
+const float* xplra_multi_get_float_const_ptr(int bufferID, size_t datarefID);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Get a pointer to the float dataref with the given ID
+ *
+ * @return the pointer or success, 0 on error.
+ */
+float* xplra_multi_get_float_ptr(int bufferID, size_t datarefID);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Set the value of a double dataref with the given ID.
+ *
+ * @return 0 on success, -1 on error.
+ */
+int xplra_multi_set_double(int bufferID, size_t datarefID, double value);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Get the value of a double dataref with the given ID.
+ *
+ * @param dest pointer to the variable that will receive the value
+ *
+ * @return 0 on success, -1 on error.
+ */
+int xplra_multi_get_double(double* dest, int bufferID, size_t datarefID);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Get a const pointer to the double dataref with the given ID
+ *
+ * @return the pointer or success, 0 on error.
+ */
+const double* xplra_multi_get_double_const_ptr(int bufferID, size_t datarefID);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Get a pointer to the double dataref with the given ID
+ *
+ * @return the pointer or success, 0 on error.
+ */
+double* xplra_multi_get_double_ptr(int bufferID, size_t datarefID);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Set the contents of the float array dataref with the given ID.
+ *
+ * @param length the amount of data. If 0, it is assumed to be the
+ * length of the data in the buffer minus the offset.
+ * @param offset the offset within the buffer to set the data from
+ *
+ * @return the number of data items set, or -1 on error.
+ */
+ssize_t xplra_multi_set_float_array(int bufferID, size_t datarefID,
+                                    const float* value, size_t length,
+                                    size_t offset);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Get the contents of the float array with the given ID.
+ *
+ * @param length the amount of data. If 0, it is assumed to be the
+ * length of the data in the buffer minus the offset.
+ * @param offset the offset within the buffer to get the data from
+ *
+ * @return the number of data items retrieved, or -1 on error.
+ */
+ssize_t xplra_multi_get_float_array(float* value,
+                                    size_t length, size_t offset,
+                                    int bufferID, size_t datarefID);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Get a pointer to the float array with the given ID.
+ *
+ * @param offset the offset within the buffer.
+ *
+ * @return the pointer on success, 0 on error.
+ */
+const float* xplra_multi_get_float_array_ptr(int bufferID, size_t datarefID,
+                                             size_t offset);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Set the contents of the integer array dataref with the given ID.
+ *
+ * @param length the amount of data. If 0, it is assumed to be the
+ * length of the data in the buffer minus the offset.
+ * @param offset the offset within the buffer to set the data from
+ *
+ * @return the number of data items set, or -1 on error.
+ */
+ssize_t xplra_multi_set_int_array(int bufferID, size_t datarefID,
+                                  const int32_t* value, size_t length,
+                                  size_t offset);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Get the contents of the integer array with the given ID.
+ *
+ * @param length the amount of data. If 0, it is assumed to be the
+ * length of the data in the buffer minus the offset.
+ * @param offset the offset within the buffer to get the data from
+ *
+ * @return the number of data items retrieved, or -1 on error.
+ */
+ssize_t xplra_multi_get_int_array(int32_t* value,
+                                  size_t length, size_t offset,
+                                  int bufferID, size_t datarefID);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Get a pointer to the integer array with the given ID.
+ *
+ * @param offset the offset within the buffer.
+ *
+ * @return the pointer on success, 0 on error.
+ */
+const int32_t* xplra_multi_get_int_array_ptr(int bufferID, size_t datarefID,
+                                             size_t offset);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Set the contents of the byte array dataref with the given ID.
+ *
+ * @param length the amount of data. If 0, it is assumed to be the
+ * length of the data in the buffer minus the offset.
+ * @param offset the offset within the buffer to set the data from
+ *
+ * @return the number of data items set, or -1 on error.
+ */
+ssize_t xplra_multi_set_byte_array(int bufferID, size_t datarefID,
+                                   const void* value, size_t length,
+                                   size_t offset);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Get the contents of the byte array with the given ID.
+ *
+ * @param length the amount of data. If 0, it is assumed to be the
+ * length of the data in the buffer minus the offset.
+ * @param offset the offset within the buffer to get the data from
+ *
+ * @return the number of data items retrieved, or -1 on error.
+ */
+ssize_t xplra_multi_get_byte_array(void* value,
+                                   size_t length, size_t offset,
+                                   int bufferID, size_t datarefID);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Get a pointer to the byte array with the given ID.
+ *
+ * @param offset the offset within the buffer.
+ *
+ * @return the pointer on success, 0 on error.
+ */
+const uint8_t* xplra_multi_get_byte_array_ptr(int bufferID, size_t datarefID,
+                                              size_t offset);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Set the value of the byte array with the given ID from the given
+ * string. If the string is shorter than the array, the rest will be
+ * filled with 0s.
+ *
+ * @return the number of bytes set, or -1 on error
+ */
+ssize_t xplra_multi_set_string(int bufferID, size_t datarefID,
+                               const char* value, size_t offset);
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Get a pointer as a string pointer to the byte array with the given
+ * ID.
+ *
+ * @return the pointer on success, 0 on error.
+ */
+const char* xplra_multi_get_string_ptr(int bufferID, size_t datarefID,
+                                       size_t offset);
 
 /*----------------------------------------------------------------------------*/
@@ -346,5 +718,5 @@
  * @return 0 on success, -1 on error.
  */
-int xplra_destroy_multi_buffer(int connectionID, int bufferID);
+int xplra_multi_destroy_buffer(int connectionID, int bufferID);
 
 /*----------------------------------------------------------------------------*/
Index: test/Makefile.am
===================================================================
--- test/Makefile.am	(revision 23)
+++ test/Makefile.am	(revision 29)
@@ -6,5 +6,5 @@
 endif
 
-noinst_PROGRAMS=ctest basictest basicctest multigettest multisettest
+noinst_PROGRAMS=ctest basictest basicctest multigettest multigetctest multisettest
 
 ctest_SOURCES=ctest.c
@@ -22,3 +22,8 @@
 multigettest_SOURCES=multigettest.cc
 
+multigetctest_SOURCES=multigetctest.c
+if TARGET_API_WIN32
+multigetctest_LDFLAGS=-lstdc++
+endif
+
 multisettest_SOURCES=multisettest.cc
Index: test/basicctest.c
===================================================================
--- test/basicctest.c	(revision 25)
+++ test/basicctest.c	(revision 29)
@@ -340,4 +340,5 @@
 
     retval = 1;
+
 cleanup:
     if (connectionID>=0) xplra_disconnect(connectionID);
Index: test/multigetctest.c
===================================================================
--- test/multigetctest.c	(revision 29)
+++ test/multigetctest.c	(revision 29)
@@ -0,0 +1,338 @@
+// Copyright (c) 2013 by István Váradi
+
+// This file is part of XPLRA, a remote-access plugin for X-Plane
+
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+
+// 1. Redistributions of source code must retain the above copyright notice, this
+//    list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation
+//    and/or other materials provided with the distribution.
+
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// The views and conclusions contained in the software and documentation are those
+// of the authors and should not be interpreted as representing official policies,
+// either expressed or implied, of the FreeBSD Project.
+
+//------------------------------------------------------------------------------
+
+#include <hu/varadiistvan/xplra/xplra.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#ifdef __windows__
+#include <windows.h>
+#else
+#include <unistd.h>
+#endif
+
+//------------------------------------------------------------------------------
+
+int main(int argc, char* argv[])
+{
+    int retval = 0;
+    const char* errorString;
+
+    int i;
+
+    int connectionID = -1;
+    int getterID = -1;
+
+    size_t tailnumID = INVALID_DATAREF_ID;
+    size_t daysID = INVALID_DATAREF_ID;
+    size_t zuluSecID = INVALID_DATAREF_ID;
+    size_t pausedID = INVALID_DATAREF_ID;
+    size_t latitudeID = INVALID_DATAREF_ID;
+    size_t longitudeID = INVALID_DATAREF_ID;
+    size_t replayID = INVALID_DATAREF_ID;
+    size_t overspeedID = INVALID_DATAREF_ID;
+    size_t stalledID = INVALID_DATAREF_ID;
+    size_t onTheGroundID = INVALID_DATAREF_ID;
+    size_t emptyWeightID = INVALID_DATAREF_ID;
+    size_t payloadWeightID = INVALID_DATAREF_ID;
+    size_t grossWeightID = INVALID_DATAREF_ID;
+    size_t headingID = INVALID_DATAREF_ID;
+    size_t pitchID = INVALID_DATAREF_ID;
+    size_t bankID = INVALID_DATAREF_ID;
+    size_t iasID = INVALID_DATAREF_ID;
+    size_t machID = INVALID_DATAREF_ID;
+    size_t groundSpeedID = INVALID_DATAREF_ID;
+    size_t vsID = INVALID_DATAREF_ID;
+    size_t radioAltitudeID = INVALID_DATAREF_ID;
+    size_t altitudeID = INVALID_DATAREF_ID;
+    size_t gLoadID = INVALID_DATAREF_ID;
+    size_t flapsControlID = INVALID_DATAREF_ID;
+    size_t flapsLeftID = INVALID_DATAREF_ID;
+    size_t flapsRightID = INVALID_DATAREF_ID;
+    size_t navLightsID = INVALID_DATAREF_ID;
+    size_t beaconLightsID = INVALID_DATAREF_ID;
+    size_t strobeLightsID = INVALID_DATAREF_ID;
+    size_t landingLightsID = INVALID_DATAREF_ID;
+    size_t pitotID = INVALID_DATAREF_ID;
+    size_t parkingID = INVALID_DATAREF_ID;
+    size_t gearControlID = INVALID_DATAREF_ID;
+    size_t noseGearID = INVALID_DATAREF_ID;
+    size_t altimeterID = INVALID_DATAREF_ID;
+    size_t qnhID = INVALID_DATAREF_ID;
+    size_t navTypesID = INVALID_DATAREF_ID;
+    size_t busVoltsID = INVALID_DATAREF_ID;
+
+    const char* tailnum = 0;
+    const int32_t* days = 0;
+    const float* zuluSec = 0;
+    const int32_t* paused = 0;
+    const double* latitude = 0;
+    const double* longitude = 0;
+    const int32_t* replay = 0;
+    const int32_t* overspeed = 0;
+    const int32_t* stalled = 0;
+    const int32_t* onTheGround = 0;
+    const float* emptyWeight = 0;
+    const float* payloadWeight = 0;
+    const float* grossWeight = 0;
+    const float* heading = 0;
+    const float* pitch = 0;
+    const float* bank = 0;
+    const float* ias = 0;
+    const float* mach = 0;
+    const float* groundSpeed = 0;
+    const float* vs = 0;
+    const float* radioAltitude = 0;
+    const float* altitude = 0;
+    const float* gLoad = 0;
+    const float* flapsControl = 0;
+    const float* flapsLeft = 0;
+    const float* flapsRight = 0;
+    const int32_t* navLights = 0;
+    const int32_t* beaconLights = 0;
+    const int32_t* strobeLights = 0;
+    const int32_t* landingLights = 0;
+    const int32_t* pitot = 0;
+    const float* parking = 0;
+    const int32_t* gearControl = 0;
+    const float* noseGear = 0;
+    const float* altimeter = 0;
+    const float* qnh = 0;
+    const int32_t* navTypes = 0;
+    const float* busVolts = 0;
+
+    int dontregister = 0;
+
+    for(i = 1; i<argc; ++i) {
+        if (strcmp(argv[i], "dontregister")==0) {
+            dontregister = 1;
+        }
+    }
+
+    printf("Connecting to X-Plane...\n");
+    connectionID = xplra_connect();
+    if (connectionID>=0) {
+        printf("Connected to X-Plane.\n\n");
+    } else {
+        printf("Connection failed.\n\n");
+        goto cleanup;
+    }
+
+    getterID = xplra_multi_create_getter(connectionID);
+    if (getterID<0) goto error;
+
+    tailnumID = xplra_multi_add_byte_array(getterID, "sim/aircraft/view/acf_tailnum", 40, 0);
+    daysID = xplra_multi_add_int(getterID, "sim/time/local_date_days");
+    zuluSecID = xplra_multi_add_float(getterID, "sim/time/zulu_time_sec");
+    pausedID = xplra_multi_add_int(getterID, "sim/time/paused");
+    latitudeID = xplra_multi_add_double(getterID, "sim/flightmodel/position/latitude");
+    longitudeID = xplra_multi_add_double(getterID, "sim/flightmodel/position/longitude");
+    replayID = xplra_multi_add_int(getterID, "sim/operation/prefs/replay_mode");
+    overspeedID = xplra_multi_add_int(getterID, "sim/flightmodel/failures/over_vne");
+    stalledID = xplra_multi_add_int(getterID, "sim/flightmodel/failures/stallwarning");
+    onTheGroundID = xplra_multi_add_int(getterID, "sim/flightmodel/failures/onground_any");
+    emptyWeightID = xplra_multi_add_float(getterID, "sim/aircraft/weight/acf_m_empty");
+    payloadWeightID = xplra_multi_add_float(getterID, "sim/flightmodel/weight/m_fixed");
+    grossWeightID = xplra_multi_add_float(getterID, "sim/flightmodel/weight/m_total");
+    headingID = xplra_multi_add_float(getterID, "sim/flightmodel/position/psi");
+    pitchID = xplra_multi_add_float(getterID, "sim/flightmodel/position/theta");
+    bankID = xplra_multi_add_float(getterID, "sim/flightmodel/position/phi");
+    iasID = xplra_multi_add_float(getterID, "sim/flightmodel/position/indicated_airspeed2");
+    machID = xplra_multi_add_float(getterID, "sim/flightmodel/misc/machno");
+    groundSpeedID = xplra_multi_add_float(getterID, "sim/flightmodel/position/groundspeed");
+    vsID = xplra_multi_add_float(getterID, "sim/flightmodel/position/vh_ind_fpm2");
+    radioAltitudeID = xplra_multi_add_float(getterID, "sim/flightmodel/position/y_agl");
+    altitudeID = xplra_multi_add_float(getterID, "sim/flightmodel/position/elevation");
+    gLoadID = xplra_multi_add_float(getterID, "sim/flightmodel/forces/g_nrml");
+    flapsControlID = xplra_multi_add_float(getterID, "sim/flightmodel/controls/flaprqst");
+    flapsLeftID = xplra_multi_add_float(getterID, "sim/flightmodel/controls/flaprat");
+    flapsRightID = xplra_multi_add_float(getterID, "sim/flightmodel/controls/flap2rat");
+    navLightsID = xplra_multi_add_int(getterID, "sim/cockpit/electrical/nav_lights_on");
+    beaconLightsID = xplra_multi_add_int(getterID, "sim/cockpit/electrical/beacon_lights_on");
+    strobeLightsID = xplra_multi_add_int(getterID, "sim/cockpit/electrical/strobe_lights_on");
+    landingLightsID = xplra_multi_add_int(getterID, "sim/cockpit/electrical/landing_lights_on");
+    pitotID = xplra_multi_add_int(getterID, "sim/cockpit/switches/pitot_heat_on");
+    parkingID = xplra_multi_add_float(getterID, "sim/flightmodel/controls/parkbrake");
+    gearControlID = xplra_multi_add_int(getterID, "sim/cockpit2/controls/gear_handle_down");
+    noseGearID = xplra_multi_add_float_array(getterID, "sim/flightmodel2/gear/deploy_ratio", 1, 0);
+    altimeterID = xplra_multi_add_float(getterID, "sim/cockpit/misc/barometer_setting");
+    qnhID = xplra_multi_add_float(getterID, "sim/flightmodel/misc/Qstatic");
+    navTypesID = xplra_multi_add_int_array(getterID, "sim/cockpit/radios/nav_type", 6, 0);
+    busVoltsID = xplra_multi_add_float_array(getterID, "sim/cockpit2/electrical/bus_volts", 4, 0);
+
+    if (dontregister) {
+        xplra_multi_finalize(getterID);
+    } else {
+        printf("Registering getter...\n");
+        if (xplra_multi_register(getterID)<0) goto error;
+        printf("Registered getter.\n\n");
+    }
+
+    tailnum = xplra_multi_get_string_ptr(getterID, tailnumID, 0);
+    days = xplra_multi_get_int_ptr(getterID, daysID);
+    zuluSec = xplra_multi_get_float_ptr(getterID, zuluSecID);
+    paused = xplra_multi_get_int_ptr(getterID, pausedID);
+    latitude = xplra_multi_get_double_ptr(getterID, latitudeID);
+    longitude = xplra_multi_get_double_ptr(getterID, longitudeID);
+    // frozen
+    // slew
+    replay = xplra_multi_get_int_ptr(getterID, replayID);
+    overspeed = xplra_multi_get_int_ptr(getterID, overspeedID);
+    stalled = xplra_multi_get_int_ptr(getterID, stalledID);
+    onTheGround = xplra_multi_get_int_ptr(getterID, onTheGroundID);
+    emptyWeight = xplra_multi_get_float_ptr(getterID, emptyWeightID);
+    payloadWeight = xplra_multi_get_float_ptr(getterID, payloadWeightID);
+    grossWeight = xplra_multi_get_float_ptr(getterID, grossWeightID);
+    heading = xplra_multi_get_float_ptr(getterID, headingID);
+    pitch = xplra_multi_get_float_ptr(getterID, pitchID);
+    bank = xplra_multi_get_float_ptr(getterID, bankID);
+    ias = xplra_multi_get_float_ptr(getterID, iasID);
+    mach = xplra_multi_get_float_ptr(getterID, machID);
+    groundSpeed = xplra_multi_get_float_ptr(getterID, groundSpeedID);
+    vs = xplra_multi_get_float_ptr(getterID, vsID);
+    radioAltitude = xplra_multi_get_float_ptr(getterID, radioAltitudeID);
+    altitude = xplra_multi_get_float_ptr(getterID, altitudeID);
+    gLoad = xplra_multi_get_float_ptr(getterID, gLoadID);
+    flapsControl = xplra_multi_get_float_ptr(getterID, flapsControlID);
+    flapsLeft = xplra_multi_get_float_ptr(getterID, flapsLeftID);
+    flapsRight = xplra_multi_get_float_ptr(getterID, flapsRightID);
+    navLights = xplra_multi_get_int_ptr(getterID, navLightsID);
+    beaconLights = xplra_multi_get_int_ptr(getterID, beaconLightsID);
+    strobeLights = xplra_multi_get_int_ptr(getterID, strobeLightsID);
+    landingLights = xplra_multi_get_int_ptr(getterID, landingLightsID);
+    pitot = xplra_multi_get_int_ptr(getterID, pitotID);
+    parking = xplra_multi_get_float_ptr(getterID, parkingID);
+    gearControl = xplra_multi_get_int_ptr(getterID, gearControlID);
+    noseGear = xplra_multi_get_float_array_ptr(getterID, noseGearID, 0);
+    altimeter = xplra_multi_get_float_ptr(getterID, altimeterID);
+    qnh = xplra_multi_get_float_ptr(getterID, qnhID);
+    navTypes = xplra_multi_get_int_array_ptr(getterID, navTypesID, 0);
+    busVolts = xplra_multi_get_float_array_ptr(getterID, busVoltsID, 0);
+
+    while(1) {
+        if (xplra_multi_execute(getterID)<0) return -1;
+        printf("tail number: '%s', days: %d, zuluSec: %f\n",
+               tailnum, *days, *zuluSec);
+        printf("paused=%d, replay=%d, overspeed=%d, stalled=%d, onTheGround=%d\n",
+               *paused, *replay, *overspeed, *stalled, *onTheGround);
+        printf("emptyWeight=%f, payloadWeight=%f, grossWeight=%f\n",
+               *emptyWeight, *payloadWeight, *grossWeight);
+        printf("latitude=%f, longitude=%f, radioAltitude=%f, altitude=%f, gLoad=%f\n",
+               *latitude, *longitude, (*radioAltitude)/.3048, (*altitude)/.3048, *gLoad);
+        printf("heading=%f, pitch=%f, bank=%f, ias=%f, mach=%f, groundSpeed=%f, vs=%f\n",
+               *heading, *pitch, *bank, *ias, *mach, *groundSpeed, *vs);
+        printf("flapsControl=%f, flapsLeft=%f, flapsRight=%f\n",
+               *flapsControl, *flapsLeft, *flapsRight);
+        printf("Lights: NAV: %d, beacon: %d, strobe: %d, landing: %d\n",
+               *navLights, *beaconLights, *strobeLights, *landingLights);
+        printf("pitot: %d, parking: %f, gearControl: %d, noseGear: %f\n",
+               *pitot, *parking, *gearControl, *noseGear);
+        printf("altimeter: %f, qnh: %f\n",
+               *altimeter, *qnh);
+        printf("NAV types: %d %d %d %d %d %d\n",
+               navTypes[0], navTypes[1], navTypes[2],
+               navTypes[3], navTypes[4], navTypes[5]);
+        printf("bus voltages: %f %f %f %f\n",
+               busVolts[0], busVolts[1], busVolts[2], busVolts[3]);
+        printf("\n");
+#ifdef __windows__
+        Sleep(1000);
+#else
+        usleep(1000*1000);
+#endif
+    }
+
+    goto cleanup;
+
+error:
+    errorString = xplra_get_last_error_string(connectionID);
+    if (errorString==0) {
+        printf("\nUnknown error occured!\n");
+    } else {
+        printf("\nError: %s\n", errorString);
+    }
+
+    retval = 1;
+
+cleanup:
+    if (connectionID>=0) xplra_disconnect(connectionID);
+    return retval;
+
+    // try {
+
+
+    //     while(true) {
+    //         getter.execute();
+    //         printf("tail number: '%s', days: %d, zuluSec: %f\n",
+    //                getter.getString(tailnumID).c_str(), days, zuluSec);
+    //         printf("paused=%d, replay=%d, overspeed=%d, stalled=%d, onTheGround=%d\n",
+    //                paused, replay, overspeed, stalled, onTheGround);
+    //         printf("emptyWeight=%f, payloadWeight=%f, grossWeight=%f\n",
+    //                emptyWeight, payloadWeight, grossWeight);
+    //         printf("latitude=%f, longitude=%f, radioAltitude=%f, altitude=%f, gLoad=%f\n",
+    //                latitude, longitude, radioAltitude/.3048, altitude/.3048, gLoad);
+    //         printf("heading=%f, pitch=%f, bank=%f, ias=%f, mach=%f, groundSpeed=%f, vs=%f\n",
+    //                heading, pitch,bank, ias, mach, groundSpeed, vs);
+    //         printf("flapsControl=%f, flapsLeft=%f, flapsRight=%f\n",
+    //                flapsControl, flapsLeft, flapsRight);
+    //         printf("Lights: NAV: %d, beacon: %d, strobe: %d, landing: %d\n",
+    //                navLights, beaconLights, strobeLights, landingLights);
+    //         printf("pitot: %d, parking: %f, gearControl: %d, noseGear: %f\n",
+    //                pitot, parking, gearControl, noseGear);
+    //         printf("altimeter: %f, qnh: %f\n",
+    //                altimeter, qnh);
+    //         printf("NAV types: %d %d %d %d %d %d\n",
+    //                navTypes[0], navTypes[1], navTypes[2],
+    //                navTypes[3], navTypes[4], navTypes[5]);
+    //         printf("bus voltages: %f %f %f %f\n",
+    //                busVolts[0], busVolts[1], busVolts[2], busVolts[3]);
+    //         printf("\n");
+    //         Thread::sleep(1000);
+    //     }
+
+    //     //xplane.destroyMultiBuffer(getter);
+
+    //     return 0;
+    // } catch(Exception& exception) {
+    //     printf("\n>>>>>>>>>>>>>>>>> Exception caugth: %s\n", exception.what());
+
+    //     return 1;
+    // }
+}
+
+//------------------------------------------------------------------------------
+
+// Local Variables:
+// mode: C++
+// c-basic-offset: 4
+// indent-tabs-mode: nil
+// End:
Index: test/multigettest.cc
===================================================================
--- test/multigettest.cc	(revision 26)
+++ test/multigettest.cc	(revision 29)
@@ -146,5 +146,5 @@
         const int32_t& pitot = getter.getIntRef(pitotID);
         const float& parking = getter.getFloatRef(parkingID);
-        const int32_t& gearControl = getter.getInt(gearControlID);
+        const int32_t& gearControl = getter.getIntRef(gearControlID);
         const float& noseGear = getter.getFloatArray(noseGearID)[0];
         const float& altimeter = getter.getFloatRef(altimeterID);
