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
9d770349
Commit
9d770349
authored
Oct 05, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Oct 13, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mscoree: Implement ICLRRuntimeInfo_GetRuntimeDirectory.
parent
a7bda5c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
2 deletions
+55
-2
metahost.c
dlls/mscoree/metahost.c
+55
-2
No files found.
dlls/mscoree/metahost.c
View file @
9d770349
...
...
@@ -169,12 +169,65 @@ static HRESULT WINAPI CLRRuntimeInfo_GetVersionString(ICLRRuntimeInfo* iface,
return
hr
;
}
static
BOOL
get_install_root
(
LPWSTR
install_dir
)
{
const
WCHAR
dotnet_key
[]
=
{
'S'
,
'O'
,
'F'
,
'T'
,
'W'
,
'A'
,
'R'
,
'E'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
'.'
,
'N'
,
'E'
,
'T'
,
'F'
,
'r'
,
'a'
,
'm'
,
'e'
,
'w'
,
'o'
,
'r'
,
'k'
,
'\\'
,
0
};
const
WCHAR
install_root
[]
=
{
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'R'
,
'o'
,
'o'
,
't'
,
0
};
DWORD
len
;
HKEY
key
;
if
(
RegOpenKeyExW
(
HKEY_LOCAL_MACHINE
,
dotnet_key
,
0
,
KEY_READ
,
&
key
))
return
FALSE
;
len
=
MAX_PATH
;
if
(
RegQueryValueExW
(
key
,
install_root
,
0
,
NULL
,
(
LPBYTE
)
install_dir
,
&
len
))
{
RegCloseKey
(
key
);
return
FALSE
;
}
RegCloseKey
(
key
);
return
TRUE
;
}
static
HRESULT
WINAPI
CLRRuntimeInfo_GetRuntimeDirectory
(
ICLRRuntimeInfo
*
iface
,
LPWSTR
pwzBuffer
,
DWORD
*
pcchBuffer
)
{
FIXME
(
"%p %p %p
\n
"
,
iface
,
pwzBuffer
,
pcchBuffer
);
static
const
WCHAR
slash
[]
=
{
'\\'
,
0
};
DWORD
buffer_size
=
*
pcchBuffer
;
WCHAR
system_dir
[
MAX_PATH
];
WCHAR
version
[
MAX_PATH
];
DWORD
version_size
,
size
;
HRESULT
hr
=
S_OK
;
return
E_NOTIMPL
;
TRACE
(
"%p %p %p
\n
"
,
iface
,
pwzBuffer
,
pcchBuffer
);
if
(
!
get_install_root
(
system_dir
))
{
ERR
(
"error reading registry key for installroot
\n
"
);
return
E_FAIL
;
}
else
{
version_size
=
MAX_PATH
;
ICLRRuntimeInfo_GetVersionString
(
iface
,
version
,
&
version_size
);
lstrcatW
(
system_dir
,
version
);
lstrcatW
(
system_dir
,
slash
);
size
=
lstrlenW
(
system_dir
)
+
1
;
}
*
pcchBuffer
=
size
;
if
(
pwzBuffer
)
{
if
(
buffer_size
>=
size
)
strcpyW
(
pwzBuffer
,
system_dir
);
else
hr
=
HRESULT_FROM_WIN32
(
ERROR_INSUFFICIENT_BUFFER
);
}
return
hr
;
}
static
HRESULT
WINAPI
CLRRuntimeInfo_IsLoaded
(
ICLRRuntimeInfo
*
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