Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Felix Münchhalfen
wine
Commits
e5203462
Commit
e5203462
authored
20 years ago
by
Juan Lang
Committed by
Alexandre Julliard
20 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Convert some registry calls from A to W.
parent
7af955a1
Branches
Branches containing commit
Tags
wine-951003
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/netapi32/nbt.c
+34
-14
34 additions, 14 deletions
dlls/netapi32/nbt.c
with
34 additions
and
14 deletions
dlls/netapi32/nbt.c
+
34
−
14
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
,
EnableDNS
W
,
NULL
,
NULL
,
(
LPBYTE
)
&
dword
,
&
size
)
==
ERROR_SUCCESS
)
gEnableDNS
=
dword
;
size
=
sizeof
(
dword
);
if
(
RegQueryValueEx
A
(
hKey
,
"
BcastNameQueryCount
"
,
NULL
,
NULL
,
if
(
RegQueryValueEx
W
(
hKey
,
BcastNameQueryCount
W
,
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
,
BcastNameQueryTimeout
W
,
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
,
NameSrvQueryCount
W
,
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
,
NameSrvQueryTimeout
W
,
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
,
ScopeID
W
,
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
,
CacheTimeout
W
,
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"
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment