Commit 629352bd authored by Alexandre Julliard's avatar Alexandre Julliard

Moved network configuration parameters to HKCU\Software\Wine\Network.

parent 5664a680
......@@ -619,10 +619,8 @@ DWORD WINAPI GetAdaptersInfo(PIP_ADAPTER_INFO pAdapterInfo, PULONG pOutBufLen)
IP_ADDRESS_STRING primaryWINS, secondaryWINS;
memset(pAdapterInfo, 0, size);
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\Network */
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE,
"Software\\Wine\\Wine\\Config\\Network", 0, KEY_READ,
&hKey) == ERROR_SUCCESS) {
/* @@ Wine registry key: HKCU\Software\Wine\Network */
if (RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Wine\\Network", &hKey) == ERROR_SUCCESS) {
DWORD size = sizeof(primaryWINS.String);
unsigned long addr;
......
......@@ -198,23 +198,23 @@ inline static void _init_attr ( OBJECT_ATTRIBUTES *attr, UNICODE_STRING *name )
*/
static BOOL get_use_dns_option(void)
{
static const WCHAR NetworkW[] = {'M','a','c','h','i','n','e','\\',
'S','o','f','t','w','a','r','e','\\',
'W','i','n','e','\\','W','i','n','e','\\',
'C','o','n','f','i','g','\\','N','e','t','w','o','r','k',0};
static const WCHAR NetworkW[] = {'S','o','f','t','w','a','r','e','\\',
'W','i','n','e','\\','N','e','t','w','o','r','k',0};
static const WCHAR UseDNSW[] = {'U','s','e','D','n','s','C','o','m','p','u','t','e','r','N','a','m','e',0};
char tmp[80];
HKEY hkey;
HKEY root, hkey;
DWORD dummy;
OBJECT_ATTRIBUTES attr;
UNICODE_STRING nameW;
BOOL ret = TRUE;
_init_attr( &attr, &nameW );
RtlOpenCurrentUser( KEY_ALL_ACCESS, &root );
attr.RootDirectory = root;
RtlInitUnicodeString( &nameW, NetworkW );
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\Network */
/* @@ Wine registry key: HKCU\Software\Wine\Network */
if (!NtOpenKey( &hkey, KEY_ALL_ACCESS, &attr ))
{
RtlInitUnicodeString( &nameW, UseDNSW );
......@@ -225,6 +225,7 @@ static BOOL get_use_dns_option(void)
}
NtClose( hkey );
}
NtClose( root );
return ret;
}
......
......@@ -1435,8 +1435,7 @@ static const WCHAR ScopeIDW[] = { 'S','c','o','p','e','I','D','\0' };
static const WCHAR CacheTimeoutW[] = { 'C','a','c','h','e','T','i','m','e','o',
'u','t','\0' };
static const WCHAR Config_NetworkW[] = { 'S','o','f','t','w','a','r','e','\\',
'W','i','n','e','\\','W','i','n','e','\\','C','o','n','f','i','g','\\','N','e',
't','w','o','r','k','\0' };
'W','i','n','e','\\','N','e','t','w','o','r','k','\0' };
/* Initializes global variables and registers the NetBT transport */
void NetBTInit(void)
......@@ -1517,9 +1516,8 @@ void NetBTInit(void)
* different than MS', we can't do per-adapter WINS configuration in the
* same place. Just do a global WINS configuration instead.
*/
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\Network */
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, Config_NetworkW, 0, KEY_READ, &hKey)
== ERROR_SUCCESS)
/* @@ Wine registry key: HKCU\Software\Wine\Network */
if (RegOpenKeyW(HKEY_CURRENT_USER, Config_NetworkW, &hKey) == ERROR_SUCCESS)
{
static const char *nsValueNames[] = { "WinsServer", "BackupWinsServer" };
char nsString[16];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment