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
0ba11e89
Commit
0ba11e89
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 IPropertyStore::GetAt.
parent
11f24690
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
6 deletions
+49
-6
propstore.c
dlls/propsys/propstore.c
+45
-2
propstore.c
dlls/propsys/tests/propstore.c
+4
-4
No files found.
dlls/propsys/propstore.c
View file @
0ba11e89
...
...
@@ -156,8 +156,51 @@ static HRESULT WINAPI PropertyStore_GetCount(IPropertyStoreCache *iface,
static
HRESULT
WINAPI
PropertyStore_GetAt
(
IPropertyStoreCache
*
iface
,
DWORD
iProp
,
PROPERTYKEY
*
pkey
)
{
FIXME
(
"%p,%d,%p: stub
\n
"
,
iface
,
iProp
,
pkey
);
return
E_NOTIMPL
;
PropertyStore
*
This
=
impl_from_IPropertyStoreCache
(
iface
);
propstore_format
*
format
=
NULL
,
*
format_candidate
;
propstore_value
*
value
;
HRESULT
hr
;
TRACE
(
"%p,%d,%p
\n
"
,
iface
,
iProp
,
pkey
);
if
(
!
pkey
)
return
E_POINTER
;
EnterCriticalSection
(
&
This
->
lock
);
LIST_FOR_EACH_ENTRY
(
format_candidate
,
&
This
->
formats
,
propstore_format
,
entry
)
{
if
(
format_candidate
->
count
>
iProp
)
{
format
=
format_candidate
;
pkey
->
fmtid
=
format
->
fmtid
;
break
;
}
iProp
-=
format_candidate
->
count
;
}
if
(
format
)
{
LIST_FOR_EACH_ENTRY
(
value
,
&
format
->
values
,
propstore_value
,
entry
)
{
if
(
iProp
==
0
)
{
pkey
->
pid
=
value
->
pid
;
break
;
}
iProp
--
;
}
hr
=
S_OK
;
}
else
hr
=
E_INVALIDARG
;
LeaveCriticalSection
(
&
This
->
lock
);
return
hr
;
}
static
HRESULT
PropertyStore_LookupValue
(
PropertyStore
*
This
,
REFPROPERTYKEY
key
,
...
...
dlls/propsys/tests/propstore.c
View file @
0ba11e89
...
...
@@ -68,7 +68,7 @@ static void test_inmemorystore(void)
ok
(
hr
==
S_OK
,
"Commit failed, hr=%x
\n
"
,
hr
);
hr
=
IPropertyStoreCache_GetAt
(
propcache
,
0
,
&
pkey
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"GetAt failed, hr=%x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"GetAt failed, hr=%x
\n
"
,
hr
);
pkey
.
fmtid
=
PKEY_WineTest
;
pkey
.
pid
=
4
;
...
...
@@ -97,9 +97,9 @@ static void test_inmemorystore(void)
memset
(
&
pkey
,
0
,
sizeof
(
pkey
));
hr
=
IPropertyStoreCache_GetAt
(
propcache
,
0
,
&
pkey
);
todo_wine
ok
(
hr
==
S_OK
,
"GetAt failed, hr=%x
\n
"
,
hr
);
todo_wine
ok
(
IsEqualGUID
(
&
pkey
.
fmtid
,
&
PKEY_WineTest
),
"got wrong pkey
\n
"
);
todo_wine
ok
(
pkey
.
pid
==
4
,
"got pid of %i, expected 4
\n
"
,
pkey
.
pid
);
ok
(
hr
==
S_OK
,
"GetAt failed, hr=%x
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
pkey
.
fmtid
,
&
PKEY_WineTest
),
"got wrong pkey
\n
"
);
ok
(
pkey
.
pid
==
4
,
"got pid of %i, expected 4
\n
"
,
pkey
.
pid
);
pkey
.
fmtid
=
PKEY_WineTest
;
pkey
.
pid
=
4
;
...
...
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