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
acaa2580
Commit
acaa2580
authored
Dec 16, 2011
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Jan 03, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mscoree: Implement CLRRuntimeHost_ExecuteInDefaultAppDomain.
parent
f1f5536d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
2 deletions
+84
-2
corruntimehost.c
dlls/mscoree/corruntimehost.c
+81
-2
metahost.c
dlls/mscoree/metahost.c
+1
-0
mscoree_private.h
dlls/mscoree/mscoree_private.h
+2
-0
No files found.
dlls/mscoree/corruntimehost.c
View file @
acaa2580
...
...
@@ -534,9 +534,88 @@ static HRESULT WINAPI CLRRuntimeHost_ExecuteInDefaultAppDomain(ICLRRuntimeHost*
LPCWSTR
pwzAssemblyPath
,
LPCWSTR
pwzTypeName
,
LPCWSTR
pwzMethodName
,
LPCWSTR
pwzArgument
,
DWORD
*
pReturnValue
)
{
FIXME
(
"(%p,%s,%s,%s,%s)
\n
"
,
iface
,
debugstr_w
(
pwzAssemblyPath
),
RuntimeHost
*
This
=
impl_from_ICLRRuntimeHost
(
iface
);
HRESULT
hr
;
MonoDomain
*
domain
;
MonoAssembly
*
assembly
;
MonoImage
*
image
;
MonoClass
*
klass
;
MonoMethod
*
method
;
MonoObject
*
result
;
MonoString
*
str
;
void
*
args
[
2
];
char
*
filenameA
=
NULL
,
*
classA
=
NULL
,
*
methodA
=
NULL
;
char
*
argsA
=
NULL
,
*
ns
;
TRACE
(
"(%p,%s,%s,%s,%s)
\n
"
,
iface
,
debugstr_w
(
pwzAssemblyPath
),
debugstr_w
(
pwzTypeName
),
debugstr_w
(
pwzMethodName
),
debugstr_w
(
pwzArgument
));
return
E_NOTIMPL
;
hr
=
RuntimeHost_GetDefaultDomain
(
This
,
&
domain
);
if
(
hr
!=
S_OK
)
{
ERR
(
"Couldn't get Default Domain
\n
"
);
return
hr
;
}
hr
=
E_FAIL
;
filenameA
=
WtoA
(
pwzAssemblyPath
);
assembly
=
This
->
mono
->
mono_domain_assembly_open
(
domain
,
filenameA
);
if
(
!
assembly
)
{
ERR
(
"Cannot open assembly %s
\n
"
,
filenameA
);
goto
cleanup
;
}
image
=
This
->
mono
->
mono_assembly_get_image
(
assembly
);
if
(
!
image
)
{
ERR
(
"Couldn't get assembly image
\n
"
);
goto
cleanup
;
}
classA
=
WtoA
(
pwzTypeName
);
ns
=
strrchr
(
classA
,
'.'
);
*
ns
=
'\0'
;
klass
=
This
->
mono
->
mono_class_from_name
(
image
,
classA
,
ns
+
1
);
if
(
!
klass
)
{
ERR
(
"Couldn't get class from image
\n
"
);
goto
cleanup
;
}
methodA
=
WtoA
(
pwzMethodName
);
method
=
This
->
mono
->
mono_class_get_method_from_name
(
klass
,
methodA
,
1
);
if
(
!
method
)
{
ERR
(
"Couldn't get method from class
\n
"
);
goto
cleanup
;
}
argsA
=
WtoA
(
pwzArgument
);
str
=
This
->
mono
->
mono_string_new
(
domain
,
argsA
);
args
[
0
]
=
&
str
;
args
[
1
]
=
NULL
;
result
=
This
->
mono
->
mono_runtime_invoke
(
method
,
NULL
,
args
,
NULL
);
if
(
!
result
)
ERR
(
"Couldn't get result pointer
\n
"
);
else
{
*
pReturnValue
=
*
(
DWORD
*
)
This
->
mono
->
mono_object_unbox
(
result
);
hr
=
S_OK
;
}
cleanup:
if
(
filenameA
)
HeapFree
(
GetProcessHeap
(),
0
,
filenameA
);
if
(
classA
)
HeapFree
(
GetProcessHeap
(),
0
,
classA
);
if
(
argsA
)
HeapFree
(
GetProcessHeap
(),
0
,
argsA
);
if
(
methodA
)
HeapFree
(
GetProcessHeap
(),
0
,
methodA
);
return
hr
;
}
static
const
struct
ICLRRuntimeHostVtbl
CLRHostVtbl
=
...
...
dlls/mscoree/metahost.c
View file @
acaa2580
...
...
@@ -185,6 +185,7 @@ static HRESULT load_mono(CLRRuntimeInfo *This, loaded_mono **result)
LOAD_MONO_FUNCTION
(
mono_runtime_quit
);
LOAD_MONO_FUNCTION
(
mono_set_dirs
);
LOAD_MONO_FUNCTION
(
mono_stringify_assembly_name
);
LOAD_MONO_FUNCTION
(
mono_string_new
);
/* GLib imports obsoleted by the 2.0 ABI */
if
(
This
->
mono_abi_version
==
1
)
...
...
dlls/mscoree/mscoree_private.h
View file @
acaa2580
...
...
@@ -41,6 +41,7 @@ typedef struct _MonoType MonoType;
typedef
struct
_MonoImage
MonoImage
;
typedef
struct
_MonoClass
MonoClass
;
typedef
struct
_MonoObject
MonoObject
;
typedef
struct
_MonoString
MonoString
;
typedef
struct
_MonoMethod
MonoMethod
;
typedef
struct
_MonoProfiler
MonoProfiler
;
...
...
@@ -161,6 +162,7 @@ struct loaded_mono
void
(
CDECL
*
mono_thread_pool_cleanup
)(
void
);
void
(
CDECL
*
mono_thread_suspend_all_other_threads
)(
void
);
void
(
CDECL
*
mono_threads_set_shutting_down
)(
void
);
MonoString
*
(
CDECL
*
mono_string_new
)(
MonoDomain
*
domain
,
const
char
*
str
);
};
/* loaded runtime interfaces */
...
...
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