  #ifdef _WIN32
      if (!strcmp(device, "tap")) {
          char ifname[64];
-@@ -7551,6 +7802,9 @@
+@@ -7551,6 +7816,9 @@
             "                connect the user mode network stack to VLAN 'n' and send\n"
             "                hostname 'host' to DHCP clients\n"
  #endif

     { "m", HAS_ARG, QEMU_OPTION_m },
     { "nographic", 0, QEMU_OPTION_nographic },
     { "portrait", 0, QEMU_OPTION_portrait },
@@ -8355,11 +8603,6 @@
 		drive_add("file=\"%s\"," FD_ALIAS, optarg,
 		          popt->index - QEMU_OPTION_fda);
                 break;

+#define ADAPTER_KEY "SYSTEM\\CurrentControlSet\\Control\\Class\\{4D36E972-E325-11CE-BFC1-08002BE10318}"
+#define NETWORK_CONNECTIONS_KEY "SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}"
+#define DEVICE_PREFIX "\\Device\\TORNPF_"
+#define NETGUIDLEN 38
+
+static int get_net_device_guid(
+    char *name,
