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
13195151
Commit
13195151
authored
Jun 04, 2013
by
Daniel Jelinski
Committed by
Alexandre Julliard
Jun 05, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mscoree: Search for COM classes by assembly name if CodeBase not found.
parent
0eaa3ec9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
11 deletions
+34
-11
corruntimehost.c
dlls/mscoree/corruntimehost.c
+34
-11
No files found.
dlls/mscoree/corruntimehost.c
View file @
13195151
...
...
@@ -1235,6 +1235,7 @@ HRESULT RuntimeHost_Destroy(RuntimeHost *This)
HRESULT
create_monodata
(
REFIID
riid
,
LPVOID
*
ppObj
)
{
static
const
WCHAR
wszAssembly
[]
=
{
'A'
,
's'
,
's'
,
'e'
,
'm'
,
'b'
,
'l'
,
'y'
,
0
};
static
const
WCHAR
wszCodebase
[]
=
{
'C'
,
'o'
,
'd'
,
'e'
,
'B'
,
'a'
,
's'
,
'e'
,
0
};
static
const
WCHAR
wszClass
[]
=
{
'C'
,
'l'
,
'a'
,
's'
,
's'
,
0
};
static
const
WCHAR
wszFileSlash
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
':'
,
'/'
,
'/'
,
'/'
,
0
};
...
...
@@ -1246,11 +1247,12 @@ HRESULT create_monodata(REFIID riid, LPVOID *ppObj )
ICLRRuntimeInfo
*
info
=
NULL
;
RuntimeHost
*
host
;
HRESULT
hr
;
HKEY
key
;
HKEY
key
,
subkey
;
LONG
res
;
int
offset
=
0
;
DWORD
numKeys
,
keyLength
;
WCHAR
codebase
[
MAX_PATH
+
8
];
WCHAR
classname
[
350
];
WCHAR
classname
[
350
]
,
subkeyName
[
256
]
;
WCHAR
filename
[
MAX_PATH
];
DWORD
dwBufLen
=
350
;
...
...
@@ -1277,19 +1279,40 @@ HRESULT create_monodata(REFIID riid, LPVOID *ppObj )
dwBufLen
=
MAX_PATH
+
8
;
res
=
RegGetValueW
(
key
,
NULL
,
wszCodebase
,
RRF_RT_REG_SZ
,
NULL
,
codebase
,
&
dwBufLen
);
if
(
res
!=
ERROR_SUCCESS
)
if
(
res
==
ERROR_SUCCESS
)
{
/* Strip file:/// */
if
(
strncmpW
(
codebase
,
wszFileSlash
,
strlenW
(
wszFileSlash
))
==
0
)
offset
=
strlenW
(
wszFileSlash
);
strcpyW
(
filename
,
codebase
+
offset
);
}
else
{
WARN
(
"CodeBase value cannot be found.
\n
"
);
hr
=
CLASS_E_CLASSNOTAVAILABLE
;
goto
cleanup
;
WARN
(
"CodeBase value cannot be found, trying Assembly.
\n
"
);
/* get the last subkey of InprocServer32 */
res
=
RegQueryInfoKeyW
(
key
,
0
,
0
,
0
,
&
numKeys
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
if
(
res
!=
ERROR_SUCCESS
||
numKeys
==
0
)
goto
cleanup
;
numKeys
--
;
keyLength
=
sizeof
(
subkeyName
)
/
sizeof
(
WCHAR
);
res
=
RegEnumKeyExW
(
key
,
numKeys
,
subkeyName
,
&
keyLength
,
0
,
0
,
0
,
0
);
if
(
res
!=
ERROR_SUCCESS
)
goto
cleanup
;
res
=
RegOpenKeyExW
(
key
,
subkeyName
,
0
,
KEY_READ
,
&
subkey
);
if
(
res
!=
ERROR_SUCCESS
)
goto
cleanup
;
dwBufLen
=
MAX_PATH
+
8
;
res
=
RegGetValueW
(
subkey
,
NULL
,
wszAssembly
,
RRF_RT_REG_SZ
,
NULL
,
codebase
,
&
dwBufLen
);
RegCloseKey
(
subkey
);
if
(
res
!=
ERROR_SUCCESS
)
goto
cleanup
;
hr
=
get_file_from_strongname
(
codebase
,
filename
,
MAX_PATH
);
if
(
!
SUCCEEDED
(
hr
))
goto
cleanup
;
}
/* Strip file:/// */
if
(
strncmpW
(
codebase
,
wszFileSlash
,
strlenW
(
wszFileSlash
))
==
0
)
offset
=
strlenW
(
wszFileSlash
);
strcpyW
(
filename
,
codebase
+
offset
);
TRACE
(
"codebase (%s)
\n
"
,
debugstr_w
(
filename
));
*
ppObj
=
NULL
;
...
...
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