Index: test/Makefile.am
===================================================================
--- test/Makefile.am	(revision 29)
+++ test/Makefile.am	(revision 30)
@@ -6,5 +6,5 @@
 endif
 
-noinst_PROGRAMS=ctest basictest basicctest multigettest multigetctest multisettest
+noinst_PROGRAMS=ctest basictest basicctest multigettest multigetctest multisettest multisetctest
 
 ctest_SOURCES=ctest.c
@@ -28,2 +28,7 @@
 
 multisettest_SOURCES=multisettest.cc
+
+multisetctest_SOURCES=multisetctest.c
+if TARGET_API_WIN32
+multisetctest_LDFLAGS=-lstdc++
+endif
Index: test/multigetctest.c
===================================================================
--- test/multigetctest.c	(revision 29)
+++ test/multigetctest.c	(revision 30)
@@ -35,5 +35,5 @@
 #include <string.h>
 
-#ifdef __windows__
+#ifdef _WIN32
 #include <windows.h>
 #else
@@ -240,5 +240,5 @@
 
     while(1) {
-        if (xplra_multi_execute(getterID)<0) return -1;
+        if (xplra_multi_execute(getterID)<0) goto error;
         printf("tail number: '%s', days: %d, zuluSec: %f\n",
                tailnum, *days, *zuluSec);
@@ -265,5 +265,5 @@
                busVolts[0], busVolts[1], busVolts[2], busVolts[3]);
         printf("\n");
-#ifdef __windows__
+#ifdef _WIN32
         Sleep(1000);
 #else
Index: test/multisetctest.c
===================================================================
--- test/multisetctest.c	(revision 30)
+++ test/multisetctest.c	(revision 30)
@@ -0,0 +1,132 @@
+// 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>
+
+//------------------------------------------------------------------------------
+
+int main(int argc, char* argv[])
+{
+    int retval = 0;
+    const char* errorString;
+
+    int i;
+
+    int connectionID = -1;
+    int setterID = -1;
+
+    size_t simSpeedID = INVALID_DATAREF_ID;
+    size_t zuluSecID = INVALID_DATAREF_ID;
+    size_t localXID = INVALID_DATAREF_ID;
+    size_t tailNumID = INVALID_DATAREF_ID;
+    size_t generatorOnID = INVALID_DATAREF_ID;
+    size_t propPitchID = INVALID_DATAREF_ID;
+
+    int32_t generatorOn[8] = { 1, 0, 1, 0, 1, 0, 1, 0 };
+    float propPitch[2] = { 32.4, 78.2 };
+
+    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;
+    }
+
+    setterID = xplra_multi_create_setter(connectionID);
+    if (setterID<0) goto error;
+
+    simSpeedID = xplra_multi_add_int(setterID, "sim/time/sim_speed");
+    zuluSecID = xplra_multi_add_float(setterID, "sim/time/zulu_time_sec");
+    localXID = xplra_multi_add_double(setterID, "sim/flightmodel/position/local_x");
+    tailNumID = xplra_multi_add_byte_array(setterID, "sim/aircraft/view/acf_tailnum", 40, 0);
+    generatorOnID = xplra_multi_add_int_array(setterID, "sim/cockpit/electrical/generator_on", 8, 0);
+    propPitchID = xplra_multi_add_float_array(setterID, "sim/cockpit2/engine/actuators/prop_pitch_deg", 2, 0);
+
+    if (dontregister) {
+        xplra_multi_finalize(setterID);
+    } else {
+        printf("Registering getter...\n");
+        if (xplra_multi_register(setterID)<0) goto error;
+        printf("Registered getter.\n\n");
+    }
+
+    printf("Setting values...\n");
+
+    xplra_multi_set_int(setterID, simSpeedID, 0);
+    xplra_multi_set_float(setterID, zuluSecID, 7265.0);
+    xplra_multi_set_double(setterID, localXID, 12.0);
+    xplra_multi_set_string(setterID, tailNumID, "Kukutyin", 0);
+    xplra_multi_set_int_array(setterID, generatorOnID, generatorOn, 8, 0);
+    xplra_multi_set_float_array(setterID, propPitchID, propPitch, 2, 0);
+
+    printf("Executing...\n");
+
+    if (xplra_multi_execute(setterID)<0) goto error;
+
+    printf("Done.\n");
+
+    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;
+}
+
+//------------------------------------------------------------------------------
+
+// Local Variables:
+// mode: C++
+// c-basic-offset: 4
+// indent-tabs-mode: nil
+// End:
