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
f6efe226
Commit
f6efe226
authored
Mar 30, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 31, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scrrun: Added IsReady property for a drive.
parent
2aad5d7c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
2 deletions
+35
-2
filesystem.c
dlls/scrrun/filesystem.c
+11
-2
filesystem.c
dlls/scrrun/tests/filesystem.c
+24
-0
No files found.
dlls/scrrun/filesystem.c
View file @
f6efe226
...
@@ -788,8 +788,17 @@ static HRESULT WINAPI drive_get_SerialNumber(IDrive *iface, LONG *serial)
...
@@ -788,8 +788,17 @@ static HRESULT WINAPI drive_get_SerialNumber(IDrive *iface, LONG *serial)
static
HRESULT
WINAPI
drive_get_IsReady
(
IDrive
*
iface
,
VARIANT_BOOL
*
ready
)
static
HRESULT
WINAPI
drive_get_IsReady
(
IDrive
*
iface
,
VARIANT_BOOL
*
ready
)
{
{
struct
drive
*
This
=
impl_from_IDrive
(
iface
);
struct
drive
*
This
=
impl_from_IDrive
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
ready
);
ULARGE_INTEGER
freespace
;
return
E_NOTIMPL
;
BOOL
ret
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
ready
);
if
(
!
ready
)
return
E_POINTER
;
ret
=
GetDiskFreeSpaceExW
(
This
->
root
,
&
freespace
,
NULL
,
NULL
);
*
ready
=
ret
?
VARIANT_TRUE
:
VARIANT_FALSE
;
return
S_OK
;
}
}
static
const
IDriveVtbl
drivevtbl
=
{
static
const
IDriveVtbl
drivevtbl
=
{
...
...
dlls/scrrun/tests/filesystem.c
View file @
f6efe226
...
@@ -1233,6 +1233,30 @@ static void test_DriveCollection(void)
...
@@ -1233,6 +1233,30 @@ static void test_DriveCollection(void)
hr
=
IEnumVARIANT_Skip
(
enumvar
,
1
);
hr
=
IEnumVARIANT_Skip
(
enumvar
,
1
);
ok
(
hr
==
S_FALSE
,
"got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"got 0x%08x
\n
"
,
hr
);
/* reset and iterate again */
hr
=
IEnumVARIANT_Reset
(
enumvar
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
while
(
IEnumVARIANT_Next
(
enumvar
,
1
,
&
var
,
&
fetched
)
==
S_OK
)
{
IDrive
*
drive
=
(
IDrive
*
)
V_DISPATCH
(
&
var
);
DriveTypeConst
type
;
hr
=
IDrive_get_DriveType
(
drive
,
&
type
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDrive_get_IsReady
(
drive
,
NULL
);
ok
(
hr
==
E_POINTER
,
"got 0x%08x
\n
"
,
hr
);
if
(
type
==
Fixed
)
{
VARIANT_BOOL
ready
=
VARIANT_FALSE
;
hr
=
IDrive_get_IsReady
(
drive
,
&
ready
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
ready
==
VARIANT_TRUE
,
"got %x
\n
"
,
ready
);
}
VariantClear
(
&
var
);
}
IEnumVARIANT_Release
(
enumvar
);
IEnumVARIANT_Release
(
enumvar
);
IDriveCollection_Release
(
drives
);
IDriveCollection_Release
(
drives
);
}
}
...
...
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