Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
52144829
Commit
52144829
authored
Nov 23, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 23, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Don't take INTERNET_BUFFERSW as argument in object's ReadFileEx entry.
parent
9cf630fc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
29 deletions
+30
-29
ftp.c
dlls/wininet/ftp.c
+3
-3
http.c
dlls/wininet/http.c
+13
-20
internet.c
dlls/wininet/internet.c
+8
-2
internet.h
dlls/wininet/internet.h
+6
-4
No files found.
dlls/wininet/ftp.c
View file @
52144829
...
...
@@ -1207,10 +1207,10 @@ static DWORD FTPFILE_ReadFileExA(object_header_t *hdr, INTERNET_BUFFERSA *buffer
return
FTPFILE_ReadFile
(
hdr
,
buffers
->
lpvBuffer
,
buffers
->
dwBufferLength
,
&
buffers
->
dwBufferLength
);
}
static
DWORD
FTPFILE_ReadFileEx
W
(
object_header_t
*
hdr
,
INTERNET_BUFFERSW
*
buffers
,
static
DWORD
FTPFILE_ReadFileEx
(
object_header_t
*
hdr
,
void
*
buf
,
DWORD
size
,
DWORD
*
ret_size
,
DWORD
flags
,
DWORD_PTR
context
)
{
return
FTPFILE_ReadFile
(
hdr
,
buf
fers
->
lpvBuffer
,
buffers
->
dwBufferLength
,
&
buffers
->
dwBufferLength
);
return
FTPFILE_ReadFile
(
hdr
,
buf
,
size
,
ret_size
);
}
static
DWORD
FTPFILE_WriteFile
(
object_header_t
*
hdr
,
const
void
*
buffer
,
DWORD
size
,
DWORD
*
written
)
...
...
@@ -1300,7 +1300,7 @@ static const object_vtbl_t FTPFILEVtbl = {
INET_SetOption
,
FTPFILE_ReadFile
,
FTPFILE_ReadFileExA
,
FTPFILE_ReadFileEx
W
,
FTPFILE_ReadFileEx
,
FTPFILE_WriteFile
,
FTPFILE_QueryDataAvailable
,
NULL
...
...
dlls/wininet/http.c
View file @
52144829
...
...
@@ -2980,31 +2980,27 @@ done:
static
void
HTTPREQ_AsyncReadFileExWProc
(
WORKREQUEST
*
workRequest
)
{
struct
WORKREQ_
INTERNETREADFILEEXW
const
*
data
=
&
workRequest
->
u
.
InternetReadFileExW
;
struct
WORKREQ_
HTTPREADFILEEX
const
*
data
=
&
workRequest
->
u
.
HttpReadFileEx
;
http_request_t
*
req
=
(
http_request_t
*
)
workRequest
->
hdr
;
DWORD
res
;
TRACE
(
"INTERNETREADFILEEXW %p
\n
"
,
workRequest
->
hdr
);
res
=
HTTPREQ_Read
(
req
,
data
->
lpBuffersOut
->
lpvBuffer
,
data
->
lpBuffersOut
->
dwBufferLength
,
&
data
->
lpBuffersOut
->
dwBufferLength
,
TRUE
);
res
=
HTTPREQ_Read
(
req
,
data
->
buf
,
data
->
size
,
data
->
ret_read
,
TRUE
);
send_request_complete
(
req
,
res
==
ERROR_SUCCESS
,
res
);
}
static
DWORD
HTTPREQ_ReadFileExW
(
object_header_t
*
hdr
,
INTERNET_BUFFERSW
*
buffers
,
static
DWORD
HTTPREQ_ReadFileExW
(
object_header_t
*
hdr
,
void
*
buf
,
DWORD
size
,
DWORD
*
ret_read
,
DWORD
flags
,
DWORD_PTR
context
)
{
http_request_t
*
req
=
(
http_request_t
*
)
hdr
;
DWORD
res
,
size
,
read
,
error
=
ERROR_SUCCESS
;
DWORD
res
,
read
,
c
read
,
error
=
ERROR_SUCCESS
;
if
(
flags
&
~
(
IRF_ASYNC
|
IRF_NO_WAIT
))
FIXME
(
"these dwFlags aren't implemented: 0x%x
\n
"
,
flags
&
~
(
IRF_ASYNC
|
IRF_NO_WAIT
));
if
(
buffers
->
dwStructSize
!=
sizeof
(
*
buffers
))
return
ERROR_INVALID_PARAMETER
;
INTERNET_SendCallback
(
&
req
->
hdr
,
req
->
hdr
.
dwContext
,
INTERNET_STATUS_RECEIVING_RESPONSE
,
NULL
,
0
);
if
(
hdr
->
dwFlags
&
INTERNET_FLAG_ASYNC
)
...
...
@@ -3015,9 +3011,7 @@ static DWORD HTTPREQ_ReadFileExW(object_header_t *hdr, INTERNET_BUFFERSW *buffer
{
if
(
get_avail_data
(
req
))
{
res
=
HTTPREQ_Read
(
req
,
buffers
->
lpvBuffer
,
buffers
->
dwBufferLength
,
&
buffers
->
dwBufferLength
,
FALSE
);
size
=
buffers
->
dwBufferLength
;
res
=
HTTPREQ_Read
(
req
,
buf
,
size
,
&
read
,
FALSE
);
LeaveCriticalSection
(
&
req
->
read_section
);
goto
done
;
}
...
...
@@ -3026,7 +3020,9 @@ static DWORD HTTPREQ_ReadFileExW(object_header_t *hdr, INTERNET_BUFFERSW *buffer
workRequest
.
asyncproc
=
HTTPREQ_AsyncReadFileExWProc
;
workRequest
.
hdr
=
WININET_AddRef
(
&
req
->
hdr
);
workRequest
.
u
.
InternetReadFileExW
.
lpBuffersOut
=
buffers
;
workRequest
.
u
.
HttpReadFileEx
.
buf
=
buf
;
workRequest
.
u
.
HttpReadFileEx
.
size
=
size
;
workRequest
.
u
.
HttpReadFileEx
.
ret_read
=
ret_read
;
INTERNET_AsyncCall
(
&
workRequest
);
...
...
@@ -3034,7 +3030,6 @@ static DWORD HTTPREQ_ReadFileExW(object_header_t *hdr, INTERNET_BUFFERSW *buffer
}
read
=
0
;
size
=
buffers
->
dwBufferLength
;
EnterCriticalSection
(
&
req
->
read_section
);
if
(
hdr
->
dwError
==
ERROR_SUCCESS
)
...
...
@@ -3043,19 +3038,18 @@ static DWORD HTTPREQ_ReadFileExW(object_header_t *hdr, INTERNET_BUFFERSW *buffer
hdr
->
dwError
=
ERROR_INTERNET_INTERNAL_ERROR
;
while
(
1
)
{
res
=
HTTPREQ_Read
(
req
,
(
char
*
)
buffers
->
lpvBuffer
+
read
,
size
-
read
,
&
buffers
->
dwBufferLength
,
!
(
flags
&
IRF_NO_WAIT
));
res
=
HTTPREQ_Read
(
req
,
(
char
*
)
buf
+
read
,
size
-
read
,
&
cread
,
!
(
flags
&
IRF_NO_WAIT
));
if
(
res
!=
ERROR_SUCCESS
)
break
;
read
+=
buffers
->
dwBufferLength
;
read
+=
cread
;
if
(
read
==
size
||
end_of_read_data
(
req
))
break
;
LeaveCriticalSection
(
&
req
->
read_section
);
INTERNET_SendCallback
(
&
req
->
hdr
,
req
->
hdr
.
dwContext
,
INTERNET_STATUS_RESPONSE_RECEIVED
,
&
buffers
->
dwBufferLength
,
sizeof
(
buffers
->
dwBufferLength
));
&
cread
,
sizeof
(
cread
));
INTERNET_SendCallback
(
&
req
->
hdr
,
req
->
hdr
.
dwContext
,
INTERNET_STATUS_RECEIVING_RESPONSE
,
NULL
,
0
);
...
...
@@ -3068,13 +3062,12 @@ static DWORD HTTPREQ_ReadFileExW(object_header_t *hdr, INTERNET_BUFFERSW *buffer
error
=
hdr
->
dwError
;
LeaveCriticalSection
(
&
req
->
read_section
);
size
=
buffers
->
dwBufferLength
;
buffers
->
dwBufferLength
=
read
;
done:
*
ret_read
=
read
;
if
(
res
==
ERROR_SUCCESS
)
{
INTERNET_SendCallback
(
&
req
->
hdr
,
req
->
hdr
.
dwContext
,
INTERNET_STATUS_RESPONSE_RECEIVED
,
&
size
,
sizeof
(
size
));
&
read
,
sizeof
(
read
));
}
return
res
==
ERROR_SUCCESS
?
error
:
res
;
...
...
dlls/wininet/internet.c
View file @
52144829
...
...
@@ -2269,14 +2269,20 @@ BOOL WINAPI InternetReadFileExW(HINTERNET hFile, LPINTERNET_BUFFERSW lpBuffer,
TRACE
(
"(%p %p 0x%x 0x%lx)
\n
"
,
hFile
,
lpBuffer
,
dwFlags
,
dwContext
);
if
(
lpBuffer
->
dwStructSize
!=
sizeof
(
*
lpBuffer
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
hdr
=
get_handle_object
(
hFile
);
if
(
!
hdr
)
{
INTERNET_SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
if
(
hdr
->
vtbl
->
ReadFileExW
)
res
=
hdr
->
vtbl
->
ReadFileExW
(
hdr
,
lpBuffer
,
dwFlags
,
dwContext
);
if
(
hdr
->
vtbl
->
ReadFileEx
)
res
=
hdr
->
vtbl
->
ReadFileEx
(
hdr
,
lpBuffer
->
lpvBuffer
,
lpBuffer
->
dwBufferLength
,
&
lpBuffer
->
dwBufferLength
,
dwFlags
,
dwContext
);
WININET_Release
(
hdr
);
...
...
dlls/wininet/internet.h
View file @
52144829
...
...
@@ -234,7 +234,7 @@ typedef struct {
DWORD
(
*
SetOption
)(
object_header_t
*
,
DWORD
,
void
*
,
DWORD
);
DWORD
(
*
ReadFile
)(
object_header_t
*
,
void
*
,
DWORD
,
DWORD
*
);
DWORD
(
*
ReadFileExA
)(
object_header_t
*
,
INTERNET_BUFFERSA
*
,
DWORD
,
DWORD_PTR
);
DWORD
(
*
ReadFileEx
W
)(
object_header_t
*
,
INTERNET_BUFFERSW
*
,
DWORD
,
DWORD_PTR
);
DWORD
(
*
ReadFileEx
)(
object_header_t
*
,
void
*
,
DWORD
,
DWORD
*
,
DWORD
,
DWORD_PTR
);
DWORD
(
*
WriteFile
)(
object_header_t
*
,
const
void
*
,
DWORD
,
DWORD
*
);
DWORD
(
*
QueryDataAvailable
)(
object_header_t
*
,
DWORD
*
,
DWORD
,
DWORD_PTR
);
DWORD
(
*
FindNextFileW
)(
object_header_t
*
,
void
*
);
...
...
@@ -467,9 +467,11 @@ struct WORKREQ_INTERNETREADFILEEXA
LPINTERNET_BUFFERSA
lpBuffersOut
;
};
struct
WORKREQ_
INTERNETREADFILEEXW
struct
WORKREQ_
HTTPREADFILEEX
{
LPINTERNET_BUFFERSW
lpBuffersOut
;
void
*
buf
;
DWORD
size
;
DWORD
*
ret_read
;
};
typedef
struct
WORKREQ
...
...
@@ -494,7 +496,7 @@ typedef struct WORKREQ
struct
WORKREQ_SENDCALLBACK
SendCallback
;
struct
WORKREQ_INTERNETOPENURLW
InternetOpenUrlW
;
struct
WORKREQ_INTERNETREADFILEEXA
InternetReadFileExA
;
struct
WORKREQ_
INTERNETREADFILEEXW
InternetReadFileExW
;
struct
WORKREQ_
HTTPREADFILEEX
HttpReadFileEx
;
}
u
;
}
WORKREQUEST
,
*
LPWORKREQUEST
;
...
...
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