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
2b09cfe9
Commit
2b09cfe9
authored
Nov 30, 2016
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 30, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp/tests: Properly restore proxy settings on 64-bit.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1c3d6ab9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
11 deletions
+18
-11
winhttp.c
dlls/winhttp/tests/winhttp.c
+18
-11
No files found.
dlls/winhttp/tests/winhttp.c
View file @
2b09cfe9
...
...
@@ -1217,21 +1217,28 @@ static DWORD get_default_proxy_reg_value( BYTE *buf, DWORD len, DWORD *type )
return
ret
;
}
static
void
set_
default_proxy_reg_value
(
BYTE
*
buf
,
DWORD
len
,
DWORD
type
)
static
void
set_
proxy
(
REGSAM
access
,
BYTE
*
buf
,
DWORD
len
,
DWORD
type
)
{
LONG
l
;
HKEY
key
;
HKEY
hkey
;
if
(
!
RegCreateKeyExW
(
HKEY_LOCAL_MACHINE
,
Connections
,
0
,
NULL
,
0
,
access
,
NULL
,
&
hkey
,
NULL
))
{
if
(
len
)
RegSetValueExW
(
hkey
,
WinHttpSettings
,
0
,
type
,
buf
,
len
);
else
RegDeleteValueW
(
hkey
,
WinHttpSettings
);
RegCloseKey
(
hkey
);
}
}
l
=
RegCreateKeyExW
(
HKEY_LOCAL_MACHINE
,
Connections
,
0
,
NULL
,
0
,
KEY_WRITE
,
NULL
,
&
key
,
NULL
);
if
(
!
l
)
static
void
set_default_proxy_reg_value
(
BYTE
*
buf
,
DWORD
len
,
DWORD
type
)
{
BOOL
wow64
;
IsWow64Process
(
GetCurrentProcess
(),
&
wow64
);
if
(
sizeof
(
void
*
)
>
sizeof
(
int
)
||
wow64
)
{
if
(
len
)
RegSetValueExW
(
key
,
WinHttpSettings
,
0
,
type
,
buf
,
len
);
else
RegDeleteValueW
(
key
,
WinHttpSettings
);
RegCloseKey
(
key
);
set_proxy
(
KEY_WRITE
|
KEY_WOW64_64KEY
,
buf
,
len
,
type
);
set_proxy
(
KEY_WRITE
|
KEY_WOW64_32KEY
,
buf
,
len
,
type
);
}
else
set_proxy
(
KEY_WRITE
,
buf
,
len
,
type
);
}
static
void
test_set_default_proxy_config
(
void
)
...
...
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