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
70768564
Commit
70768564
authored
Feb 15, 2024
by
Piotr Caban
Committed by
Alexandre Julliard
Feb 15, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet/tests: Cleanup INTERNET_OPTION_PER_CONNECTION_OPTION tests.
parent
9ea0a107
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
124 deletions
+66
-124
internet.c
dlls/wininet/tests/internet.c
+66
-124
No files found.
dlls/wininet/tests/internet.c
View file @
70768564
...
@@ -1265,8 +1265,8 @@ static void test_Option_PerConnectionOption(void)
...
@@ -1265,8 +1265,8 @@ static void test_Option_PerConnectionOption(void)
BOOL
ret
;
BOOL
ret
;
DWORD
size
=
sizeof
(
INTERNET_PER_CONN_OPTION_LISTW
);
DWORD
size
=
sizeof
(
INTERNET_PER_CONN_OPTION_LISTW
);
INTERNET_PER_CONN_OPTION_LISTW
list
=
{
size
};
INTERNET_PER_CONN_OPTION_LISTW
list
=
{
size
};
INTERNET_PER_CONN_OPTIONW
*
orig_settings
;
INTERNET_PER_CONN_OPTIONW
orig_settings
[
2
],
options
[
2
]
;
static
WCHAR
proxy_srvW
[]
=
{
'p'
,
'r'
,
'o'
,
'x'
,
'y'
,
'.'
,
'e'
,
'x'
,
'a'
,
'm'
,
'p'
,
'l'
,
'e'
,
0
}
;
static
WCHAR
proxy_srvW
[]
=
L"proxy.example"
;
HINTERNET
ses
;
HINTERNET
ses
;
ses
=
InternetOpenA
(
NULL
,
INTERNET_OPEN_TYPE_DIRECT
,
NULL
,
NULL
,
0
);
ses
=
InternetOpenA
(
NULL
,
INTERNET_OPEN_TYPE_DIRECT
,
NULL
,
NULL
,
0
);
...
@@ -1274,116 +1274,81 @@ static void test_Option_PerConnectionOption(void)
...
@@ -1274,116 +1274,81 @@ static void test_Option_PerConnectionOption(void)
/* get the process IE proxy server info, to restore later */
/* get the process IE proxy server info, to restore later */
list
.
dwOptionCount
=
2
;
list
.
dwOptionCount
=
2
;
list
.
pOptions
=
HeapAlloc
(
GetProcessHeap
(),
0
,
2
*
sizeof
(
INTERNET_PER_CONN_OPTIONW
));
list
.
pOptions
=
orig_settings
;
orig_settings
[
0
].
dwOption
=
INTERNET_PER_CONN_PROXY_SERVER
;
list
.
pOptions
[
0
].
dwOption
=
INTERNET_PER_CONN_PROXY_SERVER
;
orig_settings
[
1
].
dwOption
=
INTERNET_PER_CONN_FLAGS
;
list
.
pOptions
[
1
].
dwOption
=
INTERNET_PER_CONN_FLAGS
;
ret
=
InternetQueryOptionW
(
ses
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
&
size
);
ret
=
InternetQueryOptionW
(
ses
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
&
size
);
ok
(
ret
==
TRUE
,
"InternetQueryOption should've succeeded
\n
"
);
ok
(
ret
,
"InternetQueryOption should've succeeded
\n
"
);
orig_settings
=
list
.
pOptions
;
/* set the process IE proxy server */
/* set the process IE proxy server */
list
.
dwOptionCount
=
2
;
list
.
pOptions
=
options
;
list
.
pOptions
=
HeapAlloc
(
GetProcessHeap
(),
0
,
2
*
sizeof
(
INTERNET_PER_CONN_OPTIONW
));
options
[
0
].
dwOption
=
INTERNET_PER_CONN_PROXY_SERVER
;
options
[
0
].
Value
.
pszValue
=
proxy_srvW
;
list
.
pOptions
[
0
].
dwOption
=
INTERNET_PER_CONN_PROXY_SERVER
;
options
[
1
].
dwOption
=
INTERNET_PER_CONN_FLAGS
;
list
.
pOptions
[
0
].
Value
.
pszValue
=
proxy_srvW
;
options
[
1
].
Value
.
dwValue
=
PROXY_TYPE_PROXY
;
list
.
pOptions
[
1
].
dwOption
=
INTERNET_PER_CONN_FLAGS
;
list
.
pOptions
[
1
].
Value
.
dwValue
=
PROXY_TYPE_PROXY
;
ret
=
InternetSetOptionW
(
ses
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
size
);
ret
=
InternetSetOptionW
(
ses
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
size
);
ok
(
ret
==
TRUE
,
"InternetSetOption should've succeeded
\n
"
);
ok
(
ret
,
"InternetSetOption should've succeeded
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
list
.
pOptions
);
/* get & verify the process IE proxy server */
/* get & verify the process IE proxy server */
list
.
dwOptionCount
=
2
;
options
[
0
].
Value
.
pszValue
=
NULL
;
list
.
dwOptionError
=
0
;
options
[
1
].
Value
.
dwValue
=
0
;
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
(
ses
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
&
size
);
ret
=
InternetQueryOptionW
(
ses
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
&
size
);
ok
(
ret
==
TRUE
,
"InternetQueryOption should've succeeded
\n
"
);
ok
(
ret
,
"InternetQueryOption should've succeeded
\n
"
);
ok
(
!
lstrcmpW
(
list
.
pO
ptions
[
0
].
Value
.
pszValue
,
proxy_srvW
),
ok
(
!
lstrcmpW
(
o
ptions
[
0
].
Value
.
pszValue
,
proxy_srvW
),
"Retrieved proxy server should've been %s, was: %s
\n
"
,
"Retrieved proxy server should've been %s, was: %s
\n
"
,
wine_dbgstr_w
(
proxy_srvW
),
wine_dbgstr_w
(
list
.
pO
ptions
[
0
].
Value
.
pszValue
));
wine_dbgstr_w
(
proxy_srvW
),
wine_dbgstr_w
(
o
ptions
[
0
].
Value
.
pszValue
));
ok
(
list
.
pO
ptions
[
1
].
Value
.
dwValue
==
PROXY_TYPE_PROXY
,
ok
(
o
ptions
[
1
].
Value
.
dwValue
==
PROXY_TYPE_PROXY
,
"Retrieved flags should've been PROXY_TYPE_PROXY, was: %ld
\n
"
,
"Retrieved flags should've been PROXY_TYPE_PROXY, was: %ld
\n
"
,
list
.
pO
ptions
[
1
].
Value
.
dwValue
);
o
ptions
[
1
].
Value
.
dwValue
);
ret
=
HeapValidate
(
GetProcessHeap
(),
0
,
list
.
pO
ptions
[
0
].
Value
.
pszValue
);
ret
=
HeapValidate
(
GetProcessHeap
(),
0
,
o
ptions
[
0
].
Value
.
pszValue
);
ok
(
ret
,
"HeapValidate failed, last error %lu
\n
"
,
GetLastError
());
ok
(
ret
,
"HeapValidate failed, last error %lu
\n
"
,
GetLastError
());
GlobalFree
(
options
[
0
].
Value
.
pszValue
);
GlobalFree
(
list
.
pOptions
[
0
].
Value
.
pszValue
);
HeapFree
(
GetProcessHeap
(),
0
,
list
.
pOptions
);
/* disable the proxy server */
/* disable the proxy server */
list
.
dwOptionCount
=
1
;
list
.
dwOptionCount
=
1
;
list
.
pOptions
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
INTERNET_PER_CONN_OPTIONW
));
options
[
0
].
dwOption
=
INTERNET_PER_CONN_FLAGS
;
options
[
0
].
Value
.
dwValue
=
PROXY_TYPE_DIRECT
;
list
.
pOptions
[
0
].
dwOption
=
INTERNET_PER_CONN_FLAGS
;
list
.
pOptions
[
0
].
Value
.
dwValue
=
PROXY_TYPE_DIRECT
;
ret
=
InternetSetOptionW
(
ses
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
size
);
ret
=
InternetSetOptionW
(
ses
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
size
);
ok
(
ret
==
TRUE
,
"InternetSetOption should've succeeded
\n
"
);
ok
(
ret
,
"InternetSetOption should've succeeded
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
list
.
pOptions
);
/* verify that the proxy is disabled */
/* verify that the proxy is disabled */
list
.
dwOptionCount
=
1
;
options
[
0
].
Value
.
dwValue
=
0
;
list
.
dwOptionError
=
0
;
list
.
pOptions
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
INTERNET_PER_CONN_OPTIONW
));
list
.
pOptions
[
0
].
dwOption
=
INTERNET_PER_CONN_FLAGS
;
ret
=
InternetQueryOptionW
(
ses
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
&
size
);
ret
=
InternetQueryOptionW
(
ses
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
&
size
);
ok
(
ret
==
TRUE
,
"InternetQueryOption should've succeeded
\n
"
);
ok
(
ret
,
"InternetQueryOption should've succeeded
\n
"
);
ok
(
list
.
pO
ptions
[
0
].
Value
.
dwValue
==
PROXY_TYPE_DIRECT
,
ok
(
o
ptions
[
0
].
Value
.
dwValue
==
PROXY_TYPE_DIRECT
,
"Retrieved flags should've been PROXY_TYPE_DIRECT, was: %ld
\n
"
,
"Retrieved flags should've been PROXY_TYPE_DIRECT, was: %ld
\n
"
,
list
.
pOptions
[
0
].
Value
.
dwValue
);
options
[
0
].
Value
.
dwValue
);
HeapFree
(
GetProcessHeap
(),
0
,
list
.
pOptions
);
/* set the proxy flags to 'invalid' value */
/* set the proxy flags to 'invalid' value */
list
.
dwOptionCount
=
1
;
options
[
0
].
dwOption
=
INTERNET_PER_CONN_FLAGS
;
list
.
pOptions
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
INTERNET_PER_CONN_OPTIONW
));
options
[
0
].
Value
.
dwValue
=
PROXY_TYPE_PROXY
|
PROXY_TYPE_DIRECT
;
list
.
pOptions
[
0
].
dwOption
=
INTERNET_PER_CONN_FLAGS
;
list
.
pOptions
[
0
].
Value
.
dwValue
=
PROXY_TYPE_PROXY
|
PROXY_TYPE_DIRECT
;
ret
=
InternetSetOptionW
(
ses
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
size
);
ret
=
InternetSetOptionW
(
ses
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
size
);
ok
(
ret
==
TRUE
,
"InternetSetOption should've succeeded
\n
"
);
ok
(
ret
,
"InternetSetOption should've succeeded
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
list
.
pOptions
);
/* verify that the proxy is enabled */
/* verify that the proxy is enabled */
list
.
dwOptionCount
=
1
;
options
[
0
].
Value
.
dwValue
=
0
;
list
.
dwOptionError
=
0
;
list
.
pOptions
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
INTERNET_PER_CONN_OPTIONW
));
list
.
pOptions
[
0
].
dwOption
=
INTERNET_PER_CONN_FLAGS
;
ret
=
InternetQueryOptionW
(
ses
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
&
size
);
ret
=
InternetQueryOptionW
(
ses
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
&
size
);
ok
(
ret
==
TRUE
,
"InternetQueryOption should've succeeded
\n
"
);
ok
(
ret
,
"InternetQueryOption should've succeeded
\n
"
);
todo_wine
ok
(
list
.
pO
ptions
[
0
].
Value
.
dwValue
==
PROXY_TYPE_DIRECT
,
todo_wine
ok
(
o
ptions
[
0
].
Value
.
dwValue
==
PROXY_TYPE_DIRECT
,
"Retrieved flags should've been PROXY_TYPE_DIRECT, was: %ld
\n
"
,
"Retrieved flags should've been PROXY_TYPE_DIRECT, was: %ld
\n
"
,
list
.
pOptions
[
0
].
Value
.
dwValue
);
options
[
0
].
Value
.
dwValue
);
HeapFree
(
GetProcessHeap
(),
0
,
list
.
pOptions
);
/* restore original settings */
/* restore original settings */
list
.
dwOptionCount
=
2
;
list
.
dwOptionCount
=
2
;
list
.
pOptions
=
orig_settings
;
list
.
pOptions
=
orig_settings
;
ret
=
InternetSetOptionW
(
ses
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
size
);
ret
=
InternetSetOptionW
(
ses
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
size
);
ok
(
ret
==
TRUE
,
"InternetSetOption should've succeeded
\n
"
);
ok
(
ret
,
"InternetSetOption should've succeeded
\n
"
);
GlobalFree
(
list
.
pOptions
[
0
].
Value
.
pszValue
);
HeapFree
(
GetProcessHeap
(),
0
,
list
.
pOptions
);
GlobalFree
(
orig_settings
[
0
].
Value
.
pszValue
);
InternetCloseHandle
(
ses
);
InternetCloseHandle
(
ses
);
}
}
...
@@ -1392,7 +1357,7 @@ static void test_Option_PerConnectionOptionA(void)
...
@@ -1392,7 +1357,7 @@ static void test_Option_PerConnectionOptionA(void)
BOOL
ret
;
BOOL
ret
;
DWORD
size
=
sizeof
(
INTERNET_PER_CONN_OPTION_LISTA
);
DWORD
size
=
sizeof
(
INTERNET_PER_CONN_OPTION_LISTA
);
INTERNET_PER_CONN_OPTION_LISTA
list
=
{
size
};
INTERNET_PER_CONN_OPTION_LISTA
list
=
{
size
};
INTERNET_PER_CONN_OPTIONA
*
orig_settings
;
INTERNET_PER_CONN_OPTIONA
orig_settings
[
2
],
options
[
2
]
;
char
proxy_srv
[]
=
"proxy.example"
;
char
proxy_srv
[]
=
"proxy.example"
;
HINTERNET
ses
;
HINTERNET
ses
;
...
@@ -1401,89 +1366,66 @@ static void test_Option_PerConnectionOptionA(void)
...
@@ -1401,89 +1366,66 @@ static void test_Option_PerConnectionOptionA(void)
/* get the process IE proxy server info, to restore later */
/* get the process IE proxy server info, to restore later */
list
.
dwOptionCount
=
2
;
list
.
dwOptionCount
=
2
;
list
.
pOptions
=
HeapAlloc
(
GetProcessHeap
(),
0
,
2
*
sizeof
(
INTERNET_PER_CONN_OPTIONA
));
list
.
pOptions
=
orig_settings
;
orig_settings
[
0
].
dwOption
=
INTERNET_PER_CONN_PROXY_SERVER
;
list
.
pOptions
[
0
].
dwOption
=
INTERNET_PER_CONN_PROXY_SERVER
;
orig_settings
[
1
].
dwOption
=
INTERNET_PER_CONN_FLAGS
;
list
.
pOptions
[
1
].
dwOption
=
INTERNET_PER_CONN_FLAGS
;
ret
=
InternetQueryOptionA
(
ses
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
ret
=
InternetQueryOptionA
(
ses
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
&
size
);
&
list
,
&
size
);
ok
(
ret
==
TRUE
,
"InternetQueryOption should've succeeded
\n
"
);
ok
(
ret
,
"InternetQueryOption should've succeeded
\n
"
);
orig_settings
=
list
.
pOptions
;
/* set the process IE proxy server */
/* set the process IE proxy server */
list
.
dwOptionCount
=
2
;
list
.
pOptions
=
options
;
list
.
pOptions
=
HeapAlloc
(
GetProcessHeap
(),
0
,
2
*
sizeof
(
INTERNET_PER_CONN_OPTIONA
));
options
[
0
].
dwOption
=
INTERNET_PER_CONN_PROXY_SERVER
;
options
[
0
].
Value
.
pszValue
=
proxy_srv
;
list
.
pOptions
[
0
].
dwOption
=
INTERNET_PER_CONN_PROXY_SERVER
;
options
[
1
].
dwOption
=
INTERNET_PER_CONN_FLAGS
;
list
.
pOptions
[
0
].
Value
.
pszValue
=
proxy_srv
;
options
[
1
].
Value
.
dwValue
=
PROXY_TYPE_PROXY
;
list
.
pOptions
[
1
].
dwOption
=
INTERNET_PER_CONN_FLAGS
;
list
.
pOptions
[
1
].
Value
.
dwValue
=
PROXY_TYPE_PROXY
;
ret
=
InternetSetOptionA
(
ses
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
ret
=
InternetSetOptionA
(
ses
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
size
);
&
list
,
size
);
ok
(
ret
==
TRUE
,
"InternetSetOption should've succeeded
\n
"
);
ok
(
ret
,
"InternetSetOption should've succeeded
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
list
.
pOptions
);
/* get & verify the process IE proxy server */
/* get & verify the process IE proxy server */
list
.
dwOptionCount
=
2
;
options
[
0
].
Value
.
pszValue
=
NULL
;
list
.
dwOptionError
=
0
;
options
[
1
].
Value
.
dwValue
=
0
;
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
(
ses
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
ret
=
InternetQueryOptionA
(
ses
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
&
size
);
&
list
,
&
size
);
ok
(
ret
==
TRUE
,
"InternetQueryOption should've succeeded
\n
"
);
ok
(
ret
,
"InternetQueryOption should've succeeded
\n
"
);
ok
(
!
lstrcmpA
(
list
.
pO
ptions
[
0
].
Value
.
pszValue
,
"proxy.example"
),
ok
(
!
lstrcmpA
(
o
ptions
[
0
].
Value
.
pszValue
,
"proxy.example"
),
"Retrieved proxy server should've been
\"
%s
\"
, was:
\"
%s
\"\n
"
,
"Retrieved proxy server should've been
\"
%s
\"
, was:
\"
%s
\"\n
"
,
proxy_srv
,
list
.
pO
ptions
[
0
].
Value
.
pszValue
);
proxy_srv
,
o
ptions
[
0
].
Value
.
pszValue
);
ok
(
list
.
pO
ptions
[
1
].
Value
.
dwValue
==
PROXY_TYPE_PROXY
,
ok
(
o
ptions
[
1
].
Value
.
dwValue
==
PROXY_TYPE_PROXY
,
"Retrieved flags should've been PROXY_TYPE_PROXY, was: %ld
\n
"
,
"Retrieved flags should've been PROXY_TYPE_PROXY, was: %ld
\n
"
,
list
.
pO
ptions
[
1
].
Value
.
dwValue
);
o
ptions
[
1
].
Value
.
dwValue
);
GlobalFree
(
list
.
pOptions
[
0
].
Value
.
pszValue
);
GlobalFree
(
options
[
0
].
Value
.
pszValue
);
HeapFree
(
GetProcessHeap
(),
0
,
list
.
pOptions
);
/* test with NULL as proxy server */
/* test with NULL as proxy server */
list
.
dwOptionCount
=
1
;
list
.
dwOptionCount
=
1
;
list
.
pOptions
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
INTERNET_PER_CONN_OPTIONA
));
options
[
0
].
dwOption
=
INTERNET_PER_CONN_PROXY_SERVER
;
list
.
pOptions
[
0
].
dwOption
=
INTERNET_PER_CONN_PROXY_SERVER
;
options
[
0
].
Value
.
pszValue
=
NULL
;
list
.
pOptions
[
0
].
Value
.
pszValue
=
NULL
;
ret
=
InternetSetOptionA
(
ses
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
size
);
ret
=
InternetSetOptionA
(
ses
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
size
);
ok
(
ret
==
TRUE
,
"InternetSetOption should've succeeded
\n
"
);
ok
(
ret
,
"InternetSetOption should've succeeded
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
list
.
pOptions
);
/* get & verify the proxy server */
/* get & verify the proxy server */
list
.
dwOptionCount
=
1
;
options
[
0
].
Value
.
dwValue
=
0xdeadbeef
;
list
.
dwOptionError
=
0
;
list
.
pOptions
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
INTERNET_PER_CONN_OPTIONA
));
list
.
pOptions
[
0
].
dwOption
=
INTERNET_PER_CONN_PROXY_SERVER
;
ret
=
InternetQueryOptionA
(
ses
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
&
size
);
ret
=
InternetQueryOptionA
(
ses
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
&
size
);
ok
(
ret
==
TRUE
,
"InternetQueryOption should've succeeded
\n
"
);
ok
(
ret
,
"InternetQueryOption should've succeeded
\n
"
);
ok
(
!
list
.
pO
ptions
[
0
].
Value
.
pszValue
,
ok
(
!
o
ptions
[
0
].
Value
.
pszValue
,
"Retrieved proxy server should've been NULL, was:
\"
%s
\"\n
"
,
"Retrieved proxy server should've been NULL, was:
\"
%s
\"\n
"
,
list
.
pOptions
[
0
].
Value
.
pszValue
);
options
[
0
].
Value
.
pszValue
);
GlobalFree
(
list
.
pOptions
[
0
].
Value
.
pszValue
);
HeapFree
(
GetProcessHeap
(),
0
,
list
.
pOptions
);
/* restore original settings */
/* restore original settings */
list
.
dwOptionCount
=
2
;
list
.
dwOptionCount
=
2
;
list
.
pOptions
=
orig_settings
;
list
.
pOptions
=
orig_settings
;
ret
=
InternetSetOptionA
(
ses
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
ret
=
InternetSetOptionA
(
ses
,
INTERNET_OPTION_PER_CONNECTION_OPTION
,
&
list
,
size
);
&
list
,
size
);
ok
(
ret
,
"InternetSetOption should've succeeded
\n
"
);
ok
(
ret
==
TRUE
,
"InternetSetOption should've succeeded
\n
"
);
GlobalFree
(
list
.
pOptions
[
0
].
Value
.
pszValue
);
HeapFree
(
GetProcessHeap
(),
0
,
list
.
pOptions
);
GlobalFree
(
orig_settings
[
0
].
Value
.
pszValue
);
InternetCloseHandle
(
ses
);
InternetCloseHandle
(
ses
);
}
}
...
...
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