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
179797a6
Commit
179797a6
authored
Apr 04, 2019
by
Vincent Povirk
Committed by
Alexandre Julliard
Apr 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mscoree: Check for mono runtime path in registry.
Signed-off-by:
Vincent Povirk
<
vincent@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4cae8334
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
1 deletion
+34
-1
metahost.c
dlls/mscoree/metahost.c
+34
-1
No files found.
dlls/mscoree/metahost.c
View file @
179797a6
...
...
@@ -667,7 +667,7 @@ static BOOL find_mono_dll(LPCWSTR path, LPWSTR dll_path)
return
(
attributes
!=
INVALID_FILE_ATTRIBUTES
);
}
static
BOOL
get_mono_path
(
LPWSTR
path
)
static
BOOL
get_mono_path
_local
(
LPWSTR
path
)
{
static
const
WCHAR
subdir_mono
[]
=
{
'\\'
,
'm'
,
'o'
,
'n'
,
'o'
,
'\\'
,
'm'
,
'o'
,
'n'
,
'o'
,
'-'
,
'2'
,
'.'
,
'0'
,
0
};
WCHAR
base_path
[
MAX_PATH
],
mono_dll_path
[
MAX_PATH
];
...
...
@@ -685,6 +685,39 @@ static BOOL get_mono_path(LPWSTR path)
return
FALSE
;
}
static
BOOL
get_mono_path_registry
(
LPWSTR
path
)
{
static
const
WCHAR
keyname
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'e'
,
'\\'
,
'M'
,
'o'
,
'n'
,
'o'
,
0
};
static
const
WCHAR
valuename
[]
=
{
'R'
,
'u'
,
'n'
,
't'
,
'i'
,
'm'
,
'e'
,
'P'
,
'a'
,
't'
,
'h'
,
0
};
WCHAR
base_path
[
MAX_PATH
],
mono_dll_path
[
MAX_PATH
];
HKEY
hkey
;
DWORD
res
,
valuesize
;
BOOL
ret
=
FALSE
;
/* @@ Wine registry key: HKCU\Software\Wine\Mono */
res
=
RegOpenKeyW
(
HKEY_CURRENT_USER
,
keyname
,
&
hkey
);
if
(
res
!=
ERROR_SUCCESS
)
return
FALSE
;
valuesize
=
sizeof
(
base_path
);
res
=
RegGetValueW
(
hkey
,
NULL
,
valuename
,
RRF_RT_REG_SZ
,
NULL
,
base_path
,
&
valuesize
);
if
(
res
==
ERROR_SUCCESS
&&
find_mono_dll
(
base_path
,
mono_dll_path
))
{
strcpyW
(
path
,
base_path
);
ret
=
TRUE
;
}
RegCloseKey
(
hkey
);
return
ret
;
}
static
BOOL
get_mono_path
(
LPWSTR
path
)
{
return
get_mono_path_local
(
path
)
||
get_mono_path_registry
(
path
);
}
struct
InstalledRuntimeEnum
{
IEnumUnknown
IEnumUnknown_iface
;
...
...
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