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
b0ad0b9c
Commit
b0ad0b9c
authored
Jan 20, 2010
by
Andrew Eikum
Committed by
Alexandre Julliard
Jan 21, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Implement PER_CONN_FLAGS option.
parent
c3af903f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
14 deletions
+41
-14
internet.c
dlls/wininet/internet.c
+13
-0
internet.c
dlls/wininet/tests/internet.c
+28
-14
No files found.
dlls/wininet/internet.c
View file @
b0ad0b9c
...
...
@@ -2518,6 +2518,19 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption,
break
;
case
INTERNET_PER_CONN_FLAGS
:
switch
(
option
->
Value
.
dwValue
)
{
case
PROXY_TYPE_PROXY
:
pi
.
dwProxyEnabled
=
1
;
break
;
case
PROXY_TYPE_DIRECT
:
pi
.
dwProxyEnabled
=
0
;
break
;
default:
FIXME
(
"Unhandled flag: %d
\n
"
,
option
->
Value
.
dwValue
);
break
;
}
break
;
case
INTERNET_PER_CONN_AUTOCONFIG_URL
:
case
INTERNET_PER_CONN_AUTODISCOVERY_FLAGS
:
case
INTERNET_PER_CONN_AUTOCONFIG_SECONDARY_URL
:
...
...
dlls/wininet/tests/internet.c
View file @
b0ad0b9c
...
...
@@ -857,10 +857,11 @@ static void test_Option_PerConnectionOption(void)
static
WCHAR
proxy_srvW
[]
=
{
'p'
,
'r'
,
'o'
,
'x'
,
'y'
,
'.'
,
'e'
,
'x'
,
'a'
,
'm'
,
'p'
,
'l'
,
'e'
,
0
};
/* get the global IE proxy server info, to restore later */
list
.
dwOptionCount
=
1
;
list
.
pOptions
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
INTERNET_PER_CONN_OPTIONW
));
list
.
dwOptionCount
=
2
;
list
.
pOptions
=
HeapAlloc
(
GetProcessHeap
(),
0
,
2
*
sizeof
(
INTERNET_PER_CONN_OPTIONW
));
list
.
pOptions
[
0
].
dwOption
=
INTERNET_PER_CONN_PROXY_SERVER
;
list
.
pOptions
[
1
].
dwOption
=
INTERNET_PER_CONN_FLAGS
;
ret
=
InternetQueryOptionW
(
NULL
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
&
size
);
...
...
@@ -868,11 +869,13 @@ static void test_Option_PerConnectionOption(void)
orig_settings
=
list
.
pOptions
;
/* set the global IE proxy server */
list
.
dwOptionCount
=
1
;
list
.
pOptions
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
INTERNET_PER_CONN_OPTIONW
));
list
.
dwOptionCount
=
2
;
list
.
pOptions
=
HeapAlloc
(
GetProcessHeap
(),
0
,
2
*
sizeof
(
INTERNET_PER_CONN_OPTIONW
));
list
.
pOptions
[
0
].
dwOption
=
INTERNET_PER_CONN_PROXY_SERVER
;
list
.
pOptions
[
0
].
Value
.
pszValue
=
proxy_srvW
;
list
.
pOptions
[
1
].
dwOption
=
INTERNET_PER_CONN_FLAGS
;
list
.
pOptions
[
1
].
Value
.
dwValue
=
PROXY_TYPE_PROXY
;
ret
=
InternetSetOptionW
(
NULL
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
size
);
...
...
@@ -881,11 +884,12 @@ static void test_Option_PerConnectionOption(void)
HeapFree
(
GetProcessHeap
(),
0
,
list
.
pOptions
);
/* get & verify the global IE proxy server */
list
.
dwOptionCount
=
1
;
list
.
dwOptionCount
=
2
;
list
.
dwOptionError
=
0
;
list
.
pOptions
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
INTERNET_PER_CONN_OPTIONW
));
list
.
pOptions
=
HeapAlloc
(
GetProcessHeap
(),
0
,
2
*
sizeof
(
INTERNET_PER_CONN_OPTIONW
));
list
.
pOptions
[
0
].
dwOption
=
INTERNET_PER_CONN_PROXY_SERVER
;
list
.
pOptions
[
1
].
dwOption
=
INTERNET_PER_CONN_FLAGS
;
ret
=
InternetQueryOptionW
(
NULL
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
&
size
);
...
...
@@ -893,11 +897,14 @@ static void test_Option_PerConnectionOption(void)
ok
(
!
lstrcmpW
(
list
.
pOptions
[
0
].
Value
.
pszValue
,
proxy_srvW
),
"Retrieved proxy server should've been %s, was: %s
\n
"
,
wine_dbgstr_w
(
proxy_srvW
),
wine_dbgstr_w
(
list
.
pOptions
[
0
].
Value
.
pszValue
));
ok
(
list
.
pOptions
[
1
].
Value
.
dwValue
==
PROXY_TYPE_PROXY
,
"Retrieved flags should've been PROXY_TYPE_PROXY, was: %d
\n
"
,
list
.
pOptions
[
1
].
Value
.
dwValue
);
HeapFree
(
GetProcessHeap
(),
0
,
list
.
pOptions
);
/* restore original settings */
list
.
dwOptionCount
=
1
;
list
.
dwOptionCount
=
2
;
list
.
pOptions
=
orig_settings
;
ret
=
InternetSetOptionW
(
NULL
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
...
...
@@ -916,10 +923,11 @@ static void test_Option_PerConnectionOptionA(void)
char
proxy_srv
[]
=
"proxy.example"
;
/* get the global IE proxy server info, to restore later */
list
.
dwOptionCount
=
1
;
list
.
pOptions
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
INTERNET_PER_CONN_OPTIONA
));
list
.
dwOptionCount
=
2
;
list
.
pOptions
=
HeapAlloc
(
GetProcessHeap
(),
0
,
2
*
sizeof
(
INTERNET_PER_CONN_OPTIONA
));
list
.
pOptions
[
0
].
dwOption
=
INTERNET_PER_CONN_PROXY_SERVER
;
list
.
pOptions
[
1
].
dwOption
=
INTERNET_PER_CONN_FLAGS
;
ret
=
InternetQueryOptionA
(
NULL
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
&
size
);
...
...
@@ -927,11 +935,13 @@ static void test_Option_PerConnectionOptionA(void)
orig_settings
=
list
.
pOptions
;
/* set the global IE proxy server */
list
.
dwOptionCount
=
1
;
list
.
pOptions
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
INTERNET_PER_CONN_OPTIONA
));
list
.
dwOptionCount
=
2
;
list
.
pOptions
=
HeapAlloc
(
GetProcessHeap
(),
0
,
2
*
sizeof
(
INTERNET_PER_CONN_OPTIONA
));
list
.
pOptions
[
0
].
dwOption
=
INTERNET_PER_CONN_PROXY_SERVER
;
list
.
pOptions
[
0
].
Value
.
pszValue
=
proxy_srv
;
list
.
pOptions
[
1
].
dwOption
=
INTERNET_PER_CONN_FLAGS
;
list
.
pOptions
[
1
].
Value
.
dwValue
=
PROXY_TYPE_PROXY
;
ret
=
InternetSetOptionA
(
NULL
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
size
);
...
...
@@ -940,11 +950,12 @@ static void test_Option_PerConnectionOptionA(void)
HeapFree
(
GetProcessHeap
(),
0
,
list
.
pOptions
);
/* get & verify the global IE proxy server */
list
.
dwOptionCount
=
1
;
list
.
dwOptionCount
=
2
;
list
.
dwOptionError
=
0
;
list
.
pOptions
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
INTERNET_PER_CONN_OPTIONA
));
list
.
pOptions
=
HeapAlloc
(
GetProcessHeap
(),
0
,
2
*
sizeof
(
INTERNET_PER_CONN_OPTIONA
));
list
.
pOptions
[
0
].
dwOption
=
INTERNET_PER_CONN_PROXY_SERVER
;
list
.
pOptions
[
1
].
dwOption
=
INTERNET_PER_CONN_FLAGS
;
ret
=
InternetQueryOptionA
(
NULL
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
&
size
);
...
...
@@ -952,11 +963,14 @@ static void test_Option_PerConnectionOptionA(void)
ok
(
!
lstrcmpA
(
list
.
pOptions
[
0
].
Value
.
pszValue
,
"proxy.example"
),
"Retrieved proxy server should've been
\"
%s
\"
, was:
\"
%s
\"\n
"
,
proxy_srv
,
list
.
pOptions
[
0
].
Value
.
pszValue
);
ok
(
list
.
pOptions
[
1
].
Value
.
dwValue
==
PROXY_TYPE_PROXY
,
"Retrieved flags should've been PROXY_TYPE_PROXY, was: %d
\n
"
,
list
.
pOptions
[
1
].
Value
.
dwValue
);
HeapFree
(
GetProcessHeap
(),
0
,
list
.
pOptions
);
/* restore original settings */
list
.
dwOptionCount
=
1
;
list
.
dwOptionCount
=
2
;
list
.
pOptions
=
orig_settings
;
ret
=
InternetSetOptionA
(
NULL
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
...
...
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