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
14d37f3f
Commit
14d37f3f
authored
Feb 01, 2022
by
Esme Povirk
Committed by
Alexandre Julliard
Feb 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mscoree: Add support for unmanaged classes in .NET Framework.
Signed-off-by:
Esme Povirk
<
esme@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8184e86a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
corruntimehost.c
dlls/mscoree/corruntimehost.c
+46
-0
No files found.
dlls/mscoree/corruntimehost.c
View file @
14d37f3f
...
...
@@ -1747,6 +1747,52 @@ HRESULT create_monodata(REFCLSID clsid, LPVOID *ppObj)
res
=
RegOpenKeyExW
(
HKEY_CLASSES_ROOT
,
path
,
0
,
KEY_READ
,
&
key
);
if
(
res
!=
ERROR_FILE_NOT_FOUND
)
{
res
=
RegOpenKeyExW
(
key
,
L"Server"
,
0
,
KEY_READ
,
&
subkey
);
if
(
res
==
ERROR_SUCCESS
)
{
/* Not a managed class, just chain through LoadLibraryShim */
HMODULE
module
;
HRESULT
(
WINAPI
*
pDllGetClassObject
)(
REFCLSID
,
REFIID
,
LPVOID
*
);
IClassFactory
*
classfactory
;
dwBufLen
=
ARRAY_SIZE
(
filename
);
res
=
RegGetValueW
(
subkey
,
NULL
,
NULL
,
RRF_RT_REG_SZ
,
NULL
,
filename
,
&
dwBufLen
);
RegCloseKey
(
subkey
);
if
(
res
!=
ERROR_SUCCESS
)
{
WARN
(
"Can't read default value from Server subkey.
\n
"
);
hr
=
CLASS_E_CLASSNOTAVAILABLE
;
goto
cleanup
;
}
hr
=
LoadLibraryShim
(
filename
,
L"v4.0.30319"
,
NULL
,
&
module
);
if
(
FAILED
(
hr
))
{
WARN
(
"Can't load %s.
\n
"
,
debugstr_w
(
filename
));
goto
cleanup
;
}
pDllGetClassObject
=
(
void
*
)
GetProcAddress
(
module
,
"DllGetClassObject"
);
if
(
!
pDllGetClassObject
)
{
WARN
(
"Can't get DllGetClassObject from %s.
\n
"
,
debugstr_w
(
filename
));
hr
=
CLASS_E_CLASSNOTAVAILABLE
;
goto
cleanup
;
}
hr
=
pDllGetClassObject
(
clsid
,
&
IID_IClassFactory
,
(
void
**
)
&
classfactory
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
IClassFactory_CreateInstance
(
classfactory
,
NULL
,
&
IID_IUnknown
,
ppObj
);
IClassFactory_Release
(
classfactory
);
}
goto
cleanup
;
}
res
=
RegGetValueW
(
key
,
NULL
,
L"Class"
,
RRF_RT_REG_SZ
,
NULL
,
classname
,
&
dwBufLen
);
if
(
res
!=
ERROR_SUCCESS
)
{
...
...
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