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
096fa3b9
Commit
096fa3b9
authored
Oct 06, 2008
by
Hans Leidekker
Committed by
Alexandre Julliard
Oct 07, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Option INTERNET_OPTION_CALLBACK is not settable.
parent
b9813873
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
8 deletions
+27
-8
internet.c
dlls/wininet/internet.c
+15
-7
http.c
dlls/wininet/tests/http.c
+12
-1
No files found.
dlls/wininet/internet.c
View file @
096fa3b9
...
...
@@ -2259,9 +2259,14 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption,
{
case
INTERNET_OPTION_CALLBACK
:
{
INTERNET_STATUS_CALLBACK
callback
=
*
(
INTERNET_STATUS_CALLBACK
*
)
lpBuffer
;
ret
=
(
set_status_callback
(
lpwhh
,
callback
,
TRUE
)
!=
INTERNET_INVALID_STATUS_CALLBACK
);
break
;
if
(
!
lpwhh
)
{
INTERNET_SetLastError
(
ERROR_INTERNET_INCORRECT_HANDLE_TYPE
);
return
FALSE
;
}
WININET_Release
(
lpwhh
);
INTERNET_SetLastError
(
ERROR_INTERNET_OPTION_NOT_SETTABLE
);
return
FALSE
;
}
case
INTERNET_OPTION_HTTP_VERSION
:
{
...
...
@@ -2384,12 +2389,15 @@ BOOL WINAPI InternetSetOptionA(HINTERNET hInternet, DWORD dwOption,
case
INTERNET_OPTION_CALLBACK
:
{
LPWININETHANDLEHEADER
lpwh
;
INTERNET_STATUS_CALLBACK
callback
=
*
(
INTERNET_STATUS_CALLBACK
*
)
lpBuffer
;
if
(
!
(
lpwh
=
WININET_GetObject
(
hInternet
)))
return
FALSE
;
r
=
(
set_status_callback
(
lpwh
,
callback
,
FALSE
)
!=
INTERNET_INVALID_STATUS_CALLBACK
);
if
(
!
(
lpwh
=
WININET_GetObject
(
hInternet
)))
{
INTERNET_SetLastError
(
ERROR_INTERNET_INCORRECT_HANDLE_TYPE
);
return
FALSE
;
}
WININET_Release
(
lpwh
);
return
r
;
INTERNET_SetLastError
(
ERROR_INTERNET_OPTION_NOT_SETTABLE
);
return
FALSE
;
}
case
INTERNET_OPTION_PROXY
:
{
...
...
dlls/wininet/tests/http.c
View file @
096fa3b9
...
...
@@ -1984,7 +1984,7 @@ static void test_open_url_async(void)
{
BOOL
ret
;
HINTERNET
ses
,
req
;
DWORD
size
;
DWORD
size
,
error
;
struct
context
ctx
;
ULONG
type
;
...
...
@@ -1994,6 +1994,17 @@ static void test_open_url_async(void)
ses
=
InternetOpen
(
"AdvancedInstaller"
,
0
,
NULL
,
NULL
,
INTERNET_FLAG_ASYNC
);
ok
(
ses
!=
NULL
,
"InternetOpen failed
\n
"
);
SetLastError
(
0xdeadbeef
);
ret
=
InternetSetOptionA
(
NULL
,
INTERNET_OPTION_CALLBACK
,
&
cb
,
sizeof
(
DWORD_PTR
));
error
=
GetLastError
();
ok
(
!
ret
,
"InternetSetOptionA succeeded
\n
"
);
ok
(
error
==
ERROR_INTERNET_INCORRECT_HANDLE_TYPE
,
"got %u expected ERROR_INTERNET_INCORRECT_HANDLE_TYPE
\n
"
,
error
);
ret
=
InternetSetOptionA
(
ses
,
INTERNET_OPTION_CALLBACK
,
&
cb
,
sizeof
(
DWORD_PTR
));
error
=
GetLastError
();
ok
(
!
ret
,
"InternetSetOptionA failed
\n
"
);
ok
(
error
==
ERROR_INTERNET_OPTION_NOT_SETTABLE
,
"got %u expected ERROR_INTERNET_OPTION_NOT_SETTABLE
\n
"
,
error
);
pInternetSetStatusCallbackA
(
ses
,
cb
);
ResetEvent
(
ctx
.
event
);
...
...
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