Moved network configuration parameters to HKCU\Software\Wine\Network.
This commit is contained in:
parent
5664a68033
commit
629352bdc4
|
@ -619,10 +619,8 @@ DWORD WINAPI GetAdaptersInfo(PIP_ADAPTER_INFO pAdapterInfo, PULONG pOutBufLen)
|
||||||
IP_ADDRESS_STRING primaryWINS, secondaryWINS;
|
IP_ADDRESS_STRING primaryWINS, secondaryWINS;
|
||||||
|
|
||||||
memset(pAdapterInfo, 0, size);
|
memset(pAdapterInfo, 0, size);
|
||||||
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\Network */
|
/* @@ Wine registry key: HKCU\Software\Wine\Network */
|
||||||
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE,
|
if (RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Wine\\Network", &hKey) == ERROR_SUCCESS) {
|
||||||
"Software\\Wine\\Wine\\Config\\Network", 0, KEY_READ,
|
|
||||||
&hKey) == ERROR_SUCCESS) {
|
|
||||||
DWORD size = sizeof(primaryWINS.String);
|
DWORD size = sizeof(primaryWINS.String);
|
||||||
unsigned long addr;
|
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 BOOL get_use_dns_option(void)
|
||||||
{
|
{
|
||||||
static const WCHAR NetworkW[] = {'M','a','c','h','i','n','e','\\',
|
static const WCHAR NetworkW[] = {'S','o','f','t','w','a','r','e','\\',
|
||||||
'S','o','f','t','w','a','r','e','\\',
|
'W','i','n','e','\\','N','e','t','w','o','r','k',0};
|
||||||
'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 UseDNSW[] = {'U','s','e','D','n','s','C','o','m','p','u','t','e','r','N','a','m','e',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];
|
char tmp[80];
|
||||||
HKEY hkey;
|
HKEY root, hkey;
|
||||||
DWORD dummy;
|
DWORD dummy;
|
||||||
OBJECT_ATTRIBUTES attr;
|
OBJECT_ATTRIBUTES attr;
|
||||||
UNICODE_STRING nameW;
|
UNICODE_STRING nameW;
|
||||||
BOOL ret = TRUE;
|
BOOL ret = TRUE;
|
||||||
|
|
||||||
_init_attr( &attr, &nameW );
|
_init_attr( &attr, &nameW );
|
||||||
|
RtlOpenCurrentUser( KEY_ALL_ACCESS, &root );
|
||||||
|
attr.RootDirectory = root;
|
||||||
RtlInitUnicodeString( &nameW, NetworkW );
|
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 ))
|
if (!NtOpenKey( &hkey, KEY_ALL_ACCESS, &attr ))
|
||||||
{
|
{
|
||||||
RtlInitUnicodeString( &nameW, UseDNSW );
|
RtlInitUnicodeString( &nameW, UseDNSW );
|
||||||
|
@ -225,6 +225,7 @@ static BOOL get_use_dns_option(void)
|
||||||
}
|
}
|
||||||
NtClose( hkey );
|
NtClose( hkey );
|
||||||
}
|
}
|
||||||
|
NtClose( root );
|
||||||
return ret;
|
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',
|
static const WCHAR CacheTimeoutW[] = { 'C','a','c','h','e','T','i','m','e','o',
|
||||||
'u','t','\0' };
|
'u','t','\0' };
|
||||||
static const WCHAR Config_NetworkW[] = { 'S','o','f','t','w','a','r','e','\\',
|
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',
|
'W','i','n','e','\\','N','e','t','w','o','r','k','\0' };
|
||||||
't','w','o','r','k','\0' };
|
|
||||||
|
|
||||||
/* Initializes global variables and registers the NetBT transport */
|
/* Initializes global variables and registers the NetBT transport */
|
||||||
void NetBTInit(void)
|
void NetBTInit(void)
|
||||||
|
@ -1517,9 +1516,8 @@ void NetBTInit(void)
|
||||||
* different than MS', we can't do per-adapter WINS configuration in the
|
* different than MS', we can't do per-adapter WINS configuration in the
|
||||||
* same place. Just do a global WINS configuration instead.
|
* same place. Just do a global WINS configuration instead.
|
||||||
*/
|
*/
|
||||||
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\Network */
|
/* @@ Wine registry key: HKCU\Software\Wine\Network */
|
||||||
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, Config_NetworkW, 0, KEY_READ, &hKey)
|
if (RegOpenKeyW(HKEY_CURRENT_USER, Config_NetworkW, &hKey) == ERROR_SUCCESS)
|
||||||
== ERROR_SUCCESS)
|
|
||||||
{
|
{
|
||||||
static const char *nsValueNames[] = { "WinsServer", "BackupWinsServer" };
|
static const char *nsValueNames[] = { "WinsServer", "BackupWinsServer" };
|
||||||
char nsString[16];
|
char nsString[16];
|
||||||
|
|
Loading…
Reference in New Issue