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
8d3ef2bb
Commit
8d3ef2bb
authored
Feb 22, 2023
by
Mohamad Al-Jaf
Committed by
Alexandre Julliard
Sep 25, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windows.applicationmodel: Add IStorageItem stub interface.
Needed for Minecraft Windows 10.
parent
4108dfe2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
99 additions
and
0 deletions
+99
-0
package.c
dlls/windows.applicationmodel/package.c
+93
-0
application.c
dlls/windows.applicationmodel/tests/application.c
+6
-0
No files found.
dlls/windows.applicationmodel/package.c
View file @
8d3ef2bb
...
...
@@ -118,6 +118,7 @@ static const struct IActivationFactoryVtbl factory_vtbl =
struct
storage_folder
{
IStorageFolder
IStorageFolder_iface
;
IStorageItem
IStorageItem_iface
;
LONG
ref
;
};
...
...
@@ -141,6 +142,13 @@ static HRESULT WINAPI storage_folder_QueryInterface( IStorageFolder *iface, REFI
return
S_OK
;
}
if
(
IsEqualGUID
(
iid
,
&
IID_IStorageItem
))
{
*
out
=
&
impl
->
IStorageItem_iface
;
IInspectable_AddRef
(
*
out
);
return
S_OK
;
}
FIXME
(
"%s not implemented, returning E_NOINTERFACE.
\n
"
,
debugstr_guid
(
iid
)
);
*
out
=
NULL
;
return
E_NOINTERFACE
;
...
...
@@ -272,6 +280,90 @@ static const struct IStorageFolderVtbl storage_folder_vtbl =
storage_folder_GetItemsAsyncOverloadDefaultStartAndCount
,
};
DEFINE_IINSPECTABLE
(
storage_item
,
IStorageItem
,
struct
storage_folder
,
IStorageFolder_iface
)
static
HRESULT
WINAPI
storage_item_RenameAsyncOverloadDefaultOptions
(
IStorageItem
*
iface
,
HSTRING
name
,
IAsyncAction
**
operation
)
{
FIXME
(
"iface %p, name %s, operation %p stub!
\n
"
,
iface
,
debugstr_hstring
(
name
),
operation
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
storage_item_RenameAsync
(
IStorageItem
*
iface
,
HSTRING
name
,
NameCollisionOption
option
,
IAsyncAction
**
operation
)
{
FIXME
(
"iface %p, name %s, option %d, operation %p stub!
\n
"
,
iface
,
debugstr_hstring
(
name
),
option
,
operation
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
storage_item_DeleteAsyncOverloadDefaultOptions
(
IStorageItem
*
iface
,
IAsyncAction
**
operation
)
{
FIXME
(
"iface %p, operation %p stub!
\n
"
,
iface
,
operation
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
storage_item_DeleteAsync
(
IStorageItem
*
iface
,
StorageDeleteOption
option
,
IAsyncAction
**
operation
)
{
FIXME
(
"iface %p, option %d, operation %p stub!
\n
"
,
iface
,
option
,
operation
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
storage_item_GetBasicPropertiesAsync
(
IStorageItem
*
iface
,
IAsyncOperation_BasicProperties
**
operation
)
{
FIXME
(
"iface %p, operation %p stub!
\n
"
,
iface
,
operation
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
storage_item_get_Name
(
IStorageItem
*
iface
,
HSTRING
*
value
)
{
FIXME
(
"iface %p, value %p stub!
\n
"
,
iface
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
storage_item_get_Path
(
IStorageItem
*
iface
,
HSTRING
*
value
)
{
FIXME
(
"iface %p, value %p stub!
\n
"
,
iface
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
storage_item_get_Attributes
(
IStorageItem
*
iface
,
FileAttributes
*
value
)
{
FIXME
(
"iface %p, value %p stub!
\n
"
,
iface
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
storage_item_get_DateCreated
(
IStorageItem
*
iface
,
DateTime
*
value
)
{
FIXME
(
"iface %p, value %p stub!
\n
"
,
iface
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
storage_item_IsOfType
(
IStorageItem
*
iface
,
StorageItemTypes
type
,
boolean
*
value
)
{
FIXME
(
"iface %p, type %d, value %p stub!
\n
"
,
iface
,
type
,
value
);
return
E_NOTIMPL
;
}
static
const
struct
IStorageItemVtbl
storage_item_vtbl
=
{
storage_item_QueryInterface
,
storage_item_AddRef
,
storage_item_Release
,
/* IInspectable methods */
storage_item_GetIids
,
storage_item_GetRuntimeClassName
,
storage_item_GetTrustLevel
,
/* IStorageItem methods */
storage_item_RenameAsyncOverloadDefaultOptions
,
storage_item_RenameAsync
,
storage_item_DeleteAsyncOverloadDefaultOptions
,
storage_item_DeleteAsync
,
storage_item_GetBasicPropertiesAsync
,
storage_item_get_Name
,
storage_item_get_Path
,
storage_item_get_Attributes
,
storage_item_get_DateCreated
,
storage_item_IsOfType
,
};
struct
package
{
IPackage
IPackage_iface
;
...
...
@@ -357,6 +449,7 @@ static HRESULT WINAPI package_get_InstalledLocation( IPackage *iface, IStorageFo
if
(
!
(
impl
=
calloc
(
1
,
sizeof
(
*
impl
)
)))
return
E_OUTOFMEMORY
;
impl
->
IStorageFolder_iface
.
lpVtbl
=
&
storage_folder_vtbl
;
impl
->
IStorageItem_iface
.
lpVtbl
=
&
storage_item_vtbl
;
impl
->
ref
=
1
;
*
value
=
&
impl
->
IStorageFolder_iface
;
...
...
dlls/windows.applicationmodel/tests/application.c
View file @
8d3ef2bb
...
...
@@ -60,6 +60,7 @@ static void test_PackageStatics(void)
IPackageStatics
*
package_statics
;
IStorageFolder
*
storage_folder
;
IActivationFactory
*
factory
;
IStorageItem
*
storage_item
;
IPackage
*
package
;
HSTRING
str
;
HRESULT
hr
;
...
...
@@ -103,6 +104,11 @@ static void test_PackageStatics(void)
check_interface
(
storage_folder
,
&
IID_IInspectable
);
check_interface
(
storage_folder
,
&
IID_IStorageFolder
);
hr
=
IStorageFolder_QueryInterface
(
storage_folder
,
&
IID_IStorageItem
,
(
void
**
)
&
storage_item
);
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
ref
=
IStorageItem_Release
(
storage_item
);
ok
(
ref
==
1
,
"got ref %ld.
\n
"
,
ref
);
ref
=
IStorageFolder_Release
(
storage_folder
);
ok
(
!
ref
,
"got ref %ld.
\n
"
,
ref
);
ref
=
IPackage_Release
(
package
);
...
...
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