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
ed1cb1f0
Commit
ed1cb1f0
authored
Mar 30, 2008
by
Hans Leidekker
Committed by
Alexandre Julliard
Mar 31, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Set ProxyEnable registry value if it isn't already set.
parent
e4c59c26
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
31 deletions
+29
-31
internet.c
dlls/wininet/internet.c
+29
-31
No files found.
dlls/wininet/internet.c
View file @
ed1cb1f0
...
@@ -357,45 +357,43 @@ static BOOL INTERNET_ConfigureProxy( LPWININETAPPINFOW lpwai )
...
@@ -357,45 +357,43 @@ static BOOL INTERNET_ConfigureProxy( LPWININETAPPINFOW lpwai )
if
(
RegOpenKeyW
(
HKEY_CURRENT_USER
,
szInternetSettings
,
&
key
))
return
FALSE
;
if
(
RegOpenKeyW
(
HKEY_CURRENT_USER
,
szInternetSettings
,
&
key
))
return
FALSE
;
len
=
sizeof
enabled
;
len
=
sizeof
enabled
;
if
(
!
RegQueryValueExW
(
key
,
szProxyEnable
,
NULL
,
&
type
,
(
BYTE
*
)
&
enabled
,
&
len
)
&&
if
(
RegQueryValueExW
(
key
,
szProxyEnable
,
NULL
,
&
type
,
(
BYTE
*
)
&
enabled
,
&
len
)
||
type
!=
REG_DWORD
)
(
type
==
REG_DWORD
))
RegSetValueExW
(
key
,
szProxyEnable
,
0
,
REG_DWORD
,
(
BYTE
*
)
&
enabled
,
sizeof
(
REG_DWORD
)
);
if
(
enabled
)
{
{
if
(
enabled
)
TRACE
(
"Proxy is enabled.
\n
"
);
/* figure out how much memory the proxy setting takes */
if
(
!
RegQueryValueExW
(
key
,
szProxyServer
,
NULL
,
&
type
,
NULL
,
&
len
)
&&
len
&&
(
type
==
REG_SZ
))
{
{
TRACE
(
"Proxy is enabled.
\n
"
);
LPWSTR
szProxy
,
p
;
static
const
WCHAR
szHttp
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
'='
,
0
};
/* figure out how much memory the proxy setting takes */
if
(
!
(
szProxy
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
)))
if
(
!
RegQueryValueExW
(
key
,
szProxyServer
,
NULL
,
&
type
,
NULL
,
&
len
)
&&
len
&&
(
type
==
REG_SZ
))
{
{
LPWSTR
szProxy
,
p
;
RegCloseKey
(
key
);
static
const
WCHAR
szHttp
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
'='
,
0
};
return
FALSE
;
}
if
(
!
(
szProxy
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
)))
RegQueryValueExW
(
key
,
szProxyServer
,
NULL
,
&
type
,
(
BYTE
*
)
szProxy
,
&
len
);
{
RegCloseKey
(
key
);
return
FALSE
;
}
RegQueryValueExW
(
key
,
szProxyServer
,
NULL
,
&
type
,
(
BYTE
*
)
szProxy
,
&
len
);
/* find the http proxy, and strip away everything else */
/* find the http proxy, and strip away everything else */
p
=
strstrW
(
szProxy
,
szHttp
);
p
=
strstrW
(
szProxy
,
szHttp
);
if
(
p
)
if
(
p
)
{
{
p
+=
lstrlenW
(
szHttp
);
p
+=
lstrlenW
(
szHttp
);
lstrcpyW
(
szProxy
,
p
);
lstrcpyW
(
szProxy
,
p
);
}
}
p
=
strchrW
(
szProxy
,
' '
);
p
=
strchrW
(
szProxy
,
' '
);
if
(
p
)
*
p
=
0
;
if
(
p
)
*
p
=
0
;
lpwai
->
dwAccessType
=
INTERNET_OPEN_TYPE_PROXY
;
lpwai
->
dwAccessType
=
INTERNET_OPEN_TYPE_PROXY
;
lpwai
->
lpszProxy
=
szProxy
;
lpwai
->
lpszProxy
=
szProxy
;
TRACE
(
"http proxy = %s
\n
"
,
debugstr_w
(
lpwai
->
lpszProxy
));
TRACE
(
"http proxy = %s
\n
"
,
debugstr_w
(
lpwai
->
lpszProxy
));
}
else
ERR
(
"Couldn't read proxy server settings from registry.
\n
"
);
}
}
else
ERR
(
"Couldn't read proxy server settings from registry.
\n
"
);
}
}
else
if
((
envproxy
=
getenv
(
"http_proxy"
)))
else
if
((
envproxy
=
getenv
(
"http_proxy"
)))
{
{
...
...
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