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
ce6a2289
Commit
ce6a2289
authored
Mar 12, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 12, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Move InternetQueryOption(INTERNET_OPTION_DATAFILE_NAME).
parent
0e010d83
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
45 deletions
+29
-45
http.c
dlls/wininet/http.c
+29
-0
internet.c
dlls/wininet/internet.c
+0
-45
No files found.
dlls/wininet/http.c
View file @
ce6a2289
...
...
@@ -1449,6 +1449,35 @@ static DWORD HTTPREQ_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, void *b
return
ERROR_SUCCESS
;
}
}
case
INTERNET_OPTION_DATAFILE_NAME
:
{
DWORD
req_size
;
TRACE
(
"INTERNET_OPTION_DATAFILE_NAME
\n
"
);
if
(
!
req
->
lpszCacheFile
)
{
*
size
=
0
;
return
ERROR_INTERNET_ITEM_NOT_FOUND
;
}
if
(
unicode
)
{
req_size
=
(
lstrlenW
(
req
->
lpszCacheFile
)
+
1
)
*
sizeof
(
WCHAR
);
if
(
*
size
<
req_size
)
return
ERROR_INSUFFICIENT_BUFFER
;
*
size
=
req_size
;
memcpy
(
buffer
,
req
->
lpszCacheFile
,
*
size
);
return
ERROR_SUCCESS
;
}
else
{
req_size
=
WideCharToMultiByte
(
CP_ACP
,
0
,
req
->
lpszCacheFile
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
if
(
req_size
>
*
size
)
return
ERROR_INSUFFICIENT_BUFFER
;
*
size
=
WideCharToMultiByte
(
CP_ACP
,
0
,
req
->
lpszCacheFile
,
-
1
,
buffer
,
*
size
,
NULL
,
NULL
);
return
ERROR_SUCCESS
;
}
}
}
FIXME
(
"Not implemented option %d
\n
"
,
option
);
...
...
dlls/wininet/internet.c
View file @
ce6a2289
...
...
@@ -1872,51 +1872,6 @@ static BOOL INET_QueryOptionHelper(BOOL bIsUnicode, HINTERNET hInternet, DWORD d
FIXME
(
"INTERNET_OPTION_USER_AGENT
\n
"
);
break
;
case
INTERNET_OPTION_DATAFILE_NAME
:
{
TRACE
(
"INTERNET_OPTION_DATAFILE_NAME
\n
"
);
if
(
!
lpwhh
)
{
WARN
(
"Invalid hInternet handle
\n
"
);
INTERNET_SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
if
(
lpwhh
->
htype
==
WH_HHTTPREQ
)
{
LPWININETHTTPREQW
lpreq
=
(
LPWININETHTTPREQW
)
lpwhh
;
DWORD
size
;
if
(
!
lpreq
->
lpszCacheFile
)
{
*
lpdwBufferLength
=
0
;
INTERNET_SetLastError
(
ERROR_INTERNET_ITEM_NOT_FOUND
);
}
else
if
(
bIsUnicode
)
{
size
=
(
lstrlenW
(
lpreq
->
lpszCacheFile
)
+
1
)
*
sizeof
(
WCHAR
);
if
(
*
lpdwBufferLength
<
size
)
INTERNET_SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
else
{
memcpy
(
lpBuffer
,
lpreq
->
lpszCacheFile
,
size
);
bSuccess
=
TRUE
;
}
*
lpdwBufferLength
=
size
;
}
else
{
size
=
WideCharToMultiByte
(
CP_ACP
,
0
,
lpreq
->
lpszCacheFile
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
if
(
size
>
*
lpdwBufferLength
)
{
INTERNET_SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
}
else
{
*
lpdwBufferLength
=
WideCharToMultiByte
(
CP_ACP
,
0
,
lpreq
->
lpszCacheFile
,
-
1
,
lpBuffer
,
*
lpdwBufferLength
,
NULL
,
NULL
);
bSuccess
=
TRUE
;
}
}
}
break
;
}
case
INTERNET_OPTION_HTTP_VERSION
:
{
if
(
*
lpdwBufferLength
<
sizeof
(
HTTP_VERSION_INFO
))
...
...
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