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
2377fc09
Commit
2377fc09
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 TotalSize property for a drive.
parent
f6efe226
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
2 deletions
+22
-2
filesystem.c
dlls/scrrun/filesystem.c
+12
-2
filesystem.c
dlls/scrrun/tests/filesystem.c
+10
-0
No files found.
dlls/scrrun/filesystem.c
View file @
2377fc09
...
@@ -753,8 +753,18 @@ static HRESULT WINAPI drive_get_FreeSpace(IDrive *iface, VARIANT *v)
...
@@ -753,8 +753,18 @@ static HRESULT WINAPI drive_get_FreeSpace(IDrive *iface, VARIANT *v)
static
HRESULT
WINAPI
drive_get_TotalSize
(
IDrive
*
iface
,
VARIANT
*
v
)
static
HRESULT
WINAPI
drive_get_TotalSize
(
IDrive
*
iface
,
VARIANT
*
v
)
{
{
struct
drive
*
This
=
impl_from_IDrive
(
iface
);
struct
drive
*
This
=
impl_from_IDrive
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
v
);
ULARGE_INTEGER
total
;
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
v
);
if
(
!
v
)
return
E_POINTER
;
if
(
!
GetDiskFreeSpaceExW
(
This
->
root
,
NULL
,
&
total
,
NULL
))
return
E_FAIL
;
V_VT
(
v
)
=
VT_R8
;
return
VarR8FromUI8
(
total
.
QuadPart
,
&
V_R8
(
v
));
}
}
static
HRESULT
WINAPI
drive_get_VolumeName
(
IDrive
*
iface
,
BSTR
*
name
)
static
HRESULT
WINAPI
drive_get_VolumeName
(
IDrive
*
iface
,
BSTR
*
name
)
...
...
dlls/scrrun/tests/filesystem.c
View file @
2377fc09
...
@@ -1247,12 +1247,22 @@ static void test_DriveCollection(void)
...
@@ -1247,12 +1247,22 @@ static void test_DriveCollection(void)
hr
=
IDrive_get_IsReady
(
drive
,
NULL
);
hr
=
IDrive_get_IsReady
(
drive
,
NULL
);
ok
(
hr
==
E_POINTER
,
"got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
E_POINTER
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDrive_get_TotalSize
(
drive
,
NULL
);
ok
(
hr
==
E_POINTER
,
"got 0x%08x
\n
"
,
hr
);
if
(
type
==
Fixed
)
{
if
(
type
==
Fixed
)
{
VARIANT_BOOL
ready
=
VARIANT_FALSE
;
VARIANT_BOOL
ready
=
VARIANT_FALSE
;
VARIANT
size
;
hr
=
IDrive_get_IsReady
(
drive
,
&
ready
);
hr
=
IDrive_get_IsReady
(
drive
,
&
ready
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
ready
==
VARIANT_TRUE
,
"got %x
\n
"
,
ready
);
ok
(
ready
==
VARIANT_TRUE
,
"got %x
\n
"
,
ready
);
V_VT
(
&
size
)
=
VT_EMPTY
;
hr
=
IDrive_get_TotalSize
(
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
);
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