Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
e5203462
Commit
e5203462
authored
Dec 08, 2004
by
Juan Lang
Committed by
Alexandre Julliard
Dec 08, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert some registry calls from A to W.
parent
7af955a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
14 deletions
+34
-14
nbt.c
dlls/netapi32/nbt.c
+34
-14
No files found.
dlls/netapi32/nbt.c
View file @
e5203462
...
...
@@ -1417,6 +1417,29 @@ static UCHAR NetBTEnum(void)
return
ret
;
}
static
const
WCHAR
VxD_MSTCPW
[]
=
{
'S'
,
'Y'
,
'S'
,
'T'
,
'E'
,
'M'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'S'
,
'e'
,
't'
,
'\\'
,
'S'
,
'e'
,
'r'
,
'v'
,
'i'
,
'c'
,
'e'
,
's'
,
'\\'
,
'V'
,
'x'
,
'D'
,
'\\'
,
'M'
,
'S'
,
'T'
,
'C'
,
'P'
,
'\0'
};
static
const
WCHAR
NetBT_ParametersW
[]
=
{
'S'
,
'Y'
,
'S'
,
'T'
,
'E'
,
'M'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'S'
,
'e'
,
't'
,
'\\'
,
'S'
,
'e'
,
'r'
,
'v'
,
'i'
,
'c'
,
'e'
,
's'
,
'\\'
,
'N'
,
'e'
,
't'
,
'B'
,
'T'
,
'\\'
,
'P'
,
'a'
,
'r'
,
'a'
,
'm'
,
'e'
,
't'
,
'e'
,
'r'
,
's'
,
'\0'
};
static
const
WCHAR
EnableDNSW
[]
=
{
'E'
,
'n'
,
'a'
,
'b'
,
'l'
,
'e'
,
'D'
,
'N'
,
'S'
,
'\0'
};
static
const
WCHAR
BcastNameQueryCountW
[]
=
{
'B'
,
'c'
,
'a'
,
's'
,
't'
,
'N'
,
'a'
,
'm'
,
'e'
,
'Q'
,
'u'
,
'e'
,
'r'
,
'y'
,
'C'
,
'o'
,
'u'
,
'n'
,
't'
,
'\0'
};
static
const
WCHAR
BcastNameQueryTimeoutW
[]
=
{
'B'
,
'c'
,
'a'
,
's'
,
't'
,
'N'
,
'a'
,
'm'
,
'e'
,
'Q'
,
'u'
,
'e'
,
'r'
,
'y'
,
'T'
,
'i'
,
'm'
,
'e'
,
'o'
,
'u'
,
't'
,
'\0'
};
static
const
WCHAR
NameSrvQueryCountW
[]
=
{
'N'
,
'a'
,
'm'
,
'e'
,
'S'
,
'r'
,
'v'
,
'Q'
,
'u'
,
'e'
,
'r'
,
'y'
,
'C'
,
'o'
,
'u'
,
'n'
,
't'
,
'\0'
};
static
const
WCHAR
NameSrvQueryTimeoutW
[]
=
{
'N'
,
'a'
,
'm'
,
'e'
,
'S'
,
'r'
,
'v'
,
'Q'
,
'u'
,
'e'
,
'r'
,
'y'
,
'T'
,
'i'
,
'm'
,
'e'
,
'o'
,
'u'
,
't'
,
'\0'
};
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'
};
/* Initializes global variables and registers the NetBT transport */
void
NetBTInit
(
void
)
{
...
...
@@ -1437,43 +1460,41 @@ void NetBTInit(void)
gCacheTimeout
=
CACHE_TIMEOUT
;
/* Try to open the Win9x NetBT configuration key */
ret
=
RegOpenKeyExA
(
HKEY_LOCAL_MACHINE
,
"SYSTEM
\\
CurrentControlSet
\\
Services
\\
VxD
\\
MSTCP"
,
0
,
KEY_READ
,
&
hKey
);
ret
=
RegOpenKeyExW
(
HKEY_LOCAL_MACHINE
,
VxD_MSTCPW
,
0
,
KEY_READ
,
&
hKey
);
/* If that fails, try the WinNT NetBT configuration key */
if
(
ret
!=
ERROR_SUCCESS
)
ret
=
RegOpenKeyExA
(
HKEY_LOCAL_MACHINE
,
"SYSTEM
\\
CurrentControlSet
\\
Services
\\
NetBT
\\
Parameters"
,
0
,
KEY_READ
,
&
hKey
);
ret
=
RegOpenKeyExW
(
HKEY_LOCAL_MACHINE
,
NetBT_ParametersW
,
0
,
KEY_READ
,
&
hKey
);
if
(
ret
==
ERROR_SUCCESS
)
{
DWORD
dword
,
size
;
size
=
sizeof
(
dword
);
if
(
RegQueryValueEx
A
(
hKey
,
"EnableDNS"
,
NULL
,
NULL
,
if
(
RegQueryValueEx
W
(
hKey
,
EnableDNSW
,
NULL
,
NULL
,
(
LPBYTE
)
&
dword
,
&
size
)
==
ERROR_SUCCESS
)
gEnableDNS
=
dword
;
size
=
sizeof
(
dword
);
if
(
RegQueryValueEx
A
(
hKey
,
"BcastNameQueryCount"
,
NULL
,
NULL
,
if
(
RegQueryValueEx
W
(
hKey
,
BcastNameQueryCountW
,
NULL
,
NULL
,
(
LPBYTE
)
&
dword
,
&
size
)
==
ERROR_SUCCESS
&&
dword
>=
MIN_QUERIES
&&
dword
<=
MAX_QUERIES
)
gBCastQueries
=
dword
;
size
=
sizeof
(
dword
);
if
(
RegQueryValueEx
A
(
hKey
,
"BcastNameQueryTimeout"
,
NULL
,
NULL
,
if
(
RegQueryValueEx
W
(
hKey
,
BcastNameQueryTimeoutW
,
NULL
,
NULL
,
(
LPBYTE
)
&
dword
,
&
size
)
==
ERROR_SUCCESS
&&
dword
>=
MIN_QUERY_TIMEOUT
&&
dword
<=
MAX_QUERY_TIMEOUT
)
gBCastQueryTimeout
=
dword
;
size
=
sizeof
(
dword
);
if
(
RegQueryValueEx
A
(
hKey
,
"NameSrvQueryCount"
,
NULL
,
NULL
,
if
(
RegQueryValueEx
W
(
hKey
,
NameSrvQueryCountW
,
NULL
,
NULL
,
(
LPBYTE
)
&
dword
,
&
size
)
==
ERROR_SUCCESS
&&
dword
>=
MIN_QUERIES
&&
dword
<=
MAX_QUERIES
)
gWINSQueries
=
dword
;
size
=
sizeof
(
dword
);
if
(
RegQueryValueEx
A
(
hKey
,
"NameSrvQueryTimeout"
,
NULL
,
NULL
,
if
(
RegQueryValueEx
W
(
hKey
,
NameSrvQueryTimeoutW
,
NULL
,
NULL
,
(
LPBYTE
)
&
dword
,
&
size
)
==
ERROR_SUCCESS
&&
dword
>=
MIN_QUERY_TIMEOUT
&&
dword
<=
MAX_QUERY_TIMEOUT
)
gWINSQueryTimeout
=
dword
;
size
=
MAX_DOMAIN_NAME_LEN
-
1
;
if
(
RegQueryValueEx
A
(
hKey
,
"ScopeID"
,
NULL
,
NULL
,
gScopeID
+
1
,
&
size
)
if
(
RegQueryValueEx
W
(
hKey
,
ScopeIDW
,
NULL
,
NULL
,
gScopeID
+
1
,
&
size
)
==
ERROR_SUCCESS
)
{
/* convert into L2-encoded version, suitable for use by
...
...
@@ -1489,7 +1510,7 @@ void NetBTInit(void)
ptr
++
;
}
}
if
(
RegQueryValueEx
A
(
hKey
,
"CacheTimeout"
,
NULL
,
NULL
,
if
(
RegQueryValueEx
W
(
hKey
,
CacheTimeoutW
,
NULL
,
NULL
,
(
LPBYTE
)
&
dword
,
&
size
)
==
ERROR_SUCCESS
&&
dword
>=
MIN_CACHE_TIMEOUT
)
gCacheTimeout
=
dword
;
RegCloseKey
(
hKey
);
...
...
@@ -1498,8 +1519,7 @@ 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.
*/
if
(
RegOpenKeyExA
(
HKEY_LOCAL_MACHINE
,
"Software
\\
Wine
\\
Wine
\\
Config
\\
Network"
,
0
,
KEY_READ
,
&
hKey
)
if
(
RegOpenKeyExW
(
HKEY_LOCAL_MACHINE
,
Config_NetworkW
,
0
,
KEY_READ
,
&
hKey
)
==
ERROR_SUCCESS
)
{
static
const
char
*
nsValueNames
[]
=
{
"WinsServer"
,
"BackupWinsServer"
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment