+ /* Start the tap reader */
+
+ thread = CreateThread(NULL, 0, tapreader, NULL, 0, NULL);
+
+ if(!thread) {
+ logger(LOG_ERR, _("System call `%s' failed: %s"), "CreateThread", winerror(GetLastError()));
+ return false;
+ }
+
+ /* Set media status for newer TAP-Win32 devices */
+
+ status = true;
+ DeviceIoControl(device_handle, TAP_IOCTL_SET_MEDIA_STATUS, &status, sizeof(status), &status, sizeof(status), &len, NULL);
+