[NETCFGX] RegQueryValueExW accepts a size in bytes, not TCHARS. Also, this local...
authorMark Jansen <mark.jansen@reactos.org>
Thu, 13 Oct 2016 19:57:29 +0000 (19:57 +0000)
committerMark Jansen <mark.jansen@reactos.org>
Thu, 13 Oct 2016 19:57:29 +0000 (19:57 +0000)
svn path=/trunk/; revision=72965

reactos/dll/win32/netcfgx/tcpipconf_notify.c

index d7eebe2..85e8f82 100644 (file)
@@ -2710,8 +2710,8 @@ LoadDNSSettings(
         RegQueryValueExW(hKey, L"RegisterAdapterName", NULL, NULL, (LPBYTE)&This->pCurrentConfig->pDNS->RegisterAdapterName, &dwSize);
         RegQueryValueExW(hKey, L"RegistrationEnabled", NULL, NULL, (LPBYTE)&This->pCurrentConfig->pDNS->RegistrationEnabled, &dwSize);
 
-        dwSize = sizeof(This->pCurrentConfig->pDNS->szDomain) / sizeof(WCHAR);
-        RegQueryValueExW(hKey, L"Domain", NULL, NULL, (LPBYTE)szBuffer, &dwSize);
+        dwSize = sizeof(This->pCurrentConfig->pDNS->szDomain);
+        RegQueryValueExW(hKey, L"Domain", NULL, NULL, (LPBYTE)This->pCurrentConfig->pDNS->szDomain, &dwSize);
 
         RegCloseKey(hKey);
     }