Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
863a7614
Commit
863a7614
authored
Mar 11, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 11, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scrrun: Implement Count() property for drive collection.
parent
a30a2abb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
filesystem.c
dlls/scrrun/filesystem.c
+13
-3
filesystem.c
dlls/scrrun/tests/filesystem.c
+4
-3
No files found.
dlls/scrrun/filesystem.c
View file @
863a7614
...
...
@@ -54,6 +54,7 @@ struct drivecollection {
IDriveCollection
IDriveCollection_iface
;
LONG
ref
;
DWORD
drives
;
LONG
count
;
};
struct
enumdata
{
...
...
@@ -1675,8 +1676,13 @@ static HRESULT WINAPI drivecoll_get__NewEnum(IDriveCollection *iface, IUnknown *
static
HRESULT
WINAPI
drivecoll_get_Count
(
IDriveCollection
*
iface
,
LONG
*
count
)
{
struct
drivecollection
*
This
=
impl_from_IDriveCollection
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
count
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
count
);
if
(
!
count
)
return
E_POINTER
;
*
count
=
This
->
count
;
return
S_OK
;
}
static
const
IDriveCollectionVtbl
drivecollectionvtbl
=
{
...
...
@@ -1695,6 +1701,7 @@ static const IDriveCollectionVtbl drivecollectionvtbl = {
static
HRESULT
create_drivecoll
(
IDriveCollection
**
drives
)
{
struct
drivecollection
*
This
;
DWORD
mask
;
*
drives
=
NULL
;
...
...
@@ -1703,7 +1710,10 @@ static HRESULT create_drivecoll(IDriveCollection **drives)
This
->
IDriveCollection_iface
.
lpVtbl
=
&
drivecollectionvtbl
;
This
->
ref
=
1
;
This
->
drives
=
GetLogicalDrives
();
This
->
drives
=
mask
=
GetLogicalDrives
();
/* count set bits */
for
(
This
->
count
=
0
;
mask
;
This
->
count
++
)
mask
&=
mask
-
1
;
*
drives
=
&
This
->
IDriveCollection_iface
;
return
S_OK
;
...
...
dlls/scrrun/tests/filesystem.c
View file @
863a7614
...
...
@@ -1157,12 +1157,14 @@ static void test_DriveCollection(void)
hr
=
IDriveCollection_get__NewEnum
(
drives
,
(
IUnknown
**
)
&
enumvar
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDriveCollection_get_Count
(
drives
,
NULL
);
ok
(
hr
==
E_POINTER
,
"got 0x%08x
\n
"
,
hr
);
count
=
0
;
hr
=
IDriveCollection_get_Count
(
drives
,
&
count
);
todo_wine
{
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
count
>
0
,
"got %d
\n
"
,
count
);
}
V_VT
(
&
var
)
=
VT_EMPTY
;
fetched
=
-
1
;
hr
=
IEnumVARIANT_Next
(
enumvar
,
0
,
&
var
,
&
fetched
);
...
...
@@ -1176,7 +1178,6 @@ todo_wine {
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IEnumVARIANT_Skip
(
enumvar
,
1
);
todo_wine
ok
(
hr
==
S_FALSE
,
"got 0x%08x
\n
"
,
hr
);
IEnumVARIANT_Release
(
enumvar
);
...
...
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