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
6619e54d
Commit
6619e54d
authored
Aug 26, 2008
by
Hans Leidekker
Committed by
Alexandre Julliard
Aug 26, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Implement WinHttpWriteData.
parent
728bf77c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
14 deletions
+30
-14
main.c
dlls/winhttp/main.c
+0
-12
request.c
dlls/winhttp/request.c
+28
-0
winhttp.c
dlls/winhttp/tests/winhttp.c
+2
-2
No files found.
dlls/winhttp/main.c
View file @
6619e54d
...
...
@@ -105,18 +105,6 @@ BOOL WINAPI WinHttpSetOption (HINTERNET hInternet, DWORD dwOption, LPVOID lpBuff
return
FALSE
;
}
/***********************************************************************
* WinHttpWriteData (winhttp.@)
*/
BOOL
WINAPI
WinHttpWriteData
(
HINTERNET
hRequest
,
LPCVOID
lpBuffer
,
DWORD
dwNumberOfBytesToWrite
,
LPDWORD
lpdwNumberOfBytesWritten
)
{
FIXME
(
"(%p, %d, %p): stub
\n
"
,
lpBuffer
,
dwNumberOfBytesToWrite
,
lpdwNumberOfBytesWritten
);
SetLastError
(
ERROR_NOT_SUPPORTED
);
return
FALSE
;
}
BOOL
WINAPI
InternetCrackUrlW
(
LPCWSTR
,
DWORD
,
DWORD
,
LPURL_COMPONENTSW
);
BOOL
WINAPI
InternetCreateUrlW
(
LPURL_COMPONENTS
,
DWORD
,
LPWSTR
,
LPDWORD
);
...
...
dlls/winhttp/request.c
View file @
6619e54d
...
...
@@ -1109,3 +1109,31 @@ BOOL WINAPI WinHttpReadData( HINTERNET hrequest, LPVOID buffer, DWORD to_read, L
release_object
(
&
request
->
hdr
);
return
ret
;
}
/***********************************************************************
* WinHttpWriteData (winhttp.@)
*/
BOOL
WINAPI
WinHttpWriteData
(
HINTERNET
hrequest
,
LPCVOID
buffer
,
DWORD
to_write
,
LPDWORD
written
)
{
BOOL
ret
;
request_t
*
request
;
TRACE
(
"%p, %p, %d, %p
\n
"
,
hrequest
,
buffer
,
to_write
,
written
);
if
(
!
(
request
=
(
request_t
*
)
grab_object
(
hrequest
)))
{
set_last_error
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
if
(
request
->
hdr
.
type
!=
WINHTTP_HANDLE_TYPE_REQUEST
)
{
release_object
(
&
request
->
hdr
);
set_last_error
(
ERROR_WINHTTP_INCORRECT_HANDLE_TYPE
);
return
FALSE
;
}
ret
=
netconn_send
(
&
request
->
netconn
,
buffer
,
to_write
,
0
,
(
int
*
)
written
);
release_object
(
&
request
->
hdr
);
return
ret
;
}
dlls/winhttp/tests/winhttp.c
View file @
6619e54d
...
...
@@ -117,8 +117,8 @@ static void test_SendRequest (void)
{
bytes_rw
=
-
1
;
ret
=
WinHttpWriteData
(
request
,
&
post_data
[
i
],
1
,
&
bytes_rw
);
todo_wine
ok
(
ret
==
TRUE
,
"WinHttpWriteData failed: %u.
\n
"
,
GetLastError
());
todo_wine
ok
(
bytes_rw
==
1
,
"WinHttpWriteData failed, wrote %u bytes instead of 1 byte.
\n
"
,
bytes_rw
);
ok
(
ret
==
TRUE
,
"WinHttpWriteData failed: %u.
\n
"
,
GetLastError
());
ok
(
bytes_rw
==
1
,
"WinHttpWriteData failed, wrote %u bytes instead of 1 byte.
\n
"
,
bytes_rw
);
}
ret
=
WinHttpReceiveResponse
(
request
,
NULL
);
...
...
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