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
b4c3a041
Commit
b4c3a041
authored
May 24, 2010
by
Juan Lang
Committed by
Alexandre Julliard
May 25, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32/tests: Test creating an IPropertySetStorage with an unknown format id.
parent
b88b007d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
0 deletions
+56
-0
stg_prop.c
dlls/ole32/tests/stg_prop.c
+56
-0
No files found.
dlls/ole32/tests/stg_prop.c
View file @
b4c3a041
...
...
@@ -59,6 +59,8 @@ static void testProps(void)
PROPVARIANT
var
;
CLIPDATA
clipdata
;
unsigned
char
clipcontent
[]
=
"foobar"
;
GUID
anyOldGuid
=
{
0x12345678
,
0xdead
,
0xbeef
,
{
0x00
,
0x01
,
0x02
,
0x03
,
0x04
,
0x05
,
0x06
,
0x07
}
};
if
(
!
GetTempFileNameW
(
szDot
,
szPrefix
,
0
,
filename
))
return
;
...
...
@@ -290,6 +292,60 @@ static void testProps(void)
IStorage_Release
(
storage
);
DeleteFileW
(
filename
);
/* Test creating a property set storage with a random GUID */
hr
=
StgCreateDocfile
(
filename
,
STGM_READWRITE
|
STGM_SHARE_EXCLUSIVE
|
STGM_CREATE
,
0
,
&
storage
);
ok
(
hr
==
S_OK
,
"StgCreateDocfile failed: 0x%08x
\n
"
,
hr
);
if
(
!
pStgCreatePropSetStg
)
{
IStorage_Release
(
storage
);
DeleteFileW
(
filename
);
return
;
}
hr
=
pStgCreatePropSetStg
(
storage
,
0
,
&
propSetStorage
);
ok
(
hr
==
S_OK
,
"StgCreatePropSetStg failed: 0x%08x
\n
"
,
hr
);
hr
=
IPropertySetStorage_Create
(
propSetStorage
,
&
anyOldGuid
,
NULL
,
PROPSETFLAG_ANSI
,
STGM_READWRITE
|
STGM_CREATE
|
STGM_SHARE_EXCLUSIVE
,
&
propertyStorage
);
ok
(
hr
==
S_OK
,
"IPropertySetStorage_Create failed: 0x%08x
\n
"
,
hr
);
spec
.
ulKind
=
PRSPEC_PROPID
;
U
(
spec
).
propid
=
PID_FIRST_USABLE
;
U
(
var
).
lVal
=
1
;
hr
=
IPropertyStorage_WriteMultiple
(
propertyStorage
,
1
,
&
spec
,
&
var
,
0
);
ok
(
hr
==
S_OK
,
"WriteMultiple failed: 0x%08x
\n
"
,
hr
);
IPropertyStorage_Release
(
propertyStorage
);
IPropertySetStorage_Release
(
propSetStorage
);
IStorage_Release
(
storage
);
/* now open it again */
hr
=
StgOpenStorage
(
filename
,
NULL
,
STGM_READWRITE
|
STGM_SHARE_EXCLUSIVE
,
NULL
,
0
,
&
storage
);
ok
(
hr
==
S_OK
,
"StgOpenStorage failed: 0x%08x
\n
"
,
hr
);
hr
=
pStgCreatePropSetStg
(
storage
,
0
,
&
propSetStorage
);
ok
(
hr
==
S_OK
,
"StgCreatePropSetStg failed: 0x%08x
\n
"
,
hr
);
hr
=
IPropertySetStorage_Open
(
propSetStorage
,
&
anyOldGuid
,
STGM_READWRITE
|
STGM_SHARE_EXCLUSIVE
,
&
propertyStorage
);
todo_wine
ok
(
hr
==
S_OK
,
"IPropertySetStorage_Open failed: 0x%08x
\n
"
,
hr
);
spec
.
ulKind
=
PRSPEC_PROPID
;
U
(
spec
).
propid
=
PID_FIRST_USABLE
;
hr
=
IPropertyStorage_ReadMultiple
(
propertyStorage
,
1
,
&
spec
,
&
var
);
ok
(
hr
==
S_FALSE
,
"ReadMultiple failed: 0x%08x
\n
"
,
hr
);
IPropertyStorage_Release
(
propertyStorage
);
IPropertySetStorage_Release
(
propSetStorage
);
IStorage_Release
(
storage
);
DeleteFileW
(
filename
);
}
static
void
testCodepage
(
void
)
...
...
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