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
6befc98d
Commit
6befc98d
authored
Jan 04, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mountmgr.sys: Add devices to the MountedDevices registry key.
parent
2143dee7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
mountmgr.c
dlls/mountmgr.sys/mountmgr.c
+12
-0
No files found.
dlls/mountmgr.sys/mountmgr.c
View file @
6befc98d
...
...
@@ -30,6 +30,7 @@
#include "winbase.h"
#include "winternl.h"
#include "winioctl.h"
#include "winreg.h"
#include "ddk/wdm.h"
#include "ddk/mountmgr.h"
#include "wine/library.h"
...
...
@@ -56,6 +57,7 @@ struct mount_point
};
static
struct
mount_point
mount_points
[
MAX_MOUNT_POINTS
];
static
HKEY
mount_key
;
static
inline
UNICODE_STRING
*
get_device_name
(
DEVICE_OBJECT
*
dev
)
{
...
...
@@ -207,6 +209,11 @@ static NTSTATUS add_mount_point( DRIVER_OBJECT *driver, DWORD type, int drive,
TRACE
(
"created device %s symlinks %s %s
\n
"
,
debugstr_w
(
get_device_name
(
mount_drive
->
device
)
->
Buffer
),
debugstr_w
(
mount_drive
->
link
.
Buffer
),
debugstr_w
(
mount_volume
->
link
.
Buffer
)
);
RegSetValueExW
(
mount_key
,
mount_drive
->
link
.
Buffer
,
0
,
REG_BINARY
,
mount_drive
->
id
,
mount_drive
->
id_len
);
RegSetValueExW
(
mount_key
,
mount_volume
->
link
.
Buffer
,
0
,
REG_BINARY
,
mount_volume
->
id
,
mount_volume
->
id_len
);
return
STATUS_SUCCESS
;
}
...
...
@@ -278,6 +285,8 @@ static void create_drive_mount_points( DRIVER_OBJECT *driver )
/* driver entry point for the harddisk driver */
static
NTSTATUS
WINAPI
harddisk_driver_entry
(
DRIVER_OBJECT
*
driver
,
UNICODE_STRING
*
path
)
{
static
const
WCHAR
mounted_devicesW
[]
=
{
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'\\'
,
'M'
,
'o'
,
'u'
,
'n'
,
't'
,
'e'
,
'd'
,
'D'
,
'e'
,
'v'
,
'i'
,
'c'
,
'e'
,
's'
,
0
};
static
const
WCHAR
harddisk0W
[]
=
{
'\\'
,
'D'
,
'e'
,
'v'
,
'i'
,
'c'
,
'e'
,
'\\'
,
'H'
,
'a'
,
'r'
,
'd'
,
'd'
,
'i'
,
's'
,
'k'
,
'0'
,
0
};
static
const
WCHAR
physdrive0W
[]
=
{
'\\'
,
'?'
,
'?'
,
'\\'
,
'P'
,
'h'
,
'y'
,
's'
,
'i'
,
'c'
,
'a'
,
'l'
,
'D'
,
'r'
,
'i'
,
'v'
,
'e'
,
'0'
,
0
};
...
...
@@ -288,6 +297,9 @@ static NTSTATUS WINAPI harddisk_driver_entry( DRIVER_OBJECT *driver, UNICODE_STR
driver
->
MajorFunction
[
IRP_MJ_DEVICE_CONTROL
]
=
harddisk_ioctl
;
RegCreateKeyExW
(
HKEY_LOCAL_MACHINE
,
mounted_devicesW
,
0
,
NULL
,
REG_OPTION_VOLATILE
,
KEY_ALL_ACCESS
,
NULL
,
&
mount_key
,
NULL
);
RtlInitUnicodeString
(
&
nameW
,
harddisk0W
);
RtlInitUnicodeString
(
&
linkW
,
physdrive0W
);
if
(
!
(
status
=
IoCreateDevice
(
driver
,
0
,
&
nameW
,
0
,
0
,
FALSE
,
&
device
)))
...
...
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