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
77a8ac36
Commit
77a8ac36
authored
Dec 03, 2018
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Forward IStream helpers to shcore.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cd77c562
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
114 deletions
+6
-114
istream.c
dlls/shlwapi/istream.c
+2
-110
shlwapi.spec
dlls/shlwapi/shlwapi.spec
+4
-4
No files found.
dlls/shlwapi/istream.c
View file @
77a8ac36
...
...
@@ -35,35 +35,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
shell
);
/*************************************************************************
* @ [SHLWAPI.184]
*
* Call IStream_Read() on a stream.
*
* PARAMS
* lpStream [I] IStream object
* lpvDest [O] Destination for data read
* ulSize [I] Size of data to read
*
* RETURNS
* Success: S_OK. ulSize bytes have been read from the stream into lpvDest.
* Failure: An HRESULT error code, or E_FAIL if the read succeeded but the
* number of bytes read does not match.
*/
HRESULT
WINAPI
SHIStream_Read
(
IStream
*
lpStream
,
LPVOID
lpvDest
,
ULONG
ulSize
)
{
ULONG
ulRead
;
HRESULT
hRet
;
TRACE
(
"(%p,%p,%u)
\n
"
,
lpStream
,
lpvDest
,
ulSize
);
hRet
=
IStream_Read
(
lpStream
,
lpvDest
,
ulSize
,
&
ulRead
);
if
(
SUCCEEDED
(
hRet
)
&&
ulRead
!=
ulSize
)
hRet
=
E_FAIL
;
return
hRet
;
}
/*************************************************************************
* @ [SHLWAPI.166]
*
* Determine if a stream has 0 length.
...
...
@@ -91,10 +62,10 @@ BOOL WINAPI SHIsEmptyStream(IStream *lpStream)
}
else
{
DWORD
d
wDummy
;
DWORD
d
ummy
,
read_len
;
/* Try to read from the stream */
if
(
SUCCEEDED
(
SHIStream_Read
(
lpStream
,
&
dwDummy
,
sizeof
(
dwDummy
))
))
if
(
SUCCEEDED
(
IStream_Read
(
lpStream
,
&
dummy
,
sizeof
(
dummy
),
&
read_len
))
&&
read_len
==
sizeof
(
dummy
))
{
LARGE_INTEGER
zero
;
zero
.
QuadPart
=
0
;
...
...
@@ -105,82 +76,3 @@ BOOL WINAPI SHIsEmptyStream(IStream *lpStream)
}
return
bRet
;
}
/*************************************************************************
* @ [SHLWAPI.212]
*
* Call IStream_Write() on a stream.
*
* PARAMS
* lpStream [I] IStream object
* lpvSrc [I] Source for data to write
* ulSize [I] Size of data
*
* RETURNS
* Success: S_OK. ulSize bytes have been written to the stream from lpvSrc.
* Failure: An HRESULT error code, or E_FAIL if the write succeeded but the
* number of bytes written does not match.
*/
HRESULT
WINAPI
SHIStream_Write
(
IStream
*
lpStream
,
LPCVOID
lpvSrc
,
ULONG
ulSize
)
{
ULONG
ulWritten
;
HRESULT
hRet
;
TRACE
(
"(%p,%p,%d)
\n
"
,
lpStream
,
lpvSrc
,
ulSize
);
hRet
=
IStream_Write
(
lpStream
,
lpvSrc
,
ulSize
,
&
ulWritten
);
if
(
SUCCEEDED
(
hRet
)
&&
ulWritten
!=
ulSize
)
hRet
=
E_FAIL
;
return
hRet
;
}
/*************************************************************************
* @ [SHLWAPI.213]
*
* Seek to the start of a stream.
*
* PARAMS
* lpStream [I] IStream object
*
* RETURNS
* Success: S_OK. The current position within the stream is updated
* Failure: An HRESULT error code.
*/
HRESULT
WINAPI
IStream_Reset
(
IStream
*
lpStream
)
{
LARGE_INTEGER
zero
;
TRACE
(
"(%p)
\n
"
,
lpStream
);
zero
.
QuadPart
=
0
;
return
IStream_Seek
(
lpStream
,
zero
,
0
,
NULL
);
}
/*************************************************************************
* @ [SHLWAPI.214]
*
* Get the size of a stream.
*
* PARAMS
* lpStream [I] IStream object
* lpulSize [O] Destination for size
*
* RETURNS
* Success: S_OK. lpulSize contains the size of the stream.
* Failure: An HRESULT error code.
*/
HRESULT
WINAPI
IStream_Size
(
IStream
*
lpStream
,
ULARGE_INTEGER
*
lpulSize
)
{
STATSTG
statstg
;
HRESULT
hRet
;
TRACE
(
"(%p,%p)
\n
"
,
lpStream
,
lpulSize
);
memset
(
&
statstg
,
0
,
sizeof
(
statstg
));
hRet
=
IStream_Stat
(
lpStream
,
&
statstg
,
1
);
if
(
SUCCEEDED
(
hRet
)
&&
lpulSize
)
*
lpulSize
=
statstg
.
cbSize
;
return
hRet
;
}
dlls/shlwapi/shlwapi.spec
View file @
77a8ac36
...
...
@@ -181,7 +181,7 @@
181 stdcall -noname SHEnableMenuItem(long long long)
182 stdcall -noname SHCheckMenuItem(long long long)
183 stdcall -noname SHRegisterClassA(ptr)
184 stdcall -ordinal IStream_Read(ptr ptr long)
SH
IStream_Read
184 stdcall -ordinal IStream_Read(ptr ptr long)
shcore.
IStream_Read
185 stdcall -ordinal SHMessageBoxCheckA(ptr str str long long str)
186 stdcall -noname SHSimulateDrop(ptr ptr long ptr ptr)
187 stdcall -noname SHLoadFromPropertyBag(ptr ptr)
...
...
@@ -209,9 +209,9 @@
209 stdcall -noname FDSA_Destroy(ptr)
210 stdcall -noname FDSA_InsertItem(ptr long ptr)
211 stdcall -noname FDSA_DeleteItem(ptr long)
212 stdcall -ordinal IStream_Write(ptr ptr long)
SH
IStream_Write
213 stdcall -ordinal IStream_Reset(ptr)
214 stdcall -ordinal IStream_Size(ptr ptr)
212 stdcall -ordinal IStream_Write(ptr ptr long)
shcore.
IStream_Write
213 stdcall -ordinal IStream_Reset(ptr)
shcore.IStream_Reset
214 stdcall -ordinal IStream_Size(ptr ptr)
shcore.IStream_Size
215 stdcall -ordinal SHAnsiToUnicode(str ptr long)
216 stdcall -noname SHAnsiToUnicodeCP(long str ptr long)
217 stdcall -ordinal SHUnicodeToAnsi(wstr ptr ptr)
...
...
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