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
2cd2628c
Commit
2cd2628c
authored
Apr 15, 2012
by
Bruno Jesus
Committed by
Alexandre Julliard
Apr 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Make sure StgIsStorageILockBytes tests real data.
parent
30d18c11
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
storage32.c
dlls/ole32/storage32.c
+4
-3
storage32.c
dlls/ole32/tests/storage32.c
+6
-0
No files found.
dlls/ole32/storage32.c
View file @
2cd2628c
...
...
@@ -7846,15 +7846,16 @@ HRESULT WINAPI StgSetTimes(OLECHAR const *str, FILETIME const *pctime,
*/
HRESULT
WINAPI
StgIsStorageILockBytes
(
ILockBytes
*
plkbyt
)
{
BYTE
sig
[
8
];
BYTE
sig
[
sizeof
(
STORAGE_magic
)
];
ULARGE_INTEGER
offset
;
ULONG
read
=
0
;
offset
.
u
.
HighPart
=
0
;
offset
.
u
.
LowPart
=
0
;
ILockBytes_ReadAt
(
plkbyt
,
offset
,
sig
,
sizeof
(
sig
),
NULL
);
ILockBytes_ReadAt
(
plkbyt
,
offset
,
sig
,
sizeof
(
sig
),
&
read
);
if
(
memcmp
(
sig
,
STORAGE_magic
,
sizeof
(
STORAGE_magic
))
==
0
)
if
(
read
==
sizeof
(
sig
)
&&
memcmp
(
sig
,
STORAGE_magic
,
sizeof
(
sig
))
==
0
)
return
S_OK
;
return
S_FALSE
;
...
...
dlls/ole32/tests/storage32.c
View file @
2cd2628c
...
...
@@ -66,6 +66,9 @@ static void test_hglobal_storage_stat(void)
r
=
CreateILockBytesOnHGlobal
(
NULL
,
TRUE
,
&
ilb
);
ok
(
r
==
S_OK
,
"CreateILockBytesOnHGlobal failed
\n
"
);
r
=
StgIsStorageILockBytes
(
ilb
);
ok
(
r
==
S_FALSE
,
"StgIsStorageILockBytes should have failed
\n
"
);
mode
=
STGM_CREATE
|
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
;
/*0x1012*/
r
=
StgCreateDocfileOnILockBytes
(
ilb
,
mode
,
0
,
&
stg
);
ok
(
r
==
S_OK
,
"StgCreateDocfileOnILockBytes failed
\n
"
);
...
...
@@ -73,6 +76,9 @@ static void test_hglobal_storage_stat(void)
r
=
WriteClassStg
(
stg
,
&
test_stg_cls
);
ok
(
r
==
S_OK
,
"WriteClassStg failed
\n
"
);
r
=
StgIsStorageILockBytes
(
ilb
);
ok
(
r
==
S_OK
,
"StgIsStorageILockBytes failed
\n
"
);
memset
(
&
stat
,
0
,
sizeof
stat
);
r
=
IStorage_Stat
(
stg
,
&
stat
,
0
);
...
...
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