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
5af5e401
Commit
5af5e401
authored
Jun 23, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 24, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scrrun: Implement SerialNumber property.
parent
34f8053e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
2 deletions
+45
-2
filesystem.c
dlls/scrrun/filesystem.c
+9
-2
filesystem.c
dlls/scrrun/tests/filesystem.c
+36
-0
No files found.
dlls/scrrun/filesystem.c
View file @
5af5e401
...
...
@@ -978,8 +978,15 @@ static HRESULT WINAPI drive_get_FileSystem(IDrive *iface, BSTR *fs)
static
HRESULT
WINAPI
drive_get_SerialNumber
(
IDrive
*
iface
,
LONG
*
serial
)
{
struct
drive
*
This
=
impl_from_IDrive
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
serial
);
return
E_NOTIMPL
;
BOOL
ret
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
serial
);
if
(
!
serial
)
return
E_POINTER
;
ret
=
GetVolumeInformationW
(
This
->
root
,
NULL
,
0
,
(
DWORD
*
)
serial
,
NULL
,
NULL
,
NULL
,
0
);
return
ret
?
S_OK
:
E_FAIL
;
}
static
HRESULT
WINAPI
drive_get_IsReady
(
IDrive
*
iface
,
VARIANT_BOOL
*
ready
)
...
...
dlls/scrrun/tests/filesystem.c
View file @
5af5e401
...
...
@@ -1790,6 +1790,41 @@ static void test_GetDriveName(void)
}
}
static
void
test_SerialNumber
(
void
)
{
IDriveCollection
*
drives
;
IEnumVARIANT
*
iter
;
IDrive
*
drive
;
VARIANT
var
;
LONG
serial
;
HRESULT
hr
;
hr
=
IFileSystem3_get_Drives
(
fs3
,
&
drives
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDriveCollection_get__NewEnum
(
drives
,
(
IUnknown
**
)
&
iter
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IEnumVARIANT_Next
(
iter
,
1
,
&
var
,
NULL
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDispatch_QueryInterface
(
V_DISPATCH
(
&
var
),
&
IID_IDrive
,
(
void
**
)
&
drive
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
VariantClear
(
&
var
);
hr
=
IDrive_get_SerialNumber
(
drive
,
NULL
);
ok
(
hr
==
E_POINTER
,
"got 0x%08x
\n
"
,
hr
);
serial
=
0xdeadbeef
;
hr
=
IDrive_get_SerialNumber
(
drive
,
&
serial
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
serial
!=
0xdeadbeef
,
"got %x
\n
"
,
serial
);
IDrive_Release
(
drive
);
IEnumVARIANT_Release
(
iter
);
IDriveCollection_Release
(
drives
);
}
START_TEST
(
filesystem
)
{
HRESULT
hr
;
...
...
@@ -1823,6 +1858,7 @@ START_TEST(filesystem)
test_ReadAll
();
test_Read
();
test_GetDriveName
();
test_SerialNumber
();
IFileSystem3_Release
(
fs3
);
...
...
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