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
f36a84d7
Commit
f36a84d7
authored
Aug 05, 2023
by
Mohamad Al-Jaf
Committed by
Alexandre Julliard
Oct 02, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windows.storage.applicationdata: Add IApplicationDataStatics stub interface.
parent
2f3aa0e2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
0 deletions
+74
-0
applicationdata.c
dlls/windows.storage.applicationdata/applicationdata.c
+30
-0
private.h
dlls/windows.storage.applicationdata/private.h
+38
-0
data.c
dlls/windows.storage.applicationdata/tests/data.c
+6
-0
No files found.
dlls/windows.storage.applicationdata/applicationdata.c
View file @
f36a84d7
...
...
@@ -25,6 +25,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(data);
struct
application_data_statics
{
IActivationFactory
IActivationFactory_iface
;
IApplicationDataStatics
IApplicationDataStatics_iface
;
LONG
ref
;
};
...
...
@@ -49,6 +50,13 @@ static HRESULT WINAPI factory_QueryInterface( IActivationFactory *iface, REFIID
return
S_OK
;
}
if
(
IsEqualGUID
(
iid
,
&
IID_IApplicationDataStatics
))
{
*
out
=
&
impl
->
IApplicationDataStatics_iface
;
IInspectable_AddRef
(
*
out
);
return
S_OK
;
}
FIXME
(
"%s not implemented, returning E_NOINTERFACE.
\n
"
,
debugstr_guid
(
iid
)
);
*
out
=
NULL
;
return
E_NOINTERFACE
;
...
...
@@ -107,9 +115,31 @@ static const struct IActivationFactoryVtbl factory_vtbl =
factory_ActivateInstance
,
};
DEFINE_IINSPECTABLE
(
application_data_statics
,
IApplicationDataStatics
,
struct
application_data_statics
,
IActivationFactory_iface
)
static
HRESULT
WINAPI
application_data_statics_get_Current
(
IApplicationDataStatics
*
iface
,
IApplicationData
**
value
)
{
FIXME
(
"iface %p, value %p stub!
\n
"
,
iface
,
value
);
return
E_NOTIMPL
;
}
static
const
struct
IApplicationDataStaticsVtbl
application_data_statics_vtbl
=
{
application_data_statics_QueryInterface
,
application_data_statics_AddRef
,
application_data_statics_Release
,
/* IInspectable methods */
application_data_statics_GetIids
,
application_data_statics_GetRuntimeClassName
,
application_data_statics_GetTrustLevel
,
/* IApplicationDataStatics methods */
application_data_statics_get_Current
,
};
static
struct
application_data_statics
application_data_statics
=
{
{
&
factory_vtbl
},
{
&
application_data_statics_vtbl
},
1
,
};
...
...
dlls/windows.storage.applicationdata/private.h
View file @
f36a84d7
...
...
@@ -37,4 +37,42 @@
extern
IActivationFactory
*
application_data_factory
;
#define DEFINE_IINSPECTABLE_( pfx, iface_type, impl_type, impl_from, iface_mem, expr ) \
static inline impl_type *impl_from( iface_type *iface ) \
{ \
return CONTAINING_RECORD( iface, impl_type, iface_mem ); \
} \
static HRESULT WINAPI pfx##_QueryInterface( iface_type *iface, REFIID iid, void **out ) \
{ \
impl_type *impl = impl_from( iface ); \
return IInspectable_QueryInterface( (IInspectable *)(expr), iid, out ); \
} \
static ULONG WINAPI pfx##_AddRef( iface_type *iface ) \
{ \
impl_type *impl = impl_from( iface ); \
return IInspectable_AddRef( (IInspectable *)(expr) ); \
} \
static ULONG WINAPI pfx##_Release( iface_type *iface ) \
{ \
impl_type *impl = impl_from( iface ); \
return IInspectable_Release( (IInspectable *)(expr) ); \
} \
static HRESULT WINAPI pfx##_GetIids( iface_type *iface, ULONG *iid_count, IID **iids ) \
{ \
impl_type *impl = impl_from( iface ); \
return IInspectable_GetIids( (IInspectable *)(expr), iid_count, iids ); \
} \
static HRESULT WINAPI pfx##_GetRuntimeClassName( iface_type *iface, HSTRING *class_name ) \
{ \
impl_type *impl = impl_from( iface ); \
return IInspectable_GetRuntimeClassName( (IInspectable *)(expr), class_name ); \
} \
static HRESULT WINAPI pfx##_GetTrustLevel( iface_type *iface, TrustLevel *trust_level ) \
{ \
impl_type *impl = impl_from( iface ); \
return IInspectable_GetTrustLevel( (IInspectable *)(expr), trust_level ); \
}
#define DEFINE_IINSPECTABLE( pfx, iface_type, impl_type, base_iface ) \
DEFINE_IINSPECTABLE_( pfx, iface_type, impl_type, impl_from_##iface_type, iface_type##_iface, &impl->base_iface )
#endif
dlls/windows.storage.applicationdata/tests/data.c
View file @
f36a84d7
...
...
@@ -48,6 +48,7 @@ static void check_interface_( unsigned int line, void *obj, const IID *iid )
static
void
test_ApplicationDataStatics
(
void
)
{
static
const
WCHAR
*
application_data_statics_name
=
L"Windows.Storage.ApplicationData"
;
IApplicationDataStatics
*
application_data_statics
;
IActivationFactory
*
factory
;
HSTRING
str
;
HRESULT
hr
;
...
...
@@ -69,6 +70,11 @@ static void test_ApplicationDataStatics(void)
check_interface
(
factory
,
&
IID_IInspectable
);
check_interface
(
factory
,
&
IID_IAgileObject
);
hr
=
IActivationFactory_QueryInterface
(
factory
,
&
IID_IApplicationDataStatics
,
(
void
**
)
&
application_data_statics
);
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
ref
=
IApplicationDataStatics_Release
(
application_data_statics
);
ok
(
ref
==
2
,
"got ref %ld.
\n
"
,
ref
);
ref
=
IActivationFactory_Release
(
factory
);
ok
(
ref
==
1
,
"got ref %ld.
\n
"
,
ref
);
}
...
...
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