summaryrefslogtreecommitdiff
path: root/src/coreclr/hosts/unixcorerun
diff options
context:
space:
mode:
authorMatt Ellis <matell@microsoft.com>2015-03-02 22:48:35 -0800
committerMatt Ellis <matell@microsoft.com>2015-03-10 22:09:56 -0700
commit1bf04d443bea95493d2a549d9b5e7b4d3d421812 (patch)
tree864dd83d47f893b6000e56616e87d9003b33f4aa /src/coreclr/hosts/unixcorerun
parent6d1715d68d8ca1f921534897828242bbcc4f00b6 (diff)
downloadcoreclr-1bf04d443bea95493d2a549d9b5e7b4d3d421812.tar.gz
coreclr-1bf04d443bea95493d2a549d9b5e7b4d3d421812.tar.bz2
coreclr-1bf04d443bea95493d2a549d9b5e7b4d3d421812.zip
Add custom entry point support.
Hosts like ASP.net don't want to call ExecuteAssembly, because their entry point is library, not a managed exe. However, forcing cross platform hosts to actually call CreateAppDomainWithManager and CreateDelegate themselves requires a bunch of tedious code, since these hosts don't have access to mscoree.h and the PAL. This change adds the ability to specificy an assembly, type and method which can be used as a custom entrypoint. The signiture of the managed entry point needs to be `static int E(int, char**)`.
Diffstat (limited to 'src/coreclr/hosts/unixcorerun')
-rw-r--r--src/coreclr/hosts/unixcorerun/corerun.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/coreclr/hosts/unixcorerun/corerun.cpp b/src/coreclr/hosts/unixcorerun/corerun.cpp
index 0a54ca816f..f13c8f9c3f 100644
--- a/src/coreclr/hosts/unixcorerun/corerun.cpp
+++ b/src/coreclr/hosts/unixcorerun/corerun.cpp
@@ -42,6 +42,9 @@ typedef HRESULT (*ExecuteAssemblyFunction)(
int argc,
LPCSTR* argv,
LPCSTR managedAssemblyPath,
+ LPCSTR entryPointAssemblyName,
+ LPCSTR entryPointTypeName,
+ LPCSTR entryPointMethodsName,
DWORD* exitCode);
// Display the command line options
@@ -315,6 +318,9 @@ int ExecuteManagedAssembly(
managedAssemblyArgc,
managedAssemblyArgv,
managedAssemblyAbsolutePath,
+ NULL,
+ NULL,
+ NULL,
(DWORD*)&exitCode);
if (!SUCCEEDED(st))