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
e66d1cd5
Commit
e66d1cd5
authored
Jan 09, 2007
by
Francois Gouget
Committed by
Alexandre Julliard
Jan 10, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Consistenly use INTERNET_SetLastError().
parent
06a14de1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
25 deletions
+25
-25
ftp.c
dlls/wininet/ftp.c
+1
-1
http.c
dlls/wininet/http.c
+4
-4
internet.c
dlls/wininet/internet.c
+20
-20
No files found.
dlls/wininet/ftp.c
View file @
e66d1cd5
...
...
@@ -370,7 +370,7 @@ BOOL WINAPI FtpSetCurrentDirectoryW(HINTERNET hConnect, LPCWSTR lpszDirectory)
if
(
!
lpszDirectory
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
INTERNET_
SetLastError
(
ERROR_INVALID_PARAMETER
);
goto
lend
;
}
...
...
dlls/wininet/http.c
View file @
e66d1cd5
...
...
@@ -1464,7 +1464,7 @@ static BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD dwInfoLev
((
dwInfoLevel
&
HTTP_QUERY_FLAG_REQUEST_HEADERS
)
&&
(
~
lphttpHdr
->
wFlags
&
HDR_ISREQUEST
)))
{
SetLastError
(
ERROR_HTTP_HEADER_NOT_FOUND
);
INTERNET_
SetLastError
(
ERROR_HTTP_HEADER_NOT_FOUND
);
return
bSuccess
;
}
...
...
@@ -1754,7 +1754,7 @@ BOOL WINAPI HttpSendRequestExA(HINTERNET hRequest,
header
=
HeapAlloc
(
GetProcessHeap
(),
0
,
headerlen
*
sizeof
(
WCHAR
));
if
(
!
(
BuffersInW
.
lpcszHeader
=
header
))
{
SetLastError
(
ERROR_OUTOFMEMORY
);
INTERNET_
SetLastError
(
ERROR_OUTOFMEMORY
);
return
FALSE
;
}
BuffersInW
.
dwHeadersLength
=
MultiByteToWideChar
(
CP_ACP
,
0
,
...
...
@@ -1848,7 +1848,7 @@ BOOL WINAPI HttpSendRequestExW(HINTERNET hRequest,
/*
* This is from windows.
*/
SetLastError
(
ERROR_IO_PENDING
);
INTERNET_
SetLastError
(
ERROR_IO_PENDING
);
ret
=
FALSE
;
}
else
...
...
@@ -1930,7 +1930,7 @@ BOOL WINAPI HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders,
/*
* This is from windows.
*/
SetLastError
(
ERROR_IO_PENDING
);
INTERNET_
SetLastError
(
ERROR_IO_PENDING
);
r
=
FALSE
;
}
else
...
...
dlls/wininet/internet.c
View file @
e66d1cd5
...
...
@@ -769,7 +769,7 @@ HINTERNET WINAPI InternetConnectW(HINTERNET hInternet,
if
(
!
lpszServerName
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
INTERNET_
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
NULL
;
}
...
...
@@ -778,7 +778,7 @@ HINTERNET WINAPI InternetConnectW(HINTERNET hInternet,
hIC
=
(
LPWININETAPPINFOW
)
WININET_GetObject
(
hInternet
);
if
(
(
hIC
==
NULL
)
||
(
hIC
->
hdr
.
htype
!=
WH_HINIT
)
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
INTERNET_
SetLastError
(
ERROR_INVALID_HANDLE
);
goto
lend
;
}
...
...
@@ -1219,7 +1219,7 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lpszUrl_orig, DWORD dwUrlLength_orig, DWOR
if
(
!
lpszUrl_orig
||
!*
lpszUrl_orig
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
INTERNET_
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
...
...
@@ -1777,7 +1777,7 @@ BOOL WINAPI InternetReadFile(HINTERNET hFile, LPVOID lpBuffer,
lpwh
=
WININET_GetObject
(
hFile
);
if
(
!
lpwh
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
INTERNET_
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
...
...
@@ -1839,14 +1839,14 @@ BOOL WINAPI InternetReadFileExA(HINTERNET hFile, LPINTERNET_BUFFERSA lpBuffersOu
if
(
lpBuffersOut
->
dwStructSize
!=
sizeof
(
*
lpBuffersOut
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
INTERNET_
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
lpwh
=
(
LPWININETHANDLEHEADER
)
WININET_GetObject
(
hFile
);
if
(
!
lpwh
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
INTERNET_
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
...
...
@@ -1868,7 +1868,7 @@ BOOL WINAPI InternetReadFileExA(HINTERNET hFile, LPINTERNET_BUFFERSA lpBuffersOu
retval
=
INTERNET_AsyncCall
(
&
workRequest
);
if
(
!
retval
)
return
FALSE
;
SetLastError
(
ERROR_IO_PENDING
);
INTERNET_
SetLastError
(
ERROR_IO_PENDING
);
return
FALSE
;
}
...
...
@@ -1923,7 +1923,7 @@ static BOOL INET_QueryOptionHelper(BOOL bIsUnicode, HINTERNET hInternet, DWORD d
lpwhh
=
(
LPWININETHANDLEHEADER
)
WININET_GetObject
(
hInternet
);
if
(
!
lpwhh
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
INTERNET_
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
...
...
@@ -1936,7 +1936,7 @@ static BOOL INET_QueryOptionHelper(BOOL bIsUnicode, HINTERNET hInternet, DWORD d
if
(
!
lpwhh
)
{
WARN
(
"Invalid hInternet handle
\n
"
);
SetLastError
(
ERROR_INVALID_HANDLE
);
INTERNET_
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
...
...
@@ -1976,7 +1976,7 @@ static BOOL INET_QueryOptionHelper(BOOL bIsUnicode, HINTERNET hInternet, DWORD d
if
(
!
lpwhh
)
{
WARN
(
"Invalid hInternet handle
\n
"
);
SetLastError
(
ERROR_INVALID_HANDLE
);
INTERNET_
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
if
(
lpwhh
->
htype
==
WH_HHTTPREQ
)
...
...
@@ -2519,7 +2519,7 @@ BOOL WINAPI InternetSetOptionExW(HINTERNET hInternet, DWORD dwOption,
FIXME
(
"Flags %08x ignored
\n
"
,
dwFlags
);
if
(
dwFlags
&
~
ISO_VALID_FLAGS
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
INTERNET_
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
return
InternetSetOptionW
(
hInternet
,
dwOption
,
lpBuffer
,
dwBufferLength
);
...
...
@@ -2760,7 +2760,7 @@ End:
HeapFree
(
GetProcessHeap
(),
0
,
command
);
if
(
rc
==
FALSE
)
SetLastError
(
ERROR_NOT_CONNECTED
);
INTERNET_
SetLastError
(
ERROR_NOT_CONNECTED
);
return
rc
;
}
...
...
@@ -2919,7 +2919,7 @@ HINTERNET WINAPI InternetOpenUrlW(HINTERNET hInternet, LPCWSTR lpszUrl,
if
(
!
lpszUrl
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
INTERNET_
SetLastError
(
ERROR_INVALID_PARAMETER
);
goto
lend
;
}
...
...
@@ -2949,7 +2949,7 @@ HINTERNET WINAPI InternetOpenUrlW(HINTERNET hInternet, LPCWSTR lpszUrl,
/*
* This is from windows.
*/
SetLastError
(
ERROR_IO_PENDING
);
INTERNET_
SetLastError
(
ERROR_IO_PENDING
);
}
else
{
ret
=
INTERNET_InternetOpenUrlW
(
hIC
,
lpszUrl
,
lpszHeaders
,
dwHeadersLength
,
dwFlags
,
dwContext
);
}
...
...
@@ -3227,7 +3227,7 @@ BOOL WINAPI InternetQueryDataAvailable( HINTERNET hFile,
lpwhr
=
(
LPWININETHTTPREQW
)
WININET_GetObject
(
hFile
);
if
(
NULL
==
lpwhr
)
{
SetLastError
(
ERROR_NO_MORE_FILES
);
INTERNET_
SetLastError
(
ERROR_NO_MORE_FILES
);
return
FALSE
;
}
...
...
@@ -3240,7 +3240,7 @@ BOOL WINAPI InternetQueryDataAvailable( HINTERNET hFile,
min
(
sizeof
(
buffer
),
lpwhr
->
dwContentLength
-
lpwhr
->
dwContentRead
),
MSG_PEEK
,
(
int
*
)
lpdwNumberOfBytesAvailble
))
{
SetLastError
(
ERROR_NO_MORE_FILES
);
INTERNET_
SetLastError
(
ERROR_NO_MORE_FILES
);
retval
=
FALSE
;
}
else
...
...
@@ -3459,7 +3459,7 @@ static BOOL calc_url_length(LPURL_COMPONENTSW lpUrlComponents,
{
if
(
lpUrlComponents
->
lpszPassword
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
INTERNET_
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
}
...
...
@@ -3577,7 +3577,7 @@ BOOL WINAPI InternetCreateUrlA(LPURL_COMPONENTSA lpUrlComponents, DWORD dwFlags,
if
(
lpUrlComponents
->
dwStructSize
!=
sizeof
(
URL_COMPONENTSW
)
||
!
lpdwUrlLength
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
INTERNET_
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
...
...
@@ -3647,7 +3647,7 @@ BOOL WINAPI InternetCreateUrlW(LPURL_COMPONENTSW lpUrlComponents, DWORD dwFlags,
if
(
lpUrlComponents
->
dwStructSize
!=
sizeof
(
URL_COMPONENTSW
)
||
!
lpdwUrlLength
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
INTERNET_
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
...
...
@@ -3657,7 +3657,7 @@ BOOL WINAPI InternetCreateUrlW(LPURL_COMPONENTSW lpUrlComponents, DWORD dwFlags,
if
(
!
lpszUrl
||
*
lpdwUrlLength
<
dwLen
)
{
*
lpdwUrlLength
=
(
dwLen
+
1
)
*
sizeof
(
WCHAR
);
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
INTERNET_
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
return
FALSE
;
}
...
...
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