Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
91e95e12
Commit
91e95e12
authored
May 22, 2012
by
Vincent Povirk
Committed by
Alexandre Julliard
May 24, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
propsys: Implement IPropertyStoreCache::SetValueAndState.
parent
f833061e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
10 deletions
+27
-10
propstore.c
dlls/propsys/propstore.c
+19
-2
propstore.c
dlls/propsys/tests/propstore.c
+8
-8
No files found.
dlls/propsys/propstore.c
View file @
91e95e12
...
...
@@ -402,8 +402,25 @@ static HRESULT WINAPI PropertyStore_SetState(IPropertyStoreCache *iface,
static
HRESULT
WINAPI
PropertyStore_SetValueAndState
(
IPropertyStoreCache
*
iface
,
REFPROPERTYKEY
key
,
const
PROPVARIANT
*
ppropvar
,
PSC_STATE
state
)
{
FIXME
(
"%p,%p,%p,%d: stub
\n
"
,
iface
,
key
,
ppropvar
,
state
);
return
E_NOTIMPL
;
PropertyStore
*
This
=
impl_from_IPropertyStoreCache
(
iface
);
propstore_value
*
value
;
HRESULT
hr
;
TRACE
(
"%p,%p,%p,%d
\n
"
,
iface
,
key
,
ppropvar
,
state
);
EnterCriticalSection
(
&
This
->
lock
);
hr
=
PropertyStore_LookupValue
(
This
,
key
,
1
,
&
value
);
if
(
SUCCEEDED
(
hr
))
hr
=
PropVariantCopy
(
&
value
->
propvar
,
ppropvar
);
if
(
SUCCEEDED
(
hr
))
value
->
state
=
state
;
LeaveCriticalSection
(
&
This
->
lock
);
return
hr
;
}
static
const
IPropertyStoreCacheVtbl
PropertyStore_Vtbl
=
{
...
...
dlls/propsys/tests/propstore.c
View file @
91e95e12
...
...
@@ -166,15 +166,15 @@ static void test_inmemorystore(void)
propvar
.
vt
=
VT_I4
;
propvar
.
u
.
lVal
=
12346
;
hr
=
IPropertyStoreCache_SetValueAndState
(
propcache
,
&
pkey
,
&
propvar
,
5
);
todo_wine
ok
(
hr
==
S_OK
,
"SetValueAndState failed, hr=%x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"SetValueAndState failed, hr=%x
\n
"
,
hr
);
memset
(
&
propvar
,
0
,
sizeof
(
propvar
));
state
=
0xdeadbeef
;
hr
=
IPropertyStoreCache_GetValueAndState
(
propcache
,
&
pkey
,
&
propvar
,
&
state
);
ok
(
hr
==
S_OK
,
"GetValueAndState failed, hr=%x
\n
"
,
hr
);
ok
(
propvar
.
vt
==
VT_I4
,
"expected VT_I4, got %d
\n
"
,
propvar
.
vt
);
todo_wine
ok
(
propvar
.
u
.
lVal
==
12346
,
"expected 12346, got %d
\n
"
,
propvar
.
vt
);
todo_wine
ok
(
state
==
5
,
"expected 5, got %d
\n
"
,
state
);
ok
(
propvar
.
u
.
lVal
==
12346
,
"expected 12346, got %d
\n
"
,
propvar
.
vt
);
ok
(
state
==
5
,
"expected 5, got %d
\n
"
,
state
);
/* Set new field with state */
pkey
.
fmtid
=
PKEY_WineTest
;
...
...
@@ -183,15 +183,15 @@ static void test_inmemorystore(void)
propvar
.
vt
=
VT_I4
;
propvar
.
u
.
lVal
=
12347
;
hr
=
IPropertyStoreCache_SetValueAndState
(
propcache
,
&
pkey
,
&
propvar
,
PSC_DIRTY
);
todo_wine
ok
(
hr
==
S_OK
,
"SetValueAndState failed, hr=%x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"SetValueAndState failed, hr=%x
\n
"
,
hr
);
memset
(
&
propvar
,
0
,
sizeof
(
propvar
));
state
=
0xdeadbeef
;
hr
=
IPropertyStoreCache_GetValueAndState
(
propcache
,
&
pkey
,
&
propvar
,
&
state
);
todo_wine
ok
(
hr
==
S_OK
,
"GetValueAndState failed, hr=%x
\n
"
,
hr
);
todo_wine
ok
(
propvar
.
vt
==
VT_I4
,
"expected VT_I4, got %d
\n
"
,
propvar
.
vt
);
todo_wine
ok
(
propvar
.
u
.
lVal
==
12347
,
"expected 12347, got %d
\n
"
,
propvar
.
vt
);
todo_wine
ok
(
state
==
PSC_DIRTY
,
"expected PSC_DIRTY, got %d
\n
"
,
state
);
ok
(
hr
==
S_OK
,
"GetValueAndState failed, hr=%x
\n
"
,
hr
);
ok
(
propvar
.
vt
==
VT_I4
,
"expected VT_I4, got %d
\n
"
,
propvar
.
vt
);
ok
(
propvar
.
u
.
lVal
==
12347
,
"expected 12347, got %d
\n
"
,
propvar
.
vt
);
ok
(
state
==
PSC_DIRTY
,
"expected PSC_DIRTY, got %d
\n
"
,
state
);
IPropertyStoreCache_Release
(
propcache
);
}
...
...
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