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
a74b52cf
Commit
a74b52cf
authored
Sep 03, 2008
by
Hans Leidekker
Committed by
Alexandre Julliard
Sep 03, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Add an initial implementation of WinHttpQueryOption and WinHttpSetOption.
parent
41a76362
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
86 additions
and
23 deletions
+86
-23
main.c
dlls/winhttp/main.c
+0
-22
session.c
dlls/winhttp/session.c
+85
-0
winhttp_private.h
dlls/winhttp/winhttp_private.h
+1
-1
No files found.
dlls/winhttp/main.c
View file @
a74b52cf
...
...
@@ -85,28 +85,6 @@ HRESULT WINAPI DllUnregisterServer(void)
return
S_OK
;
}
/***********************************************************************
* WinHttpQueryOption (winhttp.@)
*/
BOOL
WINAPI
WinHttpQueryOption
(
HINTERNET
hInternet
,
DWORD
dwOption
,
LPVOID
lpBuffer
,
LPDWORD
lpdwBufferLength
)
{
FIXME
(
"(%d): stub
\n
"
,
dwOption
);
SetLastError
(
ERROR_NOT_SUPPORTED
);
return
FALSE
;
}
/***********************************************************************
* WinHttpSetOption (winhttp.@)
*/
BOOL
WINAPI
WinHttpSetOption
(
HINTERNET
hInternet
,
DWORD
dwOption
,
LPVOID
lpBuffer
,
DWORD
dwBufferLength
)
{
FIXME
(
"stub
\n
"
);
SetLastError
(
ERROR_NOT_SUPPORTED
);
return
FALSE
;
}
#define SCHEME_HTTP 3
#define SCHEME_HTTPS 4
...
...
dlls/winhttp/session.c
View file @
a74b52cf
...
...
@@ -303,6 +303,91 @@ BOOL WINAPI WinHttpCloseHandle( HINTERNET handle )
return
TRUE
;
}
static
BOOL
query_option
(
object_header_t
*
hdr
,
DWORD
option
,
LPVOID
buffer
,
LPDWORD
buflen
)
{
BOOL
ret
=
FALSE
;
switch
(
option
)
{
case
WINHTTP_OPTION_CONTEXT_VALUE
:
{
*
(
DWORD_PTR
*
)
buffer
=
hdr
->
context
;
*
buflen
=
sizeof
(
DWORD_PTR
);
return
TRUE
;
}
default:
{
if
(
hdr
->
vtbl
->
query_option
)
ret
=
hdr
->
vtbl
->
query_option
(
hdr
,
option
,
buffer
,
buflen
);
else
FIXME
(
"unimplemented option %u
\n
"
,
option
);
}
}
return
ret
;
}
/***********************************************************************
* WinHttpQueryOption (winhttp.@)
*/
BOOL
WINAPI
WinHttpQueryOption
(
HINTERNET
handle
,
DWORD
option
,
LPVOID
buffer
,
LPDWORD
buflen
)
{
BOOL
ret
=
FALSE
;
object_header_t
*
hdr
;
TRACE
(
"%p, %u, %p, %p
\n
"
,
handle
,
option
,
buffer
,
buflen
);
if
(
!
(
hdr
=
grab_object
(
handle
)))
{
set_last_error
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
ret
=
query_option
(
hdr
,
option
,
buffer
,
buflen
);
release_object
(
hdr
);
return
ret
;
}
static
BOOL
set_option
(
object_header_t
*
hdr
,
DWORD
option
,
LPVOID
buffer
,
DWORD
buflen
)
{
BOOL
ret
=
FALSE
;
switch
(
option
)
{
case
WINHTTP_OPTION_CONTEXT_VALUE
:
{
hdr
->
context
=
*
(
DWORD_PTR
*
)
buffer
;
return
TRUE
;
}
default:
{
if
(
hdr
->
vtbl
->
set_option
)
ret
=
hdr
->
vtbl
->
set_option
(
hdr
,
option
,
buffer
,
buflen
);
else
FIXME
(
"unimplemented option %u
\n
"
,
option
);
}
}
return
ret
;
}
/***********************************************************************
* WinHttpSetOption (winhttp.@)
*/
BOOL
WINAPI
WinHttpSetOption
(
HINTERNET
handle
,
DWORD
option
,
LPVOID
buffer
,
DWORD
buflen
)
{
BOOL
ret
=
FALSE
;
object_header_t
*
hdr
;
TRACE
(
"%p, %u, %p, %u
\n
"
,
handle
,
option
,
buffer
,
buflen
);
if
(
!
(
hdr
=
grab_object
(
handle
)))
{
set_last_error
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
ret
=
set_option
(
hdr
,
option
,
buffer
,
buflen
);
release_object
(
hdr
);
return
ret
;
}
/***********************************************************************
* WinHttpDetectAutoProxyConfigUrl (winhttp.@)
*/
...
...
dlls/winhttp/winhttp_private.h
View file @
a74b52cf
...
...
@@ -41,7 +41,7 @@ typedef struct _object_header_t object_header_t;
typedef
struct
{
void
(
*
destroy
)(
object_header_t
*
);
BOOL
(
*
query_option
)(
object_header_t
*
,
DWORD
,
void
*
,
DWORD
*
,
BOOL
);
BOOL
(
*
query_option
)(
object_header_t
*
,
DWORD
,
void
*
,
DWORD
*
);
BOOL
(
*
set_option
)(
object_header_t
*
,
DWORD
,
void
*
,
DWORD
);
}
object_vtbl_t
;
...
...
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