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
c296e7de
Commit
c296e7de
authored
Oct 29, 2017
by
Alex Henrie
Committed by
Alexandre Julliard
Oct 30, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mountmgr: Symlink WoW64 Wine ports key to regular Wine ports key.
Signed-off-by:
Alex Henrie
<
alexhenrie24@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b3ee6101
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
device.c
dlls/mountmgr.sys/device.c
+2
-1
mountmgr.c
dlls/mountmgr.sys/mountmgr.c
+20
-0
No files found.
dlls/mountmgr.sys/device.c
View file @
c296e7de
...
...
@@ -1136,7 +1136,8 @@ static void create_port_devices( DRIVER_OBJECT *driver )
}
p
+=
3
;
RegOpenKeyExW
(
HKEY_LOCAL_MACHINE
,
ports_keyW
,
0
,
KEY_QUERY_VALUE
,
&
wine_ports_key
);
RegCreateKeyExW
(
HKEY_LOCAL_MACHINE
,
ports_keyW
,
0
,
NULL
,
0
,
KEY_QUERY_VALUE
,
NULL
,
&
wine_ports_key
,
NULL
);
RegCreateKeyExW
(
HKEY_LOCAL_MACHINE
,
windows_ports_key_name
,
0
,
NULL
,
REG_OPTION_VOLATILE
,
KEY_ALL_ACCESS
,
NULL
,
&
windows_ports_key
,
NULL
);
...
...
dlls/mountmgr.sys/mountmgr.c
View file @
c296e7de
...
...
@@ -422,6 +422,17 @@ NTSTATUS WINAPI DriverEntry( DRIVER_OBJECT *driver, UNICODE_STRING *path )
static
const
WCHAR
driver_serialW
[]
=
{
'\\'
,
'D'
,
'r'
,
'i'
,
'v'
,
'e'
,
'r'
,
'\\'
,
'S'
,
'e'
,
'r'
,
'i'
,
'a'
,
'l'
,
0
};
static
const
WCHAR
driver_parallelW
[]
=
{
'\\'
,
'D'
,
'r'
,
'i'
,
'v'
,
'e'
,
'r'
,
'\\'
,
'P'
,
'a'
,
'r'
,
'a'
,
'l'
,
'l'
,
'e'
,
'l'
,
0
};
#ifdef _WIN64
static
const
WCHAR
qualified_ports_keyW
[]
=
{
'\\'
,
'R'
,
'E'
,
'G'
,
'I'
,
'S'
,
'T'
,
'R'
,
'Y'
,
'\\'
,
'M'
,
'A'
,
'C'
,
'H'
,
'I'
,
'N'
,
'E'
,
'\\'
,
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'e'
,
'\\'
,
'P'
,
'o'
,
'r'
,
't'
,
's'
};
/* no null terminator */
static
const
WCHAR
wow64_ports_keyW
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'W'
,
'o'
,
'w'
,
'6'
,
'4'
,
'3'
,
'2'
,
'N'
,
'o'
,
'd'
,
'e'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'e'
,
'\\'
,
'P'
,
'o'
,
'r'
,
't'
,
's'
,
0
};
static
const
WCHAR
symbolic_link_valueW
[]
=
{
'S'
,
'y'
,
'm'
,
'b'
,
'o'
,
'l'
,
'i'
,
'c'
,
'L'
,
'i'
,
'n'
,
'k'
,
'V'
,
'a'
,
'l'
,
'u'
,
'e'
,
0
};
HKEY
wow64_ports_key
=
NULL
;
#endif
UNICODE_STRING
nameW
,
linkW
;
DEVICE_OBJECT
*
device
;
NTSTATUS
status
;
...
...
@@ -449,6 +460,15 @@ NTSTATUS WINAPI DriverEntry( DRIVER_OBJECT *driver, UNICODE_STRING *path )
initialize_dbus
();
initialize_diskarbitration
();
#ifdef _WIN64
/* create a symlink so that the Wine port overrides key can be edited with 32-bit reg or regedit */
RegCreateKeyExW
(
HKEY_LOCAL_MACHINE
,
wow64_ports_keyW
,
0
,
NULL
,
REG_OPTION_CREATE_LINK
,
KEY_SET_VALUE
,
NULL
,
&
wow64_ports_key
,
NULL
);
RegSetValueExW
(
wow64_ports_key
,
symbolic_link_valueW
,
0
,
REG_LINK
,
(
BYTE
*
)
qualified_ports_keyW
,
sizeof
(
qualified_ports_keyW
)
);
RegCloseKey
(
wow64_ports_key
);
#endif
RtlInitUnicodeString
(
&
nameW
,
driver_serialW
);
IoCreateDriver
(
&
nameW
,
serial_driver_entry
);
...
...
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