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
c3748c7d
Commit
c3748c7d
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::GetValueAndState.
parent
a28183f3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
7 deletions
+30
-7
propstore.c
dlls/propsys/propstore.c
+25
-2
propstore.c
dlls/propsys/tests/propstore.c
+5
-5
No files found.
dlls/propsys/propstore.c
View file @
c3748c7d
...
...
@@ -351,8 +351,31 @@ static HRESULT WINAPI PropertyStore_GetState(IPropertyStoreCache *iface,
static
HRESULT
WINAPI
PropertyStore_GetValueAndState
(
IPropertyStoreCache
*
iface
,
REFPROPERTYKEY
key
,
PROPVARIANT
*
ppropvar
,
PSC_STATE
*
pstate
)
{
FIXME
(
"%p,%p,%p,%p: stub
\n
"
,
iface
,
key
,
ppropvar
,
pstate
);
return
E_NOTIMPL
;
PropertyStore
*
This
=
impl_from_IPropertyStoreCache
(
iface
);
propstore_value
*
value
;
HRESULT
hr
;
TRACE
(
"%p,%p,%p,%p
\n
"
,
iface
,
key
,
ppropvar
,
pstate
);
EnterCriticalSection
(
&
This
->
lock
);
hr
=
PropertyStore_LookupValue
(
This
,
key
,
0
,
&
value
);
if
(
SUCCEEDED
(
hr
))
hr
=
PropVariantCopy
(
ppropvar
,
&
value
->
propvar
);
if
(
SUCCEEDED
(
hr
))
*
pstate
=
value
->
state
;
LeaveCriticalSection
(
&
This
->
lock
);
if
(
FAILED
(
hr
))
{
PropVariantInit
(
ppropvar
);
*
pstate
=
PSC_NORMAL
;
}
return
hr
;
}
static
HRESULT
WINAPI
PropertyStore_SetState
(
IPropertyStoreCache
*
iface
,
...
...
dlls/propsys/tests/propstore.c
View file @
c3748c7d
...
...
@@ -138,9 +138,9 @@ static void test_inmemorystore(void)
propvar
.
vt
=
VT_I2
;
state
=
0xdeadbeef
;
hr
=
IPropertyStoreCache_GetValueAndState
(
propcache
,
&
pkey
,
&
propvar
,
&
state
);
todo_wine
ok
(
hr
==
TYPE_E_ELEMENTNOTFOUND
,
"GetValueAndState failed, hr=%x
\n
"
,
hr
);
todo_wine
ok
(
propvar
.
vt
==
VT_EMPTY
,
"expected VT_EMPTY, got %d
\n
"
,
propvar
.
vt
);
todo_wine
ok
(
state
==
PSC_NORMAL
,
"expected PSC_NORMAL, got %d
\n
"
,
state
);
ok
(
hr
==
TYPE_E_ELEMENTNOTFOUND
,
"GetValueAndState failed, hr=%x
\n
"
,
hr
);
ok
(
propvar
.
vt
==
VT_EMPTY
,
"expected VT_EMPTY, got %d
\n
"
,
propvar
.
vt
);
ok
(
state
==
PSC_NORMAL
,
"expected PSC_NORMAL, got %d
\n
"
,
state
);
/* Set state on an unset field */
hr
=
IPropertyStoreCache_SetState
(
propcache
,
&
pkey
,
PSC_NORMAL
);
...
...
@@ -171,8 +171,8 @@ static void test_inmemorystore(void)
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
);
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
);
...
...
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