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
906f91db
Commit
906f91db
authored
Feb 07, 2019
by
Jactry Zeng
Committed by
Alexandre Julliard
Feb 14, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
propsys: Implement PSCreateMemoryPropertyStore().
Signed-off-by:
Jactry Zeng
<
jzeng@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bb4d919f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
1 deletion
+63
-1
propsys.spec
dlls/propsys/propsys.spec
+1
-1
propsys_main.c
dlls/propsys/propsys_main.c
+7
-0
propstore.c
dlls/propsys/tests/propstore.c
+54
-0
propsys.idl
include/propsys.idl
+1
-0
No files found.
dlls/propsys/propsys.spec
View file @
906f91db
...
...
@@ -65,7 +65,7 @@
@ stub PSCoerceToCanonicalValue
@ stub PSCreateAdapterFromPropertyStore
@ stub PSCreateDelayedMultiplexPropertyStore
@ st
ub PSCreateMemoryPropertyStore
@ st
dcall PSCreateMemoryPropertyStore(ptr ptr)
@ stub PSCreateMultiplexPropertyStore
@ stub PSCreatePropertyChangeArray
@ stub PSCreatePropertyStoreFromObject
...
...
dlls/propsys/propsys_main.c
View file @
906f91db
...
...
@@ -509,3 +509,10 @@ HRESULT WINAPI PSPropertyKeyFromString(LPCWSTR pszString, PROPERTYKEY *pkey)
return
S_OK
;
}
HRESULT
WINAPI
PSCreateMemoryPropertyStore
(
REFIID
riid
,
void
**
ppv
)
{
TRACE
(
"(%s, %p)
\n
"
,
debugstr_guid
(
riid
),
ppv
);
return
PropertyStore_CreateInstance
(
NULL
,
riid
,
ppv
);
}
dlls/propsys/tests/propstore.c
View file @
906f91db
...
...
@@ -35,6 +35,15 @@
DEFINE_GUID
(
PKEY_WineTest
,
0x7b317433
,
0xdfa3
,
0x4c44
,
0xad
,
0x3e
,
0x2f
,
0x80
,
0x4b
,
0x90
,
0xdb
,
0xf4
);
#define EXPECT_REF(obj,ref) _expect_ref((IUnknown *)obj, ref, __LINE__)
static
void
_expect_ref
(
IUnknown
*
obj
,
ULONG
ref
,
int
line
)
{
ULONG
rc
;
IUnknown_AddRef
(
obj
);
rc
=
IUnknown_Release
(
obj
);
ok_
(
__FILE__
,
line
)(
rc
==
ref
,
"expected refcount %d, got %d
\n
"
,
ref
,
rc
);
}
static
void
test_inmemorystore
(
void
)
{
IPropertyStoreCache
*
propcache
;
...
...
@@ -249,12 +258,57 @@ static void test_persistserialized(void)
IPersistSerializedPropStorage_Release
(
serialized
);
}
static
void
test_PSCreateMemoryPropertyStore
(
void
)
{
IPropertyStore
*
propstore
,
*
propstore1
;
IPersistSerializedPropStorage
*
serialized
;
IPropertyStoreCache
*
propstorecache
;
HRESULT
hr
;
/* PSCreateMemoryPropertyStore(&IID_IPropertyStore, NULL); crashes */
hr
=
PSCreateMemoryPropertyStore
(
&
IID_IPropertyStore
,
(
void
**
)
&
propstore
);
ok
(
hr
==
S_OK
,
"PSCreateMemoryPropertyStore failed: 0x%08x.
\n
"
,
hr
);
ok
(
propstore
!=
NULL
,
"got %p.
\n
"
,
propstore
);
EXPECT_REF
(
propstore
,
1
);
hr
=
PSCreateMemoryPropertyStore
(
&
IID_IPersistSerializedPropStorage
,
(
void
**
)
&
serialized
);
todo_wine
ok
(
hr
==
S_OK
,
"PSCreateMemoryPropertyStore failed: 0x%08x.
\n
"
,
hr
);
todo_wine
ok
(
serialized
!=
NULL
,
"got %p.
\n
"
,
serialized
);
EXPECT_REF
(
propstore
,
1
);
if
(
serialized
)
{
EXPECT_REF
(
serialized
,
1
);
IPersistSerializedPropStorage_Release
(
serialized
);
}
hr
=
PSCreateMemoryPropertyStore
(
&
IID_IPropertyStoreCache
,
(
void
**
)
&
propstorecache
);
ok
(
hr
==
S_OK
,
"PSCreateMemoryPropertyStore failed: 0x%08x.
\n
"
,
hr
);
ok
(
propstorecache
!=
NULL
,
"got %p.
\n
"
,
propstore
);
ok
(
propstorecache
!=
(
IPropertyStoreCache
*
)
propstore
,
"pointer are equal: %p, %p.
\n
"
,
propstorecache
,
propstore
);
EXPECT_REF
(
propstore
,
1
);
EXPECT_REF
(
propstorecache
,
1
);
hr
=
PSCreateMemoryPropertyStore
(
&
IID_IPropertyStore
,
(
void
**
)
&
propstore1
);
ok
(
hr
==
S_OK
,
"PSCreateMemoryPropertyStore failed: 0x%08x.
\n
"
,
hr
);
ok
(
propstore1
!=
NULL
,
"got %p.
\n
"
,
propstore
);
ok
(
propstore1
!=
propstore
,
"pointer are equal: %p, %p.
\n
"
,
propstore1
,
propstore
);
EXPECT_REF
(
propstore
,
1
);
EXPECT_REF
(
propstore1
,
1
);
EXPECT_REF
(
propstorecache
,
1
);
IPropertyStore_Release
(
propstore1
);
IPropertyStore_Release
(
propstore
);
IPropertyStoreCache_Release
(
propstorecache
);
}
START_TEST
(
propstore
)
{
CoInitialize
(
NULL
);
test_inmemorystore
();
test_persistserialized
();
test_PSCreateMemoryPropertyStore
();
CoUninitialize
();
}
include/propsys.idl
View file @
906f91db
...
...
@@ -799,6 +799,7 @@ cpp_quote("#define PKEY_PIDSTR_MAX 10")
cpp_quote("#define GUIDSTRING_MAX 39")
cpp_quote("#define PKEYSTR_MAX (GUIDSTRING_MAX + 1 + PKEY_PIDSTR_MAX)")
cpp_quote("HRESULT WINAPI PSCreateMemoryPropertyStore(REFIID,void **);")
cpp_quote("HRESULT WINAPI PSStringFromPropertyKey(REFPROPERTYKEY,LPWSTR,UINT);")
cpp_quote("HRESULT WINAPI PSPropertyKeyFromString(LPCWSTR,PROPERTYKEY*);")
cpp_quote("HRESULT WINAPI PSGetPropertyDescription(REFPROPERTYKEY,REFIID,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