Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
cfdce43d
Commit
cfdce43d
authored
Jul 21, 2011
by
Juan Lang
Committed by
Alexandre Julliard
Jul 22, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Implement setting proxy options globally for a process.
parent
027238f8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
1 deletion
+66
-1
internet.c
dlls/wininet/internet.c
+66
-1
No files found.
dlls/wininet/internet.c
View file @
cfdce43d
...
...
@@ -498,10 +498,24 @@ static void FreeProxyInfo( proxyinfo_t *lpwpi )
heap_free
(
lpwpi
->
proxyBypass
);
}
static
proxyinfo_t
*
global_proxy
;
static
void
free_global_proxy
(
void
)
{
EnterCriticalSection
(
&
WININET_cs
);
if
(
global_proxy
)
{
FreeProxyInfo
(
global_proxy
);
heap_free
(
global_proxy
);
}
LeaveCriticalSection
(
&
WININET_cs
);
}
/***********************************************************************
* INTERNET_LoadProxySettings
*
* Loads proxy information from the registry or environment into lpwpi.
* Loads proxy information from process-wide global settings, the registry,
* or the environment into lpwpi.
*
* The caller should call FreeProxyInfo when done with lpwpi.
*
...
...
@@ -516,6 +530,15 @@ static LONG INTERNET_LoadProxySettings( proxyinfo_t *lpwpi )
LPCSTR
envproxy
;
LONG
ret
;
EnterCriticalSection
(
&
WININET_cs
);
if
(
global_proxy
)
{
lpwpi
->
proxyEnabled
=
global_proxy
->
proxyEnabled
;
lpwpi
->
proxy
=
heap_strdupW
(
global_proxy
->
proxy
);
lpwpi
->
proxyBypass
=
heap_strdupW
(
global_proxy
->
proxyBypass
);
}
LeaveCriticalSection
(
&
WININET_cs
);
if
((
ret
=
RegOpenKeyW
(
HKEY_CURRENT_USER
,
szInternetSettings
,
&
key
)))
return
ret
;
...
...
@@ -2538,6 +2561,48 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption,
lpwhh
->
ErrorMask
=
*
(
ULONG
*
)
lpBuffer
;
}
break
;
case
INTERNET_OPTION_PROXY
:
{
INTERNET_PROXY_INFOW
*
info
=
lpBuffer
;
if
(
!
lpBuffer
||
dwBufferLength
<
sizeof
(
INTERNET_PROXY_INFOW
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
if
(
!
hInternet
)
{
EnterCriticalSection
(
&
WININET_cs
);
free_global_proxy
();
global_proxy
=
heap_alloc
(
sizeof
(
proxyinfo_t
)
);
if
(
global_proxy
)
{
if
(
info
->
dwAccessType
==
INTERNET_OPEN_TYPE_PROXY
)
{
global_proxy
->
proxyEnabled
=
1
;
global_proxy
->
proxy
=
heap_strdupW
(
info
->
lpszProxy
);
global_proxy
->
proxyBypass
=
heap_strdupW
(
info
->
lpszProxyBypass
);
}
else
{
global_proxy
->
proxyEnabled
=
0
;
global_proxy
->
proxy
=
global_proxy
->
proxyBypass
=
NULL
;
}
}
LeaveCriticalSection
(
&
WININET_cs
);
}
else
{
/* In general, each type of object should handle
* INTERNET_OPTION_PROXY directly. This FIXME ensures it doesn't
* get silently dropped.
*/
FIXME
(
"INTERNET_OPTION_PROXY unimplemented
\n
"
);
SetLastError
(
ERROR_INTERNET_INVALID_OPTION
);
ret
=
FALSE
;
}
break
;
}
case
INTERNET_OPTION_CODEPAGE
:
{
ULONG
codepage
=
*
(
ULONG
*
)
lpBuffer
;
...
...
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