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
a3d9df7d
Commit
a3d9df7d
authored
Aug 15, 2008
by
Hans Leidekker
Committed by
Alexandre Julliard
Aug 19, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Implement WinHttpSetStatusCallback. Start sending notifications.
parent
ce00aa01
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
1 deletion
+38
-1
handle.c
dlls/winhttp/handle.c
+2
-0
session.c
dlls/winhttp/session.c
+33
-0
winhttp.spec
dlls/winhttp/winhttp.spec
+1
-1
winhttp_private.h
dlls/winhttp/winhttp_private.h
+2
-0
No files found.
dlls/winhttp/handle.c
View file @
a3d9df7d
...
...
@@ -77,6 +77,8 @@ void release_object( object_header_t *hdr )
TRACE
(
"object %p refcount = %d
\n
"
,
hdr
,
refs
);
if
(
!
refs
)
{
send_callback
(
hdr
,
WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING
,
&
hdr
->
handle
,
sizeof
(
HINTERNET
)
);
TRACE
(
"destroying object %p
\n
"
,
hdr
);
if
(
hdr
->
type
!=
WINHTTP_HANDLE_TYPE_SESSION
)
list_remove
(
&
hdr
->
entry
);
hdr
->
vtbl
->
destroy
(
hdr
);
...
...
dlls/winhttp/session.c
View file @
a3d9df7d
...
...
@@ -37,6 +37,11 @@ static void set_last_error( DWORD error )
SetLastError
(
error
);
}
void
send_callback
(
object_header_t
*
hdr
,
DWORD
status
,
LPVOID
info
,
DWORD
buflen
)
{
FIXME
(
"%p, %u, %p, %u
\n
"
,
hdr
,
status
,
info
,
buflen
);
}
/***********************************************************************
* WinHttpCheckPlatform (winhttp.@)
*/
...
...
@@ -175,6 +180,8 @@ HINTERNET WINAPI WinHttpConnect( HINTERNET hsession, LPCWSTR server, INTERNET_PO
if
(
!
(
hconnect
=
alloc_handle
(
&
connect
->
hdr
)))
goto
end
;
connect
->
hdr
.
handle
=
hconnect
;
send_callback
(
&
session
->
hdr
,
WINHTTP_CALLBACK_STATUS_HANDLE_CREATED
,
&
hconnect
,
sizeof
(
hconnect
)
);
end:
release_object
(
&
connect
->
hdr
);
...
...
@@ -262,6 +269,8 @@ HINTERNET WINAPI WinHttpOpenRequest( HINTERNET hconnect, LPCWSTR verb, LPCWSTR o
if
(
!
(
hrequest
=
alloc_handle
(
&
request
->
hdr
)))
goto
end
;
request
->
hdr
.
handle
=
hrequest
;
send_callback
(
&
request
->
hdr
,
WINHTTP_CALLBACK_STATUS_HANDLE_CREATED
,
&
hrequest
,
sizeof
(
hrequest
)
);
end:
release_object
(
&
request
->
hdr
);
...
...
@@ -287,3 +296,27 @@ BOOL WINAPI WinHttpCloseHandle( HINTERNET handle )
free_handle
(
handle
);
return
TRUE
;
}
/***********************************************************************
* WinHttpSetStatusCallback (winhttp.@)
*/
WINHTTP_STATUS_CALLBACK
WINAPI
WinHttpSetStatusCallback
(
HINTERNET
handle
,
WINHTTP_STATUS_CALLBACK
callback
,
DWORD
flags
,
DWORD_PTR
reserved
)
{
object_header_t
*
hdr
;
WINHTTP_STATUS_CALLBACK
ret
;
TRACE
(
"%p, %p, 0x%08x, 0x%lx
\n
"
,
handle
,
callback
,
flags
,
reserved
);
if
(
!
(
hdr
=
grab_object
(
handle
)))
{
set_last_error
(
ERROR_INVALID_HANDLE
);
return
WINHTTP_INVALID_STATUS_CALLBACK
;
}
ret
=
hdr
->
callback
;
hdr
->
callback
=
callback
;
hdr
->
notify_mask
=
flags
;
release_object
(
hdr
);
return
ret
;
}
dlls/winhttp/winhttp.spec
View file @
a3d9df7d
...
...
@@ -24,7 +24,7 @@
@ stub WinHttpSetCredentials
@ stub WinHttpSetDefaultProxyConfiguration
@ stdcall WinHttpSetOption(ptr long ptr long)
@ st
ub WinHttpSetStatusCallback
@ st
dcall WinHttpSetStatusCallback(ptr ptr long ptr)
@ stub WinHttpSetTimeouts
@ stdcall WinHttpTimeFromSystemTime(ptr ptr)
@ stdcall WinHttpTimeToSystemTime(wstr ptr)
...
...
dlls/winhttp/winhttp_private.h
View file @
a3d9df7d
...
...
@@ -116,6 +116,8 @@ void release_object( object_header_t * );
HINTERNET
alloc_handle
(
object_header_t
*
);
BOOL
free_handle
(
HINTERNET
);
void
send_callback
(
object_header_t
*
,
DWORD
,
LPVOID
,
DWORD
);
static
inline
void
*
heap_alloc
(
SIZE_T
size
)
{
return
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
...
...
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