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
56484cc0
Commit
56484cc0
authored
May 17, 2012
by
Vincent Povirk
Committed by
Alexandre Julliard
May 17, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mscoree: Add a fallback for mono_image_open_from_module_handle.
parent
ad7279a5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
8 deletions
+33
-8
metahost.c
dlls/mscoree/metahost.c
+32
-8
mscoree_private.h
dlls/mscoree/mscoree_private.h
+1
-0
No files found.
dlls/mscoree/metahost.c
View file @
56484cc0
...
...
@@ -100,6 +100,29 @@ static void CDECL do_nothing(void)
{
}
static
MonoImage
*
image_open_module_handle_dummy
(
HMODULE
module_handle
,
char
*
fname
,
UINT
has_entry_point
,
MonoImageOpenStatus
*
status
,
int
abi_version
)
{
return
loaded_monos
[
abi_version
-
1
].
mono_image_open
(
fname
,
status
);
}
static
CDECL
MonoImage
*
image_open_module_handle_dummy_1
(
HMODULE
module_handle
,
char
*
fname
,
UINT
has_entry_point
,
MonoImageOpenStatus
*
status
)
{
return
image_open_module_handle_dummy
(
module_handle
,
fname
,
has_entry_point
,
status
,
1
);
}
static
CDECL
MonoImage
*
image_open_module_handle_dummy_2
(
HMODULE
module_handle
,
char
*
fname
,
UINT
has_entry_point
,
MonoImageOpenStatus
*
status
)
{
return
image_open_module_handle_dummy
(
module_handle
,
fname
,
has_entry_point
,
status
,
2
);
}
MonoImage
*
(
CDECL
*
const
image_from_handle_fn
[
NUM_ABI_VERSIONS
])(
HMODULE
module_handle
,
char
*
fname
,
UINT
has_entry_point
,
MonoImageOpenStatus
*
status
)
=
{
image_open_module_handle_dummy_1
,
image_open_module_handle_dummy_2
};
static
void
missing_runtime_message
(
const
CLRRuntimeInfo
*
This
)
{
if
(
This
->
major
==
1
)
...
...
@@ -172,7 +195,7 @@ static HRESULT load_mono(CLRRuntimeInfo *This, loaded_mono **result)
LOAD_MONO_FUNCTION
(
mono_class_from_name
);
LOAD_MONO_FUNCTION
(
mono_class_get_method_from_name
);
LOAD_MONO_FUNCTION
(
mono_domain_assembly_open
);
LOAD_MONO_FUNCTION
(
mono_image_open
_from_module_handle
);
LOAD_MONO_FUNCTION
(
mono_image_open
);
LOAD_MONO_FUNCTION
(
mono_install_assembly_preload_hook
);
LOAD_MONO_FUNCTION
(
mono_jit_exec
);
LOAD_MONO_FUNCTION
(
mono_jit_init
);
...
...
@@ -207,19 +230,20 @@ static HRESULT load_mono(CLRRuntimeInfo *This, loaded_mono **result)
#undef LOAD_MONO_FUNCTION
#define LOAD_OPT_
VOID_MONO_FUNCTION(x
) do { \
#define LOAD_OPT_
MONO_FUNCTION(x, default
) do { \
(*result)->x = (void*)GetProcAddress((*result)->mono_handle, #x); \
if (!(*result)->x) { \
(*result)->x = d
o_nothing
; \
(*result)->x = d
efault
; \
} \
} while (0);
LOAD_OPT_VOID_MONO_FUNCTION
(
mono_runtime_set_shutting_down
);
LOAD_OPT_VOID_MONO_FUNCTION
(
mono_thread_pool_cleanup
);
LOAD_OPT_VOID_MONO_FUNCTION
(
mono_thread_suspend_all_other_threads
);
LOAD_OPT_VOID_MONO_FUNCTION
(
mono_threads_set_shutting_down
);
LOAD_OPT_MONO_FUNCTION
(
mono_image_open_from_module_handle
,
image_from_handle_fn
[
This
->
mono_abi_version
-
1
]);
LOAD_OPT_MONO_FUNCTION
(
mono_runtime_set_shutting_down
,
do_nothing
);
LOAD_OPT_MONO_FUNCTION
(
mono_thread_pool_cleanup
,
do_nothing
);
LOAD_OPT_MONO_FUNCTION
(
mono_thread_suspend_all_other_threads
,
do_nothing
);
LOAD_OPT_MONO_FUNCTION
(
mono_threads_set_shutting_down
,
do_nothing
);
#undef LOAD_OPT_
VOID_
MONO_FUNCTION
#undef LOAD_OPT_MONO_FUNCTION
(
*
result
)
->
mono_profiler_install
((
MonoProfiler
*
)
*
result
,
mono_shutdown_callback_fn
);
...
...
dlls/mscoree/mscoree_private.h
View file @
56484cc0
...
...
@@ -154,6 +154,7 @@ struct loaded_mono
void
(
CDECL
*
mono_config_parse
)(
const
char
*
filename
);
MonoAssembly
*
(
CDECL
*
mono_domain_assembly_open
)
(
MonoDomain
*
domain
,
const
char
*
name
);
void
(
CDECL
*
mono_free
)(
void
*
);
MonoImage
*
(
CDECL
*
mono_image_open
)(
const
char
*
fname
,
MonoImageOpenStatus
*
status
);
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
);
int
(
CDECL
*
mono_jit_exec
)(
MonoDomain
*
domain
,
MonoAssembly
*
assembly
,
int
argc
,
char
*
argv
[]);
...
...
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