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
a824e8f6
Commit
a824e8f6
authored
May 02, 2012
by
Vincent Povirk
Committed by
Alexandre Julliard
May 03, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mscoree: Use the main HMODULE in _CorExeMain instead of loading a new exe.
parent
d2d1c6d8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
3 deletions
+21
-3
corruntimehost.c
dlls/mscoree/corruntimehost.c
+17
-3
metahost.c
dlls/mscoree/metahost.c
+2
-0
mscoree_private.h
dlls/mscoree/mscoree_private.h
+2
-0
No files found.
dlls/mscoree/corruntimehost.c
View file @
a824e8f6
...
@@ -829,7 +829,9 @@ __int32 WINAPI _CorExeMain(void)
...
@@ -829,7 +829,9 @@ __int32 WINAPI _CorExeMain(void)
int
argc
;
int
argc
;
char
**
argv
;
char
**
argv
;
MonoDomain
*
domain
;
MonoDomain
*
domain
;
MonoAssembly
*
assembly
;
MonoImage
*
image
;
MonoImageOpenStatus
status
;
MonoAssembly
*
assembly
=
NULL
;
WCHAR
filename
[
MAX_PATH
];
WCHAR
filename
[
MAX_PATH
];
char
*
filenameA
;
char
*
filenameA
;
ICLRRuntimeInfo
*
info
;
ICLRRuntimeInfo
*
info
;
...
@@ -863,9 +865,21 @@ __int32 WINAPI _CorExeMain(void)
...
@@ -863,9 +865,21 @@ __int32 WINAPI _CorExeMain(void)
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
assembly
=
host
->
mono
->
mono_domain_assembly_open
(
domain
,
filenameA
);
image
=
host
->
mono
->
mono_image_open_from_module_handle
(
GetModuleHandleW
(
NULL
),
filenameA
,
1
,
&
status
);
exit_code
=
host
->
mono
->
mono_jit_exec
(
domain
,
assembly
,
argc
,
argv
);
if
(
image
)
assembly
=
host
->
mono
->
mono_assembly_load_from
(
image
,
filenameA
,
&
status
);
if
(
assembly
)
{
exit_code
=
host
->
mono
->
mono_jit_exec
(
domain
,
assembly
,
argc
,
argv
);
}
else
{
ERR
(
"couldn't load %s, status=%d
\n
"
,
debugstr_w
(
filename
),
status
);
exit_code
=
-
1
;
}
RuntimeHost_DeleteDomain
(
host
,
domain
);
RuntimeHost_DeleteDomain
(
host
,
domain
);
}
}
...
...
dlls/mscoree/metahost.c
View file @
a824e8f6
...
@@ -165,12 +165,14 @@ static HRESULT load_mono(CLRRuntimeInfo *This, loaded_mono **result)
...
@@ -165,12 +165,14 @@ static HRESULT load_mono(CLRRuntimeInfo *This, loaded_mono **result)
} while (0);
} while (0);
LOAD_MONO_FUNCTION
(
mono_assembly_get_image
);
LOAD_MONO_FUNCTION
(
mono_assembly_get_image
);
LOAD_MONO_FUNCTION
(
mono_assembly_load_from
);
LOAD_MONO_FUNCTION
(
mono_assembly_open
);
LOAD_MONO_FUNCTION
(
mono_assembly_open
);
LOAD_MONO_FUNCTION
(
mono_config_parse
);
LOAD_MONO_FUNCTION
(
mono_config_parse
);
LOAD_MONO_FUNCTION
(
mono_class_from_mono_type
);
LOAD_MONO_FUNCTION
(
mono_class_from_mono_type
);
LOAD_MONO_FUNCTION
(
mono_class_from_name
);
LOAD_MONO_FUNCTION
(
mono_class_from_name
);
LOAD_MONO_FUNCTION
(
mono_class_get_method_from_name
);
LOAD_MONO_FUNCTION
(
mono_class_get_method_from_name
);
LOAD_MONO_FUNCTION
(
mono_domain_assembly_open
);
LOAD_MONO_FUNCTION
(
mono_domain_assembly_open
);
LOAD_MONO_FUNCTION
(
mono_image_open_from_module_handle
);
LOAD_MONO_FUNCTION
(
mono_install_assembly_preload_hook
);
LOAD_MONO_FUNCTION
(
mono_install_assembly_preload_hook
);
LOAD_MONO_FUNCTION
(
mono_jit_exec
);
LOAD_MONO_FUNCTION
(
mono_jit_exec
);
LOAD_MONO_FUNCTION
(
mono_jit_init
);
LOAD_MONO_FUNCTION
(
mono_jit_init
);
...
...
dlls/mscoree/mscoree_private.h
View file @
a824e8f6
...
@@ -147,6 +147,7 @@ struct loaded_mono
...
@@ -147,6 +147,7 @@ struct loaded_mono
BOOL
is_shutdown
;
BOOL
is_shutdown
;
MonoImage
*
(
CDECL
*
mono_assembly_get_image
)(
MonoAssembly
*
assembly
);
MonoImage
*
(
CDECL
*
mono_assembly_get_image
)(
MonoAssembly
*
assembly
);
MonoAssembly
*
(
CDECL
*
mono_assembly_load_from
)(
MonoImage
*
image
,
const
char
*
fname
,
MonoImageOpenStatus
*
status
);
MonoAssembly
*
(
CDECL
*
mono_assembly_open
)(
const
char
*
filename
,
MonoImageOpenStatus
*
status
);
MonoAssembly
*
(
CDECL
*
mono_assembly_open
)(
const
char
*
filename
,
MonoImageOpenStatus
*
status
);
MonoClass
*
(
CDECL
*
mono_class_from_mono_type
)(
MonoType
*
type
);
MonoClass
*
(
CDECL
*
mono_class_from_mono_type
)(
MonoType
*
type
);
MonoClass
*
(
CDECL
*
mono_class_from_name
)(
MonoImage
*
image
,
const
char
*
name_space
,
const
char
*
name
);
MonoClass
*
(
CDECL
*
mono_class_from_name
)(
MonoImage
*
image
,
const
char
*
name_space
,
const
char
*
name
);
...
@@ -154,6 +155,7 @@ struct loaded_mono
...
@@ -154,6 +155,7 @@ struct loaded_mono
void
(
CDECL
*
mono_config_parse
)(
const
char
*
filename
);
void
(
CDECL
*
mono_config_parse
)(
const
char
*
filename
);
MonoAssembly
*
(
CDECL
*
mono_domain_assembly_open
)
(
MonoDomain
*
domain
,
const
char
*
name
);
MonoAssembly
*
(
CDECL
*
mono_domain_assembly_open
)
(
MonoDomain
*
domain
,
const
char
*
name
);
void
(
CDECL
*
mono_free
)(
void
*
);
void
(
CDECL
*
mono_free
)(
void
*
);
MonoImage
*
(
CDECL
*
mono_image_open_from_module_handle
)(
HMODULE
module_handle
,
char
*
fname
,
UINT
has_entry_point
,
MonoImageOpenStatus
*
status
);
void
(
CDECL
*
mono_install_assembly_preload_hook
)(
MonoAssemblyPreLoadFunc
func
,
void
*
user_data
);
void
(
CDECL
*
mono_install_assembly_preload_hook
)(
MonoAssemblyPreLoadFunc
func
,
void
*
user_data
);
int
(
CDECL
*
mono_jit_exec
)(
MonoDomain
*
domain
,
MonoAssembly
*
assembly
,
int
argc
,
char
*
argv
[]);
int
(
CDECL
*
mono_jit_exec
)(
MonoDomain
*
domain
,
MonoAssembly
*
assembly
,
int
argc
,
char
*
argv
[]);
MonoDomain
*
(
CDECL
*
mono_jit_init
)(
const
char
*
file
);
MonoDomain
*
(
CDECL
*
mono_jit_init
)(
const
char
*
file
);
...
...
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