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
61a3bd33
Commit
61a3bd33
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: Implement AvailableSpace property for a drive.
parent
2377fc09
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
3 deletions
+22
-3
filesystem.c
dlls/scrrun/filesystem.c
+13
-3
filesystem.c
dlls/scrrun/tests/filesystem.c
+9
-0
No files found.
dlls/scrrun/filesystem.c
View file @
61a3bd33
...
...
@@ -736,11 +736,21 @@ static HRESULT WINAPI drive_get_RootFolder(IDrive *iface, IFolder **folder)
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
drive_get_AvailableSpace
(
IDrive
*
iface
,
VARIANT
*
avail
)
static
HRESULT
WINAPI
drive_get_AvailableSpace
(
IDrive
*
iface
,
VARIANT
*
v
)
{
struct
drive
*
This
=
impl_from_IDrive
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
avail
);
return
E_NOTIMPL
;
ULARGE_INTEGER
avail
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
v
);
if
(
!
v
)
return
E_POINTER
;
if
(
!
GetDiskFreeSpaceExW
(
This
->
root
,
&
avail
,
NULL
,
NULL
))
return
E_FAIL
;
V_VT
(
v
)
=
VT_R8
;
return
VarR8FromUI8
(
avail
.
QuadPart
,
&
V_R8
(
v
));
}
static
HRESULT
WINAPI
drive_get_FreeSpace
(
IDrive
*
iface
,
VARIANT
*
v
)
...
...
dlls/scrrun/tests/filesystem.c
View file @
61a3bd33
...
...
@@ -1250,6 +1250,9 @@ static void test_DriveCollection(void)
hr
=
IDrive_get_TotalSize
(
drive
,
NULL
);
ok
(
hr
==
E_POINTER
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDrive_get_AvailableSpace
(
drive
,
NULL
);
ok
(
hr
==
E_POINTER
,
"got 0x%08x
\n
"
,
hr
);
if
(
type
==
Fixed
)
{
VARIANT_BOOL
ready
=
VARIANT_FALSE
;
VARIANT
size
;
...
...
@@ -1263,6 +1266,12 @@ static void test_DriveCollection(void)
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
V_VT
(
&
size
)
==
VT_R8
,
"got %d
\n
"
,
V_VT
(
&
size
));
ok
(
V_R8
(
&
size
)
>
0
,
"got %f
\n
"
,
V_R8
(
&
size
));
V_VT
(
&
size
)
=
VT_EMPTY
;
hr
=
IDrive_get_AvailableSpace
(
drive
,
&
size
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
V_VT
(
&
size
)
==
VT_R8
,
"got %d
\n
"
,
V_VT
(
&
size
));
ok
(
V_R8
(
&
size
)
>
0
,
"got %f
\n
"
,
V_R8
(
&
size
));
}
VariantClear
(
&
var
);
}
...
...
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