├── .gitattributes ├── .gitignore ├── Fancy.CoreClrHost ├── Fancy.CoreClrHost.nuspec ├── Fancy.CoreClrHost.sln └── Fancy.CoreClrHost │ ├── CommandLineParser.cpp │ ├── CommandLineParser.h │ ├── Common.h │ ├── Fancy.CoreClrHost.vcxproj │ ├── Fancy.CoreClrHost.vcxproj.filters │ ├── LoadAndRunCoreClr.h │ ├── LoadAndRundCoreClr.cpp │ ├── ReadMe.txt │ ├── Util.cpp │ ├── Util.h │ ├── main.cpp │ ├── main.h │ └── mscoree.h └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.sln.docstates 8 | 9 | # Build results 10 | [Dd]ebug/ 11 | [Dd]ebugPublic/ 12 | [Rr]elease/ 13 | x64/ 14 | build/ 15 | bld/ 16 | [Bb]in/ 17 | [Oo]bj/ 18 | 19 | # Roslyn cache directories 20 | *.ide/ 21 | 22 | # MSTest test Results 23 | [Tt]est[Rr]esult*/ 24 | [Bb]uild[Ll]og.* 25 | 26 | #NUNIT 27 | *.VisualState.xml 28 | TestResult.xml 29 | 30 | # Build Results of an ATL Project 31 | [Dd]ebugPS/ 32 | [Rr]eleasePS/ 33 | dlldata.c 34 | 35 | *_i.c 36 | *_p.c 37 | *_i.h 38 | *.ilk 39 | *.meta 40 | *.obj 41 | *.pch 42 | *.pdb 43 | *.pgc 44 | *.pgd 45 | *.rsp 46 | *.sbr 47 | *.tlb 48 | *.tli 49 | *.tlh 50 | *.tmp 51 | *.tmp_proj 52 | *.log 53 | *.vspscc 54 | *.vssscc 55 | .builds 56 | *.pidb 57 | *.svclog 58 | *.scc 59 | 60 | # Chutzpah Test files 61 | _Chutzpah* 62 | 63 | # Visual C++ cache files 64 | ipch/ 65 | *.aps 66 | *.ncb 67 | *.opensdf 68 | *.sdf 69 | *.cachefile 70 | 71 | # Visual Studio profiler 72 | *.psess 73 | *.vsp 74 | *.vspx 75 | 76 | # TFS 2012 Local Workspace 77 | $tf/ 78 | 79 | # Guidance Automation Toolkit 80 | *.gpState 81 | 82 | # ReSharper is a .NET coding add-in 83 | _ReSharper*/ 84 | *.[Rr]e[Ss]harper 85 | *.DotSettings.user 86 | 87 | # JustCode is a .NET coding addin-in 88 | .JustCode 89 | 90 | # TeamCity is a build add-in 91 | _TeamCity* 92 | 93 | # DotCover is a Code Coverage Tool 94 | *.dotCover 95 | 96 | # NCrunch 97 | _NCrunch_* 98 | .*crunch*.local.xml 99 | 100 | # MightyMoose 101 | *.mm.* 102 | AutoTest.Net/ 103 | 104 | # Web workbench (sass) 105 | .sass-cache/ 106 | 107 | # Installshield output folder 108 | [Ee]xpress/ 109 | 110 | # DocProject is a documentation generator add-in 111 | DocProject/buildhelp/ 112 | DocProject/Help/*.HxT 113 | DocProject/Help/*.HxC 114 | DocProject/Help/*.hhc 115 | DocProject/Help/*.hhk 116 | DocProject/Help/*.hhp 117 | DocProject/Help/Html2 118 | DocProject/Help/html 119 | 120 | # Click-Once directory 121 | publish/ 122 | 123 | # Publish Web Output 124 | *.[Pp]ublish.xml 125 | *.azurePubxml 126 | ## TODO: Comment the next line if you want to checkin your 127 | ## web deploy settings but do note that will include unencrypted 128 | ## passwords 129 | #*.pubxml 130 | 131 | # NuGet Packages Directory 132 | packages/* 133 | ## TODO: If the tool you use requires repositories.config 134 | ## uncomment the next line 135 | #!packages/repositories.config 136 | 137 | # Enable "build/" folder in the NuGet Packages folder since 138 | # NuGet packages use it for MSBuild targets. 139 | # This line needs to be after the ignore of the build folder 140 | # (and the packages folder if the line above has been uncommented) 141 | !packages/build/ 142 | 143 | # Windows Azure Build Output 144 | csx/ 145 | *.build.csdef 146 | 147 | # Windows Store app package directory 148 | AppPackages/ 149 | 150 | # Others 151 | sql/ 152 | *.Cache 153 | ClientBin/ 154 | [Ss]tyle[Cc]op.* 155 | ~$* 156 | *~ 157 | *.dbmdl 158 | *.dbproj.schemaview 159 | *.pfx 160 | *.publishsettings 161 | node_modules/ 162 | 163 | # RIA/Silverlight projects 164 | Generated_Code/ 165 | 166 | # Backup & report files from converting an old project file 167 | # to a newer Visual Studio version. Backup files are not needed, 168 | # because we have git ;-) 169 | _UpgradeReport_Files/ 170 | Backup*/ 171 | UpgradeLog*.XML 172 | UpgradeLog*.htm 173 | 174 | # SQL Server files 175 | *.mdf 176 | *.ldf 177 | 178 | # Business Intelligence projects 179 | *.rdl.data 180 | *.bim.layout 181 | *.bim_*.settings 182 | 183 | # Microsoft Fakes 184 | FakesAssemblies/ 185 | 186 | # LightSwitch generated files 187 | GeneratedArtifacts/ 188 | _Pvt_Extensions/ 189 | ModelManifest.xml -------------------------------------------------------------------------------- /Fancy.CoreClrHost/Fancy.CoreClrHost.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Fancy.CoreClrHost 5 | 1.0.1 6 | Fancy.CoreClrHost 7 | Fancy Development - Daniel Murrmann 8 | https://github.com/fancyDevelopment/Fancy.CoreClrHost 9 | false 10 | A lightweight host application to start .NET Core. 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Fancy.CoreClrHost/Fancy.CoreClrHost.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.31101.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Fancy.CoreClrHost", "Fancy.CoreClrHost\Fancy.CoreClrHost.vcxproj", "{F77310F0-04EF-4976-8299-9C9E491801F5}" 7 | EndProject 8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionItems", "SolutionItems", "{D25D5200-2C9E-4271-879E-846EEEA85EE3}" 9 | ProjectSection(SolutionItems) = preProject 10 | Fancy.CoreClrHost.nuspec = Fancy.CoreClrHost.nuspec 11 | EndProjectSection 12 | EndProject 13 | Global 14 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 15 | Debug|Win32 = Debug|Win32 16 | Release|Win32 = Release|Win32 17 | EndGlobalSection 18 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 19 | {F77310F0-04EF-4976-8299-9C9E491801F5}.Debug|Win32.ActiveCfg = Debug|Win32 20 | {F77310F0-04EF-4976-8299-9C9E491801F5}.Debug|Win32.Build.0 = Debug|Win32 21 | {F77310F0-04EF-4976-8299-9C9E491801F5}.Release|Win32.ActiveCfg = Release|Win32 22 | {F77310F0-04EF-4976-8299-9C9E491801F5}.Release|Win32.Build.0 = Release|Win32 23 | EndGlobalSection 24 | GlobalSection(SolutionProperties) = preSolution 25 | HideSolutionNode = FALSE 26 | EndGlobalSection 27 | EndGlobal 28 | -------------------------------------------------------------------------------- /Fancy.CoreClrHost/Fancy.CoreClrHost/CommandLineParser.cpp: -------------------------------------------------------------------------------- 1 | #include "CommandLineParser.h" 2 | 3 | #include "Util.h" 4 | 5 | // Processes the entire command line into the "CommandLineArgs" structure 6 | // Returns true if the processing was successfull; otherwise, false 7 | bool ProcessCommandLine(int argc, _TCHAR* argv[], CommandLineArgs* pCommandLineArgs) 8 | { 9 | // Iterate through each argument and call the process method for each 10 | // Start at the second argument, the first ist the application itself 11 | for (int i = 1; i < argc; i++) 12 | { 13 | wstring currentArg = wstring(argv[i]); 14 | 15 | int endOfCommand = currentArg.find_first_of(L':'); 16 | wstring currentArgName = currentArg.substr(0, endOfCommand); 17 | wstring currentValue = currentArg.substr(endOfCommand + 1, currentArg.length()); 18 | 19 | if (!ProcessCommandLineArg(currentArgName, currentValue, pCommandLineArgs)) 20 | { 21 | return false; 22 | } 23 | } 24 | 25 | return true; 26 | } 27 | 28 | // Processes a single command line argument into the "CommandLineArgs" structure 29 | // Returns true if the processing was successfull; otherwise, false 30 | bool ProcessCommandLineArg(wstring arg, wstring value, CommandLineArgs* pCommandLineArgs) 31 | { 32 | // Check for all parameters and add the value into the correct field of the struct. 33 | if (arg == L"--CoreClrFolderPath") 34 | { 35 | if (!HasEnding(value, L"\\")) 36 | { 37 | printf_s("Argument --CoreClrFolderPath hat to end with a backslash (\\)", value); 38 | return false; 39 | } 40 | 41 | pCommandLineArgs->CoreClrFolderPath = value; 42 | } 43 | else if (arg == L"--AppFolderPath") 44 | { 45 | if (!HasEnding(value, L"\\")) 46 | { 47 | printf_s("Argument --AppFolderPath hat to end with a backslash (\\)", value); 48 | return false; 49 | } 50 | 51 | pCommandLineArgs->AppFolderPath = value; 52 | } 53 | else if (arg == L"--EntryPointAssemblyName") 54 | { 55 | pCommandLineArgs->EntryPointAssemblyName = value; 56 | } 57 | else if (arg == L"--EntryPointTypeName") 58 | { 59 | pCommandLineArgs->EntryPointTypeName = value; 60 | } 61 | else if (arg == L"--EntryPointMethodName") 62 | { 63 | pCommandLineArgs->EntryPointMethodName = value; 64 | } 65 | else 66 | { 67 | printf_s("Unknown argument: %S", arg); 68 | return false; 69 | } 70 | 71 | return true; 72 | } -------------------------------------------------------------------------------- /Fancy.CoreClrHost/Fancy.CoreClrHost/CommandLineParser.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Include common headers 4 | #include "Common.h" 5 | 6 | // Struct to store the provided argument values from command line 7 | struct CommandLineArgs 8 | { 9 | wstring CoreClrFolderPath; 10 | 11 | wstring AppFolderPath; 12 | 13 | wstring EntryPointAssemblyName; 14 | 15 | wstring EntryPointTypeName; 16 | 17 | wstring EntryPointMethodName; 18 | }; 19 | 20 | // Processes the entire command line into the "CommandLineArgs" structure 21 | // Returns true if the processing was successfull; otherwise, false 22 | bool ProcessCommandLine(int argc, _TCHAR* argv[], CommandLineArgs* pCommandLineArgs); 23 | 24 | // Processes a single command line argument into the "CommandLineArgs" structure 25 | // Returns true if the processing was successfull; otherwise, false 26 | bool ProcessCommandLineArg(wstring arg, wstring value, CommandLineArgs* pCommandLineArgs); -------------------------------------------------------------------------------- /Fancy.CoreClrHost/Fancy.CoreClrHost/Common.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Include the windows sdk version. 4 | #include 5 | 6 | // Windows Headers 7 | // Exclude rarely-used stuff from Windows headers 8 | #define WIN32_LEAN_AND_MEAN 9 | #include 10 | 11 | // Include common header files 12 | #include 13 | #include 14 | 15 | // Include common stuff required from standard template library 16 | #include 17 | #include 18 | 19 | using namespace std; -------------------------------------------------------------------------------- /Fancy.CoreClrHost/Fancy.CoreClrHost/Fancy.CoreClrHost.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | {F77310F0-04EF-4976-8299-9C9E491801F5} 15 | Win32Proj 16 | FancyCoreClrHost 17 | 18 | 19 | 20 | Application 21 | true 22 | v140 23 | Unicode 24 | 25 | 26 | Application 27 | false 28 | v140 29 | true 30 | Unicode 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | true 44 | 45 | 46 | false 47 | 48 | 49 | 50 | 51 | 52 | Level3 53 | Disabled 54 | WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) 55 | true 56 | 57 | 58 | 59 | Console 60 | true 61 | 62 | 63 | 64 | 65 | Level3 66 | 67 | 68 | MaxSpeed 69 | true 70 | true 71 | WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) 72 | true 73 | 74 | 75 | Console 76 | true 77 | true 78 | true 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /Fancy.CoreClrHost/Fancy.CoreClrHost/Fancy.CoreClrHost.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | 32 | 33 | Header Files 34 | 35 | 36 | Header Files 37 | 38 | 39 | Header Files 40 | 41 | 42 | Header Files 43 | 44 | 45 | Header Files 46 | 47 | 48 | -------------------------------------------------------------------------------- /Fancy.CoreClrHost/Fancy.CoreClrHost/LoadAndRunCoreClr.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Include common headers 4 | #include "Common.h" 5 | 6 | // Parameters required to load and run the core clr 7 | struct CoreClrStartParams 8 | { 9 | wstring CoreClrFilePath; 10 | 11 | wstring AppBase; 12 | 13 | wstring AppPaths; 14 | 15 | wstring FullTrustedAssembliePaths; 16 | 17 | wstring EntryPointAssemblyName; 18 | 19 | wstring EntryPointTypeName; 20 | 21 | wstring EntryPointMethodName; 22 | }; 23 | 24 | // Loads and runs the core clr with the specified params 25 | bool LoadAndRunCoreClr(CoreClrStartParams* pCoreClrStartupParams); -------------------------------------------------------------------------------- /Fancy.CoreClrHost/Fancy.CoreClrHost/LoadAndRundCoreClr.cpp: -------------------------------------------------------------------------------- 1 | #include "LoadAndRunCoreClr.h" 2 | 3 | #include "mscoree.h" 4 | 5 | // Defines a pointer to a function which is the entry point to the managed code. 6 | typedef void (STDMETHODCALLTYPE *ManagedEntryPoint)(); 7 | 8 | // Loads and runs the core clr with the specified params 9 | bool LoadAndRunCoreClr(CoreClrStartParams* pCoreClrStartupParams) 10 | { 11 | HRESULT hr = S_OK; 12 | ICLRRuntimeHost2* pCLRRuntimeHost = nullptr; 13 | 14 | // Load the CoreCRL dll into the process 15 | HMODULE hCoreCLRModule = ::LoadLibraryExW(pCoreClrStartupParams->CoreClrFilePath.c_str(), NULL, 0); 16 | 17 | if (!hCoreCLRModule) 18 | { 19 | printf_s("Could not load CoreCLR from path %S", pCoreClrStartupParams->CoreClrFilePath.c_str()); 20 | return false; 21 | } 22 | 23 | // Get the "factory" function for the runtime host 24 | FnGetCLRRuntimeHost pfnGetCLRRuntimeHost = (FnGetCLRRuntimeHost)::GetProcAddress(hCoreCLRModule, "GetCLRRuntimeHost"); 25 | 26 | if (!pfnGetCLRRuntimeHost) 27 | { 28 | printf_s("Failed to find export GetCLRRuntimeHost\n"); 29 | return false; 30 | } 31 | 32 | // Create a new instance of the runtime host 33 | hr = pfnGetCLRRuntimeHost(IID_ICLRRuntimeHost2, (IUnknown**)&pCLRRuntimeHost); 34 | 35 | if (FAILED(hr)) 36 | { 37 | printf_s("Failed to get IID_ICLRRuntimeHost2 interface\n"); 38 | return false; 39 | } 40 | 41 | // Set up the startup flags for the clr runtime 42 | STARTUP_FLAGS dwStartupFlags = (STARTUP_FLAGS)( 43 | STARTUP_FLAGS::STARTUP_LOADER_OPTIMIZATION_SINGLE_DOMAIN | 44 | STARTUP_FLAGS::STARTUP_SINGLE_APPDOMAIN | 45 | STARTUP_FLAGS::STARTUP_SERVER_GC 46 | ); 47 | 48 | hr = pCLRRuntimeHost->SetStartupFlags(dwStartupFlags); 49 | 50 | if (FAILED(hr)) 51 | { 52 | printf_s("Failed to set startup flags to the clr runtime\n"); 53 | return false; 54 | } 55 | 56 | // Authenticate with either CORECLR_HOST_AUTHENTICATION_KEY or CORECLR_HOST_AUTHENTICATION_KEY_NONGEN 57 | hr = pCLRRuntimeHost->Authenticate(CORECLR_HOST_AUTHENTICATION_KEY); 58 | 59 | if (FAILED(hr)) 60 | { 61 | printf_s("Failed to Authenticate()\n"); 62 | return false; 63 | } 64 | 65 | hr = pCLRRuntimeHost->Start(); 66 | 67 | if (FAILED(hr)) 68 | { 69 | printf_s("Failed to Start()\n"); 70 | return false; 71 | } 72 | 73 | const wchar_t* property_keys[] = 74 | { 75 | L"APPBASE", 76 | L"TRUSTED_PLATFORM_ASSEMBLIES", 77 | L"APP_PATHS", 78 | }; 79 | 80 | const wchar_t* property_values[] = { 81 | // APPBASE 82 | pCoreClrStartupParams->AppBase.c_str(), 83 | // TRUSTED_PLATFORM_ASSEMBLIES 84 | pCoreClrStartupParams->FullTrustedAssembliePaths.c_str(), 85 | // APP_PATHS 86 | pCoreClrStartupParams->AppPaths.c_str() 87 | }; 88 | 89 | DWORD domainId; 90 | DWORD appDomainFlags = APPDOMAIN_ENABLE_PLATFORM_SPECIFIC_APPS | APPDOMAIN_ENABLE_PINVOKE_AND_CLASSIC_COMINTEROP; 91 | 92 | int nprops = sizeof(property_keys) / sizeof(wchar_t*); 93 | 94 | hr = pCLRRuntimeHost->CreateAppDomainWithManager( 95 | pCoreClrStartupParams->EntryPointAssemblyName.c_str(), 96 | appDomainFlags, 97 | NULL, 98 | NULL, 99 | nprops, 100 | property_keys, 101 | property_values, 102 | &domainId); 103 | 104 | if (FAILED(hr)) 105 | { 106 | wprintf_s(L"Full trusted assemblies: %S\n", pCoreClrStartupParams->FullTrustedAssembliePaths.c_str()); 107 | wprintf_s(L"AppPaths: %S\n", pCoreClrStartupParams->AppPaths.c_str()); 108 | printf_s("Failed to create app domain (%d).\n", hr); 109 | return 1; 110 | } 111 | 112 | ManagedEntryPoint pManagedEntryPoint; 113 | 114 | // Create a delegate to the managed entry point 115 | hr = pCLRRuntimeHost->CreateDelegate( 116 | domainId, 117 | pCoreClrStartupParams->EntryPointAssemblyName.c_str(), 118 | pCoreClrStartupParams->EntryPointTypeName.c_str(), 119 | pCoreClrStartupParams->EntryPointMethodName.c_str(), 120 | (INT_PTR*)&pManagedEntryPoint); 121 | 122 | if (FAILED(hr)) 123 | { 124 | printf_s("Failed to create a delegate to the managed entry point: (%d).\n", hr); 125 | return false; 126 | } 127 | 128 | // Start the managed entry point 129 | pManagedEntryPoint(); 130 | 131 | // Unload the app domain 132 | pCLRRuntimeHost->UnloadAppDomain(domainId, true); 133 | 134 | // Stop the runtime host 135 | pCLRRuntimeHost->Stop(); 136 | 137 | return true; 138 | } -------------------------------------------------------------------------------- /Fancy.CoreClrHost/Fancy.CoreClrHost/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | CONSOLE APPLICATION : Fancy.CoreClrHost Project Overview 3 | ======================================================================== 4 | 5 | AppWizard has created this Fancy.CoreClrHost application for you. 6 | 7 | This file contains a summary of what you will find in each of the files that 8 | make up your Fancy.CoreClrHost application. 9 | 10 | 11 | Fancy.CoreClrHost.vcxproj 12 | This is the main project file for VC++ projects generated using an Application Wizard. 13 | It contains information about the version of Visual C++ that generated the file, and 14 | information about the platforms, configurations, and project features selected with the 15 | Application Wizard. 16 | 17 | Fancy.CoreClrHost.vcxproj.filters 18 | This is the filters file for VC++ projects generated using an Application Wizard. 19 | It contains information about the association between the files in your project 20 | and the filters. This association is used in the IDE to show grouping of files with 21 | similar extensions under a specific node (for e.g. ".cpp" files are associated with the 22 | "Source Files" filter). 23 | 24 | Fancy.CoreClrHost.cpp 25 | This is the main application source file. 26 | 27 | ///////////////////////////////////////////////////////////////////////////// 28 | Other standard files: 29 | 30 | StdAfx.h, StdAfx.cpp 31 | These files are used to build a precompiled header (PCH) file 32 | named Fancy.CoreClrHost.pch and a precompiled types file named StdAfx.obj. 33 | 34 | ///////////////////////////////////////////////////////////////////////////// 35 | Other notes: 36 | 37 | AppWizard uses "TODO:" comments to indicate parts of the source code you 38 | should add to or customize. 39 | 40 | ///////////////////////////////////////////////////////////////////////////// 41 | -------------------------------------------------------------------------------- /Fancy.CoreClrHost/Fancy.CoreClrHost/Util.cpp: -------------------------------------------------------------------------------- 1 | #include "Util.h" 2 | 3 | // Function to check the endig of a string 4 | bool HasEnding(wstring const &fullString, wstring const &ending) 5 | { 6 | if (fullString.length() >= ending.length()) 7 | return (0 == fullString.compare(fullString.length() - ending.length(), ending.length(), ending)); 8 | else 9 | return false; 10 | } 11 | 12 | // Function to list all files in a specific directory with a specified pattern 13 | vector ListFilesInDirectoryByPattern(LPCWSTR directoryName) 14 | { 15 | WIN32_FIND_DATA FindFileData; 16 | HANDLE hFind = ::FindFirstFile(directoryName, &FindFileData); 17 | 18 | vector result; 19 | 20 | result.push_back(wstring(FindFileData.cFileName)); 21 | 22 | while (FindNextFile(hFind, &FindFileData)) 23 | result.push_back(wstring(FindFileData.cFileName)); 24 | 25 | return result; 26 | } -------------------------------------------------------------------------------- /Fancy.CoreClrHost/Fancy.CoreClrHost/Util.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Include common headers 4 | #include "Common.h" 5 | 6 | // Function to check the endig of a string 7 | bool HasEnding(wstring const &fullString, wstring const &ending); 8 | 9 | // Function to list all files in a specific directory with a specified pattern 10 | vector ListFilesInDirectoryByPattern(LPCWSTR directoryName); -------------------------------------------------------------------------------- /Fancy.CoreClrHost/Fancy.CoreClrHost/main.cpp: -------------------------------------------------------------------------------- 1 | #include "main.h" 2 | 3 | #include "Util.h" 4 | 5 | int _tmain(int argc, _TCHAR* argv[]) 6 | { 7 | // Process the command line args 8 | CommandLineArgs commanLineArgs; 9 | if (!ProcessCommandLine(argc, argv, &commanLineArgs)) 10 | { 11 | printf_s("Could not process the command line args.\n"); 12 | printf_s("Press any key to exit.\n"); 13 | getchar(); 14 | return 1; 15 | } 16 | 17 | // Create the core clr startup params from the command line args 18 | CoreClrStartParams coreClrStartupParams; 19 | if (!FillCoreClrStartParams(&commanLineArgs, &coreClrStartupParams)) 20 | { 21 | printf_s("Could create the core clr startup params.\n"); 22 | printf_s("Press any key to exit.\n"); 23 | getchar(); 24 | return 1; 25 | } 26 | 27 | if (!LoadAndRunCoreClr(&coreClrStartupParams)) 28 | { 29 | printf_s("Error on loading the core clr or running the managed code.\n"); 30 | printf_s("Press any key to exit.\n"); 31 | getchar(); 32 | return 1; 33 | } 34 | 35 | return 0; 36 | } 37 | 38 | // Function to fill the "CoreClrStartParams" structure 39 | bool FillCoreClrStartParams(CommandLineArgs* pCommandLineArgs, CoreClrStartParams* pCoreClrStartParams) 40 | { 41 | // Create path to core clr 42 | pCoreClrStartParams->CoreClrFilePath = pCommandLineArgs->CoreClrFolderPath; 43 | pCoreClrStartParams->CoreClrFilePath.append(L"coreclr.dll"); 44 | 45 | // Set up the app base 46 | pCoreClrStartParams->AppBase = pCommandLineArgs->AppFolderPath; 47 | 48 | // Set up the app paths 49 | pCoreClrStartParams->AppPaths = pCommandLineArgs->CoreClrFolderPath + L";" + pCommandLineArgs->AppFolderPath; 50 | 51 | // For simplicity we add here all assemblies of the core clr to the list of fully trusted assemblies 52 | wstring searchPattern = pCommandLineArgs->CoreClrFolderPath; 53 | searchPattern.append(L"*.dll"); 54 | vector files = ListFilesInDirectoryByPattern(searchPattern.c_str()); 55 | 56 | // Append the path to the assemblies to the full path to all full trusted assemblies 57 | wstring fullTrustedAssemblies; 58 | 59 | for (unsigned int i = 0; i < files.size(); i++) 60 | { 61 | fullTrustedAssemblies.append(pCommandLineArgs->CoreClrFolderPath); 62 | fullTrustedAssemblies.append(files[i]); 63 | fullTrustedAssemblies.append(L";"); 64 | } 65 | 66 | pCoreClrStartParams->FullTrustedAssembliePaths = fullTrustedAssemblies; 67 | 68 | // Copy the params regarding the managed entry point 69 | pCoreClrStartParams->EntryPointAssemblyName = pCommandLineArgs->EntryPointAssemblyName; 70 | pCoreClrStartParams->EntryPointTypeName = pCommandLineArgs->EntryPointTypeName; 71 | pCoreClrStartParams->EntryPointMethodName = pCommandLineArgs->EntryPointMethodName; 72 | 73 | return true; 74 | } 75 | 76 | -------------------------------------------------------------------------------- /Fancy.CoreClrHost/Fancy.CoreClrHost/main.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Include common headers 4 | #include "Common.h" 5 | 6 | // Include required headers from application 7 | #include "CommandLineParser.h" 8 | #include "LoadAndRunCoreClr.h" 9 | 10 | // Function to fill the "CoreClrStartParams" structure 11 | bool FillCoreClrStartParams(CommandLineArgs* pCommandLineArgs, CoreClrStartParams* pCoreClrStartParams); -------------------------------------------------------------------------------- /Fancy.CoreClrHost/Fancy.CoreClrHost/mscoree.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* this ALWAYS GENERATED file contains the definitions for the interfaces */ 4 | 5 | 6 | /* File created by MIDL compiler version 8.00.0595 */ 7 | /* @@MIDL_FILE_HEADING( ) */ 8 | 9 | #pragma warning( disable: 4049 ) /* more than 64k source lines */ 10 | 11 | 12 | /* verify that the version is high enough to compile this file*/ 13 | #ifndef __REQUIRED_RPCNDR_H_VERSION__ 14 | #define __REQUIRED_RPCNDR_H_VERSION__ 475 15 | #endif 16 | 17 | #include "rpc.h" 18 | #include "rpcndr.h" 19 | 20 | #ifndef __RPCNDR_H_VERSION__ 21 | #error this stub requires an updated version of 22 | #endif // __RPCNDR_H_VERSION__ 23 | 24 | #ifndef COM_NO_WINDOWS_H 25 | #include "windows.h" 26 | #include "ole2.h" 27 | #endif /*COM_NO_WINDOWS_H*/ 28 | 29 | #ifndef __mscoree_h__ 30 | #define __mscoree_h__ 31 | 32 | #if defined(_MSC_VER) && (_MSC_VER >= 1020) 33 | #pragma once 34 | #endif 35 | 36 | /* Forward Declarations */ 37 | 38 | #ifndef __IDebuggerThreadControl_FWD_DEFINED__ 39 | #define __IDebuggerThreadControl_FWD_DEFINED__ 40 | typedef interface IDebuggerThreadControl IDebuggerThreadControl; 41 | 42 | #endif /* __IDebuggerThreadControl_FWD_DEFINED__ */ 43 | 44 | 45 | #ifndef __IDebuggerInfo_FWD_DEFINED__ 46 | #define __IDebuggerInfo_FWD_DEFINED__ 47 | typedef interface IDebuggerInfo IDebuggerInfo; 48 | 49 | #endif /* __IDebuggerInfo_FWD_DEFINED__ */ 50 | 51 | 52 | #ifndef __ICLRErrorReportingManager_FWD_DEFINED__ 53 | #define __ICLRErrorReportingManager_FWD_DEFINED__ 54 | typedef interface ICLRErrorReportingManager ICLRErrorReportingManager; 55 | 56 | #endif /* __ICLRErrorReportingManager_FWD_DEFINED__ */ 57 | 58 | 59 | #ifndef __ICLRErrorReportingManager2_FWD_DEFINED__ 60 | #define __ICLRErrorReportingManager2_FWD_DEFINED__ 61 | typedef interface ICLRErrorReportingManager2 ICLRErrorReportingManager2; 62 | 63 | #endif /* __ICLRErrorReportingManager2_FWD_DEFINED__ */ 64 | 65 | 66 | #ifndef __ICLRPolicyManager_FWD_DEFINED__ 67 | #define __ICLRPolicyManager_FWD_DEFINED__ 68 | typedef interface ICLRPolicyManager ICLRPolicyManager; 69 | 70 | #endif /* __ICLRPolicyManager_FWD_DEFINED__ */ 71 | 72 | 73 | #ifndef __ICLRGCManager_FWD_DEFINED__ 74 | #define __ICLRGCManager_FWD_DEFINED__ 75 | typedef interface ICLRGCManager ICLRGCManager; 76 | 77 | #endif /* __ICLRGCManager_FWD_DEFINED__ */ 78 | 79 | 80 | #ifndef __ICLRGCManager2_FWD_DEFINED__ 81 | #define __ICLRGCManager2_FWD_DEFINED__ 82 | typedef interface ICLRGCManager2 ICLRGCManager2; 83 | 84 | #endif /* __ICLRGCManager2_FWD_DEFINED__ */ 85 | 86 | 87 | #ifndef __IHostControl_FWD_DEFINED__ 88 | #define __IHostControl_FWD_DEFINED__ 89 | typedef interface IHostControl IHostControl; 90 | 91 | #endif /* __IHostControl_FWD_DEFINED__ */ 92 | 93 | 94 | #ifndef __ICLRControl_FWD_DEFINED__ 95 | #define __ICLRControl_FWD_DEFINED__ 96 | typedef interface ICLRControl ICLRControl; 97 | 98 | #endif /* __ICLRControl_FWD_DEFINED__ */ 99 | 100 | 101 | #ifndef __ICLRRuntimeHost_FWD_DEFINED__ 102 | #define __ICLRRuntimeHost_FWD_DEFINED__ 103 | typedef interface ICLRRuntimeHost ICLRRuntimeHost; 104 | 105 | #endif /* __ICLRRuntimeHost_FWD_DEFINED__ */ 106 | 107 | 108 | #ifndef __ICLRRuntimeHost2_FWD_DEFINED__ 109 | #define __ICLRRuntimeHost2_FWD_DEFINED__ 110 | typedef interface ICLRRuntimeHost2 ICLRRuntimeHost2; 111 | 112 | #endif /* __ICLRRuntimeHost2_FWD_DEFINED__ */ 113 | 114 | 115 | #ifndef __ICLRExecutionManager_FWD_DEFINED__ 116 | #define __ICLRExecutionManager_FWD_DEFINED__ 117 | typedef interface ICLRExecutionManager ICLRExecutionManager; 118 | 119 | #endif /* __ICLRExecutionManager_FWD_DEFINED__ */ 120 | 121 | 122 | #ifndef __IHostNetCFDebugControlManager_FWD_DEFINED__ 123 | #define __IHostNetCFDebugControlManager_FWD_DEFINED__ 124 | typedef interface IHostNetCFDebugControlManager IHostNetCFDebugControlManager; 125 | 126 | #endif /* __IHostNetCFDebugControlManager_FWD_DEFINED__ */ 127 | 128 | 129 | #ifndef __ITypeName_FWD_DEFINED__ 130 | #define __ITypeName_FWD_DEFINED__ 131 | typedef interface ITypeName ITypeName; 132 | 133 | #endif /* __ITypeName_FWD_DEFINED__ */ 134 | 135 | 136 | #ifndef __ITypeNameBuilder_FWD_DEFINED__ 137 | #define __ITypeNameBuilder_FWD_DEFINED__ 138 | typedef interface ITypeNameBuilder ITypeNameBuilder; 139 | 140 | #endif /* __ITypeNameBuilder_FWD_DEFINED__ */ 141 | 142 | 143 | #ifndef __ITypeNameFactory_FWD_DEFINED__ 144 | #define __ITypeNameFactory_FWD_DEFINED__ 145 | typedef interface ITypeNameFactory ITypeNameFactory; 146 | 147 | #endif /* __ITypeNameFactory_FWD_DEFINED__ */ 148 | 149 | 150 | #ifndef __IManagedObject_FWD_DEFINED__ 151 | #define __IManagedObject_FWD_DEFINED__ 152 | typedef interface IManagedObject IManagedObject; 153 | 154 | #endif /* __IManagedObject_FWD_DEFINED__ */ 155 | 156 | 157 | #ifndef __ComCallUnmarshal_FWD_DEFINED__ 158 | #define __ComCallUnmarshal_FWD_DEFINED__ 159 | 160 | #ifdef __cplusplus 161 | typedef class ComCallUnmarshal ComCallUnmarshal; 162 | #else 163 | typedef struct ComCallUnmarshal ComCallUnmarshal; 164 | #endif /* __cplusplus */ 165 | 166 | #endif /* __ComCallUnmarshal_FWD_DEFINED__ */ 167 | 168 | 169 | #ifndef __ComCallUnmarshalV4_FWD_DEFINED__ 170 | #define __ComCallUnmarshalV4_FWD_DEFINED__ 171 | 172 | #ifdef __cplusplus 173 | typedef class ComCallUnmarshalV4 ComCallUnmarshalV4; 174 | #else 175 | typedef struct ComCallUnmarshalV4 ComCallUnmarshalV4; 176 | #endif /* __cplusplus */ 177 | 178 | #endif /* __ComCallUnmarshalV4_FWD_DEFINED__ */ 179 | 180 | 181 | #ifndef __CLRRuntimeHost_FWD_DEFINED__ 182 | #define __CLRRuntimeHost_FWD_DEFINED__ 183 | 184 | #ifdef __cplusplus 185 | typedef class CLRRuntimeHost CLRRuntimeHost; 186 | #else 187 | typedef struct CLRRuntimeHost CLRRuntimeHost; 188 | #endif /* __cplusplus */ 189 | 190 | #endif /* __CLRRuntimeHost_FWD_DEFINED__ */ 191 | 192 | 193 | #ifndef __TypeNameFactory_FWD_DEFINED__ 194 | #define __TypeNameFactory_FWD_DEFINED__ 195 | 196 | #ifdef __cplusplus 197 | typedef class TypeNameFactory TypeNameFactory; 198 | #else 199 | typedef struct TypeNameFactory TypeNameFactory; 200 | #endif /* __cplusplus */ 201 | 202 | #endif /* __TypeNameFactory_FWD_DEFINED__ */ 203 | 204 | 205 | #ifndef __ICLRAppDomainResourceMonitor_FWD_DEFINED__ 206 | #define __ICLRAppDomainResourceMonitor_FWD_DEFINED__ 207 | typedef interface ICLRAppDomainResourceMonitor ICLRAppDomainResourceMonitor; 208 | 209 | #endif /* __ICLRAppDomainResourceMonitor_FWD_DEFINED__ */ 210 | 211 | 212 | /* header files for imported files */ 213 | #include "unknwn.h" 214 | #include "gchost.h" 215 | #include "ivalidator.h" 216 | 217 | #ifdef __cplusplus 218 | extern "C"{ 219 | #endif 220 | 221 | 222 | /* interface __MIDL_itf_mscoree_0000_0000 */ 223 | /* [local] */ 224 | 225 | #define DECLARE_DEPRECATED 226 | #define DEPRECATED_CLR_STDAPI STDAPI 227 | 228 | #define CLR_MAJOR_VERSION ( 4 ) 229 | 230 | #define CLR_MINOR_VERSION ( 0 ) 231 | 232 | #define CLR_BUILD_VERSION ( 20322 ) 233 | 234 | #define CLR_ASSEMBLY_MAJOR_VERSION ( 4 ) 235 | 236 | #define CLR_ASSEMBLY_MINOR_VERSION ( 0 ) 237 | 238 | #define CLR_ASSEMBLY_BUILD_VERSION ( 0 ) 239 | 240 | EXTERN_GUID(CLSID_TypeNameFactory, 0xB81FF171, 0x20F3, 0x11d2, 0x8d, 0xcc, 0x00, 0xa0, 0xc9, 0xb0, 0x05, 0x25); 241 | EXTERN_GUID(CLSID_ComCallUnmarshal, 0x3F281000,0xE95A,0x11d2,0x88,0x6B,0x00,0xC0,0x4F,0x86,0x9F,0x04); 242 | EXTERN_GUID(CLSID_ComCallUnmarshalV4, 0x45fb4600,0xe6e8,0x4928,0xb2,0x5e,0x50,0x47,0x6f,0xf7,0x94,0x25); 243 | EXTERN_GUID(IID_IManagedObject, 0xc3fcc19e, 0xa970, 0x11d2, 0x8b, 0x5a, 0x00, 0xa0, 0xc9, 0xb7, 0xc9, 0xc4); 244 | EXTERN_GUID(IID_ICLRAppDomainResourceMonitor, 0XC62DE18C, 0X2E23, 0X4AEA, 0X84, 0X23, 0XB4, 0X0C, 0X1F, 0XC5, 0X9E, 0XAE); 245 | EXTERN_GUID(IID_ICLRPolicyManager, 0x7D290010, 0xD781, 0x45da, 0xA6, 0xF8, 0xAA, 0x5D, 0x71, 0x1A, 0x73, 0x0E); 246 | EXTERN_GUID(IID_ICLRGCManager, 0x54D9007E, 0xA8E2, 0x4885, 0xB7, 0xBF, 0xF9, 0x98, 0xDE, 0xEE, 0x4F, 0x2A); 247 | EXTERN_GUID(IID_ICLRGCManager2, 0x0603B793, 0xA97A, 0x4712, 0x9C, 0xB4, 0x0C, 0xD1, 0xC7, 0x4C, 0x0F, 0x7C); 248 | EXTERN_GUID(IID_ICLRErrorReportingManager, 0x980d2f1a, 0xbf79, 0x4c08, 0x81, 0x2a, 0xbb, 0x97, 0x78, 0x92, 0x8f, 0x78); 249 | EXTERN_GUID(IID_ICLRErrorReportingManager2, 0xc68f63b1, 0x4d8b, 0x4e0b, 0x95, 0x64, 0x9d, 0x2e, 0xfe, 0x2f, 0xa1, 0x8c); 250 | EXTERN_GUID(IID_ICLRRuntimeHost, 0x90F1A06C, 0x7712, 0x4762, 0x86, 0xB5, 0x7A, 0x5E, 0xBA, 0x6B, 0xDB, 0x02); 251 | EXTERN_GUID(IID_ICLRRuntimeHost2, 0x712AB73F, 0x2C22, 0x4807, 0xAD, 0x7E, 0xF5, 0x01, 0xD7, 0xb7, 0x2C, 0x2D); 252 | EXTERN_GUID(IID_ICLRExecutionManager, 0x1000A3E7, 0xB420, 0x4620, 0xAE, 0x30, 0xFB, 0x19, 0xB5, 0x87, 0xAD, 0x1D); 253 | EXTERN_GUID(IID_ITypeName, 0xB81FF171, 0x20F3, 0x11d2, 0x8d, 0xcc, 0x00, 0xa0, 0xc9, 0xb0, 0x05, 0x22); 254 | EXTERN_GUID(IID_ITypeNameBuilder, 0xB81FF171, 0x20F3, 0x11d2, 0x8d, 0xcc, 0x00, 0xa0, 0xc9, 0xb0, 0x05, 0x23); 255 | EXTERN_GUID(IID_ITypeNameFactory, 0xB81FF171, 0x20F3, 0x11d2, 0x8d, 0xcc, 0x00, 0xa0, 0xc9, 0xb0, 0x05, 0x21); 256 | DEPRECATED_CLR_STDAPI GetCORSystemDirectory(_Out_writes_to_(cchBuffer, *dwLength) LPWSTR pbuffer, DWORD cchBuffer, DWORD* dwLength); 257 | DEPRECATED_CLR_STDAPI GetCORVersion(_Out_writes_to_(cchBuffer, *dwLength) LPWSTR pbBuffer, DWORD cchBuffer, DWORD* dwLength); 258 | DEPRECATED_CLR_STDAPI GetFileVersion(LPCWSTR szFilename, _Out_writes_to_opt_(cchBuffer, *dwLength) LPWSTR szBuffer, DWORD cchBuffer, DWORD* dwLength); 259 | DEPRECATED_CLR_STDAPI GetCORRequiredVersion(_Out_writes_to_(cchBuffer, *dwLength) LPWSTR pbuffer, DWORD cchBuffer, DWORD* dwLength); 260 | DEPRECATED_CLR_STDAPI GetRequestedRuntimeInfo(LPCWSTR pExe, LPCWSTR pwszVersion, LPCWSTR pConfigurationFile, DWORD startupFlags, DWORD runtimeInfoFlags, _Out_writes_opt_(dwDirectory) LPWSTR pDirectory, DWORD dwDirectory, _Out_opt_ DWORD *dwDirectoryLength, _Out_writes_opt_(cchBuffer) LPWSTR pVersion, DWORD cchBuffer, _Out_opt_ DWORD* dwlength); 261 | DEPRECATED_CLR_STDAPI GetRequestedRuntimeVersion(_In_ LPWSTR pExe, _Out_writes_to_(cchBuffer, *pdwLength) LPWSTR pVersion, DWORD cchBuffer, _Out_ DWORD* dwLength); 262 | DEPRECATED_CLR_STDAPI CorBindToRuntimeHost(LPCWSTR pwszVersion, LPCWSTR pwszBuildFlavor, LPCWSTR pwszHostConfigFile, VOID* pReserved, DWORD startupFlags, REFCLSID rclsid, REFIID riid, LPVOID FAR *ppv); 263 | DEPRECATED_CLR_STDAPI CorBindToRuntimeEx(LPCWSTR pwszVersion, LPCWSTR pwszBuildFlavor, DWORD startupFlags, REFCLSID rclsid, REFIID riid, LPVOID FAR *ppv); 264 | DEPRECATED_CLR_STDAPI CorBindToRuntimeByCfg(IStream* pCfgStream, DWORD reserved, DWORD startupFlags, REFCLSID rclsid,REFIID riid, LPVOID FAR* ppv); 265 | DEPRECATED_CLR_STDAPI CorBindToRuntime(LPCWSTR pwszVersion, LPCWSTR pwszBuildFlavor, REFCLSID rclsid, REFIID riid, LPVOID FAR *ppv); 266 | DEPRECATED_CLR_STDAPI CorBindToCurrentRuntime(LPCWSTR pwszFileName, REFCLSID rclsid, REFIID riid, LPVOID FAR *ppv); 267 | DEPRECATED_CLR_STDAPI ClrCreateManagedInstance(LPCWSTR pTypeName, REFIID riid, void **ppObject); 268 | DECLARE_DEPRECATED void STDMETHODCALLTYPE CorMarkThreadInThreadPool(); 269 | DEPRECATED_CLR_STDAPI RunDll32ShimW(HWND hwnd, HINSTANCE hinst, LPCWSTR lpszCmdLine, int nCmdShow); 270 | DEPRECATED_CLR_STDAPI LoadLibraryShim(LPCWSTR szDllName, LPCWSTR szVersion, LPVOID pvReserved, HMODULE *phModDll); 271 | DEPRECATED_CLR_STDAPI CallFunctionShim(LPCWSTR szDllName, LPCSTR szFunctionName, LPVOID lpvArgument1, LPVOID lpvArgument2, LPCWSTR szVersion, LPVOID pvReserved); 272 | DEPRECATED_CLR_STDAPI GetRealProcAddress(LPCSTR pwszProcName, VOID** ppv); 273 | DECLARE_DEPRECATED void STDMETHODCALLTYPE CorExitProcess(int exitCode); 274 | DEPRECATED_CLR_STDAPI LoadStringRC(UINT iResouceID, _Out_writes_z_(iMax) LPWSTR szBuffer, int iMax, int bQuiet); 275 | typedef HRESULT (__stdcall *FLockClrVersionCallback) (); 276 | DEPRECATED_CLR_STDAPI LockClrVersion(FLockClrVersionCallback hostCallback,FLockClrVersionCallback *pBeginHostSetup,FLockClrVersionCallback *pEndHostSetup); 277 | DEPRECATED_CLR_STDAPI CreateDebuggingInterfaceFromVersion(int iDebuggerVersion, LPCWSTR szDebuggeeVersion, IUnknown ** ppCordb); 278 | DEPRECATED_CLR_STDAPI GetVersionFromProcess(HANDLE hProcess, _Out_writes_to_(cchBuffer, *pdwLength) LPWSTR pVersion, DWORD cchBuffer, _Out_ DWORD* dwLength); 279 | typedef HRESULT (STDAPICALLTYPE *FnGetCLRRuntimeHost)(REFIID riid, IUnknown **pUnk); 280 | typedef /* [public] */ 281 | enum __MIDL___MIDL_itf_mscoree_0000_0000_0001 282 | { 283 | HOST_TYPE_DEFAULT = 0, 284 | HOST_TYPE_APPLAUNCH = 0x1, 285 | HOST_TYPE_CORFLAG = 0x2 286 | } HOST_TYPE; 287 | 288 | STDAPI CorLaunchApplication(HOST_TYPE dwClickOnceHost, LPCWSTR pwzAppFullName, DWORD dwManifestPaths, LPCWSTR* ppwzManifestPaths, DWORD dwActivationData, LPCWSTR* ppwzActivationData, LPPROCESS_INFORMATION lpProcessInformation); 289 | typedef HRESULT ( __stdcall *FExecuteInAppDomainCallback )( 290 | void *cookie); 291 | 292 | typedef /* [public][public] */ 293 | enum __MIDL___MIDL_itf_mscoree_0000_0000_0002 294 | { 295 | STARTUP_CONCURRENT_GC = 0x1, 296 | STARTUP_LOADER_OPTIMIZATION_MASK = ( 0x3 << 1 ) , 297 | STARTUP_LOADER_OPTIMIZATION_SINGLE_DOMAIN = ( 0x1 << 1 ) , 298 | STARTUP_LOADER_OPTIMIZATION_MULTI_DOMAIN = ( 0x2 << 1 ) , 299 | STARTUP_LOADER_OPTIMIZATION_MULTI_DOMAIN_HOST = ( 0x3 << 1 ) , 300 | STARTUP_LOADER_SAFEMODE = 0x10, 301 | STARTUP_LOADER_SETPREFERENCE = 0x100, 302 | STARTUP_SERVER_GC = 0x1000, 303 | STARTUP_HOARD_GC_VM = 0x2000, 304 | STARTUP_SINGLE_VERSION_HOSTING_INTERFACE = 0x4000, 305 | STARTUP_LEGACY_IMPERSONATION = 0x10000, 306 | STARTUP_DISABLE_COMMITTHREADSTACK = 0x20000, 307 | STARTUP_ALWAYSFLOW_IMPERSONATION = 0x40000, 308 | STARTUP_TRIM_GC_COMMIT = 0x80000, 309 | STARTUP_ETW = 0x100000, 310 | STARTUP_ARM = 0x400000, 311 | STARTUP_SINGLE_APPDOMAIN = 0x800000 312 | } STARTUP_FLAGS; 313 | 314 | typedef /* [public] */ 315 | enum __MIDL___MIDL_itf_mscoree_0000_0000_0003 316 | { 317 | CLSID_RESOLUTION_DEFAULT = 0, 318 | CLSID_RESOLUTION_REGISTERED = 0x1 319 | } CLSID_RESOLUTION_FLAGS; 320 | 321 | typedef /* [public] */ 322 | enum __MIDL___MIDL_itf_mscoree_0000_0000_0004 323 | { 324 | RUNTIME_INFO_UPGRADE_VERSION = 0x1, 325 | RUNTIME_INFO_REQUEST_IA64 = 0x2, 326 | RUNTIME_INFO_REQUEST_AMD64 = 0x4, 327 | RUNTIME_INFO_REQUEST_X86 = 0x8, 328 | RUNTIME_INFO_DONT_RETURN_DIRECTORY = 0x10, 329 | RUNTIME_INFO_DONT_RETURN_VERSION = 0x20, 330 | RUNTIME_INFO_DONT_SHOW_ERROR_DIALOG = 0x40, 331 | RUNTIME_INFO_IGNORE_ERROR_MODE = 0x1000 332 | } RUNTIME_INFO_FLAGS; 333 | 334 | typedef /* [public] */ 335 | enum __MIDL___MIDL_itf_mscoree_0000_0000_0005 336 | { 337 | APPDOMAIN_SECURITY_DEFAULT = 0, 338 | APPDOMAIN_SECURITY_SANDBOXED = 0x1, 339 | APPDOMAIN_SECURITY_FORBID_CROSSAD_REVERSE_PINVOKE = 0x2, 340 | APPDOMAIN_IGNORE_UNHANDLED_EXCEPTIONS = 0x4, 341 | APPDOMAIN_FORCE_TRIVIAL_WAIT_OPERATIONS = 0x8, 342 | APPDOMAIN_ENABLE_PINVOKE_AND_CLASSIC_COMINTEROP = 0x10, 343 | APPDOMAIN_SET_TEST_KEY = 0x20, 344 | APPDOMAIN_ENABLE_PLATFORM_SPECIFIC_APPS = 0x40, 345 | APPDOMAIN_ENABLE_ASSEMBLY_LOADFILE = 0x80 346 | } APPDOMAIN_SECURITY_FLAGS; 347 | 348 | STDAPI GetRequestedRuntimeVersionForCLSID(REFCLSID rclsid, _Out_writes_opt_(cchBuffer) LPWSTR pVersion, DWORD cchBuffer, _Out_opt_ DWORD* dwLength, CLSID_RESOLUTION_FLAGS dwResolutionFlags); 349 | EXTERN_GUID(IID_IDebuggerThreadControl, 0x23d86786, 0x0bb5, 0x4774, 0x8f, 0xb5, 0xe3, 0x52, 0x2a, 0xdd, 0x62, 0x46); 350 | 351 | 352 | extern RPC_IF_HANDLE __MIDL_itf_mscoree_0000_0000_v0_0_c_ifspec; 353 | extern RPC_IF_HANDLE __MIDL_itf_mscoree_0000_0000_v0_0_s_ifspec; 354 | 355 | #ifndef __IDebuggerThreadControl_INTERFACE_DEFINED__ 356 | #define __IDebuggerThreadControl_INTERFACE_DEFINED__ 357 | 358 | /* interface IDebuggerThreadControl */ 359 | /* [object][local][unique][helpstring][version][uuid] */ 360 | 361 | 362 | EXTERN_C const IID IID_IDebuggerThreadControl; 363 | 364 | #if defined(__cplusplus) && !defined(CINTERFACE) 365 | 366 | MIDL_INTERFACE("23D86786-0BB5-4774-8FB5-E3522ADD6246") 367 | IDebuggerThreadControl : public IUnknown 368 | { 369 | public: 370 | virtual HRESULT STDMETHODCALLTYPE ThreadIsBlockingForDebugger( void) = 0; 371 | 372 | virtual HRESULT STDMETHODCALLTYPE ReleaseAllRuntimeThreads( void) = 0; 373 | 374 | virtual HRESULT STDMETHODCALLTYPE StartBlockingForDebugger( 375 | DWORD dwUnused) = 0; 376 | 377 | }; 378 | 379 | 380 | #else /* C style interface */ 381 | 382 | typedef struct IDebuggerThreadControlVtbl 383 | { 384 | BEGIN_INTERFACE 385 | 386 | HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 387 | IDebuggerThreadControl * This, 388 | /* [in] */ REFIID riid, 389 | /* [annotation][iid_is][out] */ 390 | _COM_Outptr_ void **ppvObject); 391 | 392 | ULONG ( STDMETHODCALLTYPE *AddRef )( 393 | IDebuggerThreadControl * This); 394 | 395 | ULONG ( STDMETHODCALLTYPE *Release )( 396 | IDebuggerThreadControl * This); 397 | 398 | HRESULT ( STDMETHODCALLTYPE *ThreadIsBlockingForDebugger )( 399 | IDebuggerThreadControl * This); 400 | 401 | HRESULT ( STDMETHODCALLTYPE *ReleaseAllRuntimeThreads )( 402 | IDebuggerThreadControl * This); 403 | 404 | HRESULT ( STDMETHODCALLTYPE *StartBlockingForDebugger )( 405 | IDebuggerThreadControl * This, 406 | DWORD dwUnused); 407 | 408 | END_INTERFACE 409 | } IDebuggerThreadControlVtbl; 410 | 411 | interface IDebuggerThreadControl 412 | { 413 | CONST_VTBL struct IDebuggerThreadControlVtbl *lpVtbl; 414 | }; 415 | 416 | 417 | 418 | #ifdef COBJMACROS 419 | 420 | 421 | #define IDebuggerThreadControl_QueryInterface(This,riid,ppvObject) \ 422 | ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 423 | 424 | #define IDebuggerThreadControl_AddRef(This) \ 425 | ( (This)->lpVtbl -> AddRef(This) ) 426 | 427 | #define IDebuggerThreadControl_Release(This) \ 428 | ( (This)->lpVtbl -> Release(This) ) 429 | 430 | 431 | #define IDebuggerThreadControl_ThreadIsBlockingForDebugger(This) \ 432 | ( (This)->lpVtbl -> ThreadIsBlockingForDebugger(This) ) 433 | 434 | #define IDebuggerThreadControl_ReleaseAllRuntimeThreads(This) \ 435 | ( (This)->lpVtbl -> ReleaseAllRuntimeThreads(This) ) 436 | 437 | #define IDebuggerThreadControl_StartBlockingForDebugger(This,dwUnused) \ 438 | ( (This)->lpVtbl -> StartBlockingForDebugger(This,dwUnused) ) 439 | 440 | #endif /* COBJMACROS */ 441 | 442 | 443 | #endif /* C style interface */ 444 | 445 | 446 | 447 | 448 | #endif /* __IDebuggerThreadControl_INTERFACE_DEFINED__ */ 449 | 450 | 451 | /* interface __MIDL_itf_mscoree_0000_0001 */ 452 | /* [local] */ 453 | 454 | EXTERN_GUID(IID_IDebuggerInfo, 0xbf24142d, 0xa47d, 0x4d24, 0xa6, 0x6d, 0x8c, 0x21, 0x41, 0x94, 0x4e, 0x44); 455 | 456 | 457 | extern RPC_IF_HANDLE __MIDL_itf_mscoree_0000_0001_v0_0_c_ifspec; 458 | extern RPC_IF_HANDLE __MIDL_itf_mscoree_0000_0001_v0_0_s_ifspec; 459 | 460 | #ifndef __IDebuggerInfo_INTERFACE_DEFINED__ 461 | #define __IDebuggerInfo_INTERFACE_DEFINED__ 462 | 463 | /* interface IDebuggerInfo */ 464 | /* [object][local][unique][helpstring][version][uuid] */ 465 | 466 | 467 | EXTERN_C const IID IID_IDebuggerInfo; 468 | 469 | #if defined(__cplusplus) && !defined(CINTERFACE) 470 | 471 | MIDL_INTERFACE("BF24142D-A47D-4d24-A66D-8C2141944E44") 472 | IDebuggerInfo : public IUnknown 473 | { 474 | public: 475 | virtual HRESULT STDMETHODCALLTYPE IsDebuggerAttached( 476 | /* [out] */ BOOL *pbAttached) = 0; 477 | 478 | }; 479 | 480 | 481 | #else /* C style interface */ 482 | 483 | typedef struct IDebuggerInfoVtbl 484 | { 485 | BEGIN_INTERFACE 486 | 487 | HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 488 | IDebuggerInfo * This, 489 | /* [in] */ REFIID riid, 490 | /* [annotation][iid_is][out] */ 491 | _COM_Outptr_ void **ppvObject); 492 | 493 | ULONG ( STDMETHODCALLTYPE *AddRef )( 494 | IDebuggerInfo * This); 495 | 496 | ULONG ( STDMETHODCALLTYPE *Release )( 497 | IDebuggerInfo * This); 498 | 499 | HRESULT ( STDMETHODCALLTYPE *IsDebuggerAttached )( 500 | IDebuggerInfo * This, 501 | /* [out] */ BOOL *pbAttached); 502 | 503 | END_INTERFACE 504 | } IDebuggerInfoVtbl; 505 | 506 | interface IDebuggerInfo 507 | { 508 | CONST_VTBL struct IDebuggerInfoVtbl *lpVtbl; 509 | }; 510 | 511 | 512 | 513 | #ifdef COBJMACROS 514 | 515 | 516 | #define IDebuggerInfo_QueryInterface(This,riid,ppvObject) \ 517 | ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 518 | 519 | #define IDebuggerInfo_AddRef(This) \ 520 | ( (This)->lpVtbl -> AddRef(This) ) 521 | 522 | #define IDebuggerInfo_Release(This) \ 523 | ( (This)->lpVtbl -> Release(This) ) 524 | 525 | 526 | #define IDebuggerInfo_IsDebuggerAttached(This,pbAttached) \ 527 | ( (This)->lpVtbl -> IsDebuggerAttached(This,pbAttached) ) 528 | 529 | #endif /* COBJMACROS */ 530 | 531 | 532 | #endif /* C style interface */ 533 | 534 | 535 | 536 | 537 | #endif /* __IDebuggerInfo_INTERFACE_DEFINED__ */ 538 | 539 | 540 | /* interface __MIDL_itf_mscoree_0000_0002 */ 541 | /* [local] */ 542 | 543 | typedef void *HDOMAINENUM; 544 | 545 | typedef /* [public] */ 546 | enum __MIDL___MIDL_itf_mscoree_0000_0002_0001 547 | { 548 | eMemoryAvailableLow = 1, 549 | eMemoryAvailableNeutral = 2, 550 | eMemoryAvailableHigh = 3 551 | } EMemoryAvailable; 552 | 553 | typedef /* [public] */ 554 | enum __MIDL___MIDL_itf_mscoree_0000_0002_0002 555 | { 556 | eTaskCritical = 0, 557 | eAppDomainCritical = 1, 558 | eProcessCritical = 2 559 | } EMemoryCriticalLevel; 560 | 561 | typedef /* [public] */ 562 | enum __MIDL___MIDL_itf_mscoree_0000_0002_0003 563 | { 564 | WAIT_MSGPUMP = 0x1, 565 | WAIT_ALERTABLE = 0x2, 566 | WAIT_NOTINDEADLOCK = 0x4 567 | } WAIT_OPTION; 568 | 569 | typedef UINT64 TASKID; 570 | 571 | typedef DWORD CONNID; 572 | 573 | typedef 574 | enum ETaskType 575 | { 576 | TT_DEBUGGERHELPER = 0x1, 577 | TT_GC = 0x2, 578 | TT_FINALIZER = 0x4, 579 | TT_THREADPOOL_TIMER = 0x8, 580 | TT_THREADPOOL_GATE = 0x10, 581 | TT_THREADPOOL_WORKER = 0x20, 582 | TT_THREADPOOL_IOCOMPLETION = 0x40, 583 | TT_ADUNLOAD = 0x80, 584 | TT_USER = 0x100, 585 | TT_THREADPOOL_WAIT = 0x200, 586 | TT_UNKNOWN = 0x80000000 587 | } ETaskType; 588 | 589 | typedef /* [public] */ 590 | enum __MIDL___MIDL_itf_mscoree_0000_0002_0004 591 | { 592 | eSymbolReadingNever = 0, 593 | eSymbolReadingAlways = 1, 594 | eSymbolReadingFullTrustOnly = 2 595 | } ESymbolReadingPolicy; 596 | 597 | typedef /* [public][public] */ 598 | enum __MIDL___MIDL_itf_mscoree_0000_0002_0005 599 | { 600 | DUMP_FLAVOR_Mini = 0, 601 | DUMP_FLAVOR_CriticalCLRState = 1, 602 | DUMP_FLAVOR_NonHeapCLRState = 2, 603 | DUMP_FLAVOR_Default = DUMP_FLAVOR_Mini 604 | } ECustomDumpFlavor; 605 | 606 | typedef /* [public][public][public] */ 607 | enum __MIDL___MIDL_itf_mscoree_0000_0002_0006 608 | { 609 | DUMP_ITEM_None = 0 610 | } ECustomDumpItemKind; 611 | 612 | typedef /* [public][public] */ struct __MIDL___MIDL_itf_mscoree_0000_0002_0007 613 | { 614 | ECustomDumpItemKind itemKind; 615 | union 616 | { 617 | UINT_PTR pReserved; 618 | } ; 619 | } CustomDumpItem; 620 | 621 | #define BucketParamsCount ( 10 ) 622 | 623 | #define BucketParamLength ( 255 ) 624 | 625 | typedef /* [public] */ 626 | enum __MIDL___MIDL_itf_mscoree_0000_0002_0009 627 | { 628 | Parameter1 = 0, 629 | Parameter2 = ( Parameter1 + 1 ) , 630 | Parameter3 = ( Parameter2 + 1 ) , 631 | Parameter4 = ( Parameter3 + 1 ) , 632 | Parameter5 = ( Parameter4 + 1 ) , 633 | Parameter6 = ( Parameter5 + 1 ) , 634 | Parameter7 = ( Parameter6 + 1 ) , 635 | Parameter8 = ( Parameter7 + 1 ) , 636 | Parameter9 = ( Parameter8 + 1 ) , 637 | InvalidBucketParamIndex = ( Parameter9 + 1 ) 638 | } BucketParameterIndex; 639 | 640 | typedef struct _BucketParameters 641 | { 642 | BOOL fInited; 643 | WCHAR pszEventTypeName[ 255 ]; 644 | WCHAR pszParams[ 10 ][ 255 ]; 645 | } BucketParameters; 646 | 647 | 648 | 649 | extern RPC_IF_HANDLE __MIDL_itf_mscoree_0000_0002_v0_0_c_ifspec; 650 | extern RPC_IF_HANDLE __MIDL_itf_mscoree_0000_0002_v0_0_s_ifspec; 651 | 652 | #ifndef __ICLRErrorReportingManager_INTERFACE_DEFINED__ 653 | #define __ICLRErrorReportingManager_INTERFACE_DEFINED__ 654 | 655 | /* interface ICLRErrorReportingManager */ 656 | /* [object][local][unique][helpstring][version][uuid] */ 657 | 658 | 659 | EXTERN_C const IID IID_ICLRErrorReportingManager; 660 | 661 | #if defined(__cplusplus) && !defined(CINTERFACE) 662 | 663 | MIDL_INTERFACE("980D2F1A-BF79-4c08-812A-BB9778928F78") 664 | ICLRErrorReportingManager : public IUnknown 665 | { 666 | public: 667 | virtual HRESULT STDMETHODCALLTYPE GetBucketParametersForCurrentException( 668 | /* [out] */ BucketParameters *pParams) = 0; 669 | 670 | virtual HRESULT STDMETHODCALLTYPE BeginCustomDump( 671 | /* [in] */ ECustomDumpFlavor dwFlavor, 672 | /* [in] */ DWORD dwNumItems, 673 | /* [length_is][size_is][in] */ CustomDumpItem *items, 674 | DWORD dwReserved) = 0; 675 | 676 | virtual HRESULT STDMETHODCALLTYPE EndCustomDump( void) = 0; 677 | 678 | }; 679 | 680 | 681 | #else /* C style interface */ 682 | 683 | typedef struct ICLRErrorReportingManagerVtbl 684 | { 685 | BEGIN_INTERFACE 686 | 687 | HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 688 | ICLRErrorReportingManager * This, 689 | /* [in] */ REFIID riid, 690 | /* [annotation][iid_is][out] */ 691 | _COM_Outptr_ void **ppvObject); 692 | 693 | ULONG ( STDMETHODCALLTYPE *AddRef )( 694 | ICLRErrorReportingManager * This); 695 | 696 | ULONG ( STDMETHODCALLTYPE *Release )( 697 | ICLRErrorReportingManager * This); 698 | 699 | HRESULT ( STDMETHODCALLTYPE *GetBucketParametersForCurrentException )( 700 | ICLRErrorReportingManager * This, 701 | /* [out] */ BucketParameters *pParams); 702 | 703 | HRESULT ( STDMETHODCALLTYPE *BeginCustomDump )( 704 | ICLRErrorReportingManager * This, 705 | /* [in] */ ECustomDumpFlavor dwFlavor, 706 | /* [in] */ DWORD dwNumItems, 707 | /* [length_is][size_is][in] */ CustomDumpItem *items, 708 | DWORD dwReserved); 709 | 710 | HRESULT ( STDMETHODCALLTYPE *EndCustomDump )( 711 | ICLRErrorReportingManager * This); 712 | 713 | END_INTERFACE 714 | } ICLRErrorReportingManagerVtbl; 715 | 716 | interface ICLRErrorReportingManager 717 | { 718 | CONST_VTBL struct ICLRErrorReportingManagerVtbl *lpVtbl; 719 | }; 720 | 721 | 722 | 723 | #ifdef COBJMACROS 724 | 725 | 726 | #define ICLRErrorReportingManager_QueryInterface(This,riid,ppvObject) \ 727 | ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 728 | 729 | #define ICLRErrorReportingManager_AddRef(This) \ 730 | ( (This)->lpVtbl -> AddRef(This) ) 731 | 732 | #define ICLRErrorReportingManager_Release(This) \ 733 | ( (This)->lpVtbl -> Release(This) ) 734 | 735 | 736 | #define ICLRErrorReportingManager_GetBucketParametersForCurrentException(This,pParams) \ 737 | ( (This)->lpVtbl -> GetBucketParametersForCurrentException(This,pParams) ) 738 | 739 | #define ICLRErrorReportingManager_BeginCustomDump(This,dwFlavor,dwNumItems,items,dwReserved) \ 740 | ( (This)->lpVtbl -> BeginCustomDump(This,dwFlavor,dwNumItems,items,dwReserved) ) 741 | 742 | #define ICLRErrorReportingManager_EndCustomDump(This) \ 743 | ( (This)->lpVtbl -> EndCustomDump(This) ) 744 | 745 | #endif /* COBJMACROS */ 746 | 747 | 748 | #endif /* C style interface */ 749 | 750 | 751 | 752 | 753 | #endif /* __ICLRErrorReportingManager_INTERFACE_DEFINED__ */ 754 | 755 | 756 | /* interface __MIDL_itf_mscoree_0000_0003 */ 757 | /* [local] */ 758 | 759 | typedef /* [public][public] */ 760 | enum __MIDL___MIDL_itf_mscoree_0000_0003_0001 761 | { 762 | ApplicationID = 0x1, 763 | InstanceID = 0x2 764 | } ApplicationDataKey; 765 | 766 | 767 | 768 | extern RPC_IF_HANDLE __MIDL_itf_mscoree_0000_0003_v0_0_c_ifspec; 769 | extern RPC_IF_HANDLE __MIDL_itf_mscoree_0000_0003_v0_0_s_ifspec; 770 | 771 | #ifndef __ICLRErrorReportingManager2_INTERFACE_DEFINED__ 772 | #define __ICLRErrorReportingManager2_INTERFACE_DEFINED__ 773 | 774 | /* interface ICLRErrorReportingManager2 */ 775 | /* [object][local][unique][helpstring][version][uuid] */ 776 | 777 | 778 | EXTERN_C const IID IID_ICLRErrorReportingManager2; 779 | 780 | #if defined(__cplusplus) && !defined(CINTERFACE) 781 | 782 | MIDL_INTERFACE("C68F63B1-4D8B-4E0B-9564-9D2EFE2FA18C") 783 | ICLRErrorReportingManager2 : public ICLRErrorReportingManager 784 | { 785 | public: 786 | virtual HRESULT STDMETHODCALLTYPE SetApplicationData( 787 | /* [in] */ ApplicationDataKey key, 788 | /* [in] */ const WCHAR *pValue) = 0; 789 | 790 | virtual HRESULT STDMETHODCALLTYPE SetBucketParametersForUnhandledException( 791 | /* [in] */ const BucketParameters *pBucketParams, 792 | /* [out] */ DWORD *pCountParams) = 0; 793 | 794 | }; 795 | 796 | 797 | #else /* C style interface */ 798 | 799 | typedef struct ICLRErrorReportingManager2Vtbl 800 | { 801 | BEGIN_INTERFACE 802 | 803 | HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 804 | ICLRErrorReportingManager2 * This, 805 | /* [in] */ REFIID riid, 806 | /* [annotation][iid_is][out] */ 807 | _COM_Outptr_ void **ppvObject); 808 | 809 | ULONG ( STDMETHODCALLTYPE *AddRef )( 810 | ICLRErrorReportingManager2 * This); 811 | 812 | ULONG ( STDMETHODCALLTYPE *Release )( 813 | ICLRErrorReportingManager2 * This); 814 | 815 | HRESULT ( STDMETHODCALLTYPE *GetBucketParametersForCurrentException )( 816 | ICLRErrorReportingManager2 * This, 817 | /* [out] */ BucketParameters *pParams); 818 | 819 | HRESULT ( STDMETHODCALLTYPE *BeginCustomDump )( 820 | ICLRErrorReportingManager2 * This, 821 | /* [in] */ ECustomDumpFlavor dwFlavor, 822 | /* [in] */ DWORD dwNumItems, 823 | /* [length_is][size_is][in] */ CustomDumpItem *items, 824 | DWORD dwReserved); 825 | 826 | HRESULT ( STDMETHODCALLTYPE *EndCustomDump )( 827 | ICLRErrorReportingManager2 * This); 828 | 829 | HRESULT ( STDMETHODCALLTYPE *SetApplicationData )( 830 | ICLRErrorReportingManager2 * This, 831 | /* [in] */ ApplicationDataKey key, 832 | /* [in] */ const WCHAR *pValue); 833 | 834 | HRESULT ( STDMETHODCALLTYPE *SetBucketParametersForUnhandledException )( 835 | ICLRErrorReportingManager2 * This, 836 | /* [in] */ const BucketParameters *pBucketParams, 837 | /* [out] */ DWORD *pCountParams); 838 | 839 | END_INTERFACE 840 | } ICLRErrorReportingManager2Vtbl; 841 | 842 | interface ICLRErrorReportingManager2 843 | { 844 | CONST_VTBL struct ICLRErrorReportingManager2Vtbl *lpVtbl; 845 | }; 846 | 847 | 848 | 849 | #ifdef COBJMACROS 850 | 851 | 852 | #define ICLRErrorReportingManager2_QueryInterface(This,riid,ppvObject) \ 853 | ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 854 | 855 | #define ICLRErrorReportingManager2_AddRef(This) \ 856 | ( (This)->lpVtbl -> AddRef(This) ) 857 | 858 | #define ICLRErrorReportingManager2_Release(This) \ 859 | ( (This)->lpVtbl -> Release(This) ) 860 | 861 | 862 | #define ICLRErrorReportingManager2_GetBucketParametersForCurrentException(This,pParams) \ 863 | ( (This)->lpVtbl -> GetBucketParametersForCurrentException(This,pParams) ) 864 | 865 | #define ICLRErrorReportingManager2_BeginCustomDump(This,dwFlavor,dwNumItems,items,dwReserved) \ 866 | ( (This)->lpVtbl -> BeginCustomDump(This,dwFlavor,dwNumItems,items,dwReserved) ) 867 | 868 | #define ICLRErrorReportingManager2_EndCustomDump(This) \ 869 | ( (This)->lpVtbl -> EndCustomDump(This) ) 870 | 871 | 872 | #define ICLRErrorReportingManager2_SetApplicationData(This,key,pValue) \ 873 | ( (This)->lpVtbl -> SetApplicationData(This,key,pValue) ) 874 | 875 | #define ICLRErrorReportingManager2_SetBucketParametersForUnhandledException(This,pBucketParams,pCountParams) \ 876 | ( (This)->lpVtbl -> SetBucketParametersForUnhandledException(This,pBucketParams,pCountParams) ) 877 | 878 | #endif /* COBJMACROS */ 879 | 880 | 881 | #endif /* C style interface */ 882 | 883 | 884 | 885 | 886 | #endif /* __ICLRErrorReportingManager2_INTERFACE_DEFINED__ */ 887 | 888 | 889 | /* interface __MIDL_itf_mscoree_0000_0004 */ 890 | /* [local] */ 891 | 892 | typedef /* [public][public][public][public][public] */ 893 | enum __MIDL___MIDL_itf_mscoree_0000_0004_0001 894 | { 895 | OPR_ThreadAbort = 0, 896 | OPR_ThreadRudeAbortInNonCriticalRegion = ( OPR_ThreadAbort + 1 ) , 897 | OPR_ThreadRudeAbortInCriticalRegion = ( OPR_ThreadRudeAbortInNonCriticalRegion + 1 ) , 898 | OPR_AppDomainUnload = ( OPR_ThreadRudeAbortInCriticalRegion + 1 ) , 899 | OPR_AppDomainRudeUnload = ( OPR_AppDomainUnload + 1 ) , 900 | OPR_ProcessExit = ( OPR_AppDomainRudeUnload + 1 ) , 901 | OPR_FinalizerRun = ( OPR_ProcessExit + 1 ) , 902 | MaxClrOperation = ( OPR_FinalizerRun + 1 ) 903 | } EClrOperation; 904 | 905 | typedef /* [public][public] */ 906 | enum __MIDL___MIDL_itf_mscoree_0000_0004_0002 907 | { 908 | FAIL_NonCriticalResource = 0, 909 | FAIL_CriticalResource = ( FAIL_NonCriticalResource + 1 ) , 910 | FAIL_FatalRuntime = ( FAIL_CriticalResource + 1 ) , 911 | FAIL_OrphanedLock = ( FAIL_FatalRuntime + 1 ) , 912 | FAIL_StackOverflow = ( FAIL_OrphanedLock + 1 ) , 913 | FAIL_AccessViolation = ( FAIL_StackOverflow + 1 ) , 914 | FAIL_CodeContract = ( FAIL_AccessViolation + 1 ) , 915 | MaxClrFailure = ( FAIL_CodeContract + 1 ) 916 | } EClrFailure; 917 | 918 | typedef /* [public][public] */ 919 | enum __MIDL___MIDL_itf_mscoree_0000_0004_0003 920 | { 921 | eRuntimeDeterminedPolicy = 0, 922 | eHostDeterminedPolicy = ( eRuntimeDeterminedPolicy + 1 ) 923 | } EClrUnhandledException; 924 | 925 | typedef /* [public][public][public][public][public] */ 926 | enum __MIDL___MIDL_itf_mscoree_0000_0004_0004 927 | { 928 | eNoAction = 0, 929 | eThrowException = ( eNoAction + 1 ) , 930 | eAbortThread = ( eThrowException + 1 ) , 931 | eRudeAbortThread = ( eAbortThread + 1 ) , 932 | eUnloadAppDomain = ( eRudeAbortThread + 1 ) , 933 | eRudeUnloadAppDomain = ( eUnloadAppDomain + 1 ) , 934 | eExitProcess = ( eRudeUnloadAppDomain + 1 ) , 935 | eFastExitProcess = ( eExitProcess + 1 ) , 936 | eRudeExitProcess = ( eFastExitProcess + 1 ) , 937 | eDisableRuntime = ( eRudeExitProcess + 1 ) , 938 | MaxPolicyAction = ( eDisableRuntime + 1 ) 939 | } EPolicyAction; 940 | 941 | 942 | 943 | extern RPC_IF_HANDLE __MIDL_itf_mscoree_0000_0004_v0_0_c_ifspec; 944 | extern RPC_IF_HANDLE __MIDL_itf_mscoree_0000_0004_v0_0_s_ifspec; 945 | 946 | #ifndef __ICLRPolicyManager_INTERFACE_DEFINED__ 947 | #define __ICLRPolicyManager_INTERFACE_DEFINED__ 948 | 949 | /* interface ICLRPolicyManager */ 950 | /* [object][local][unique][helpstring][version][uuid] */ 951 | 952 | 953 | EXTERN_C const IID IID_ICLRPolicyManager; 954 | 955 | #if defined(__cplusplus) && !defined(CINTERFACE) 956 | 957 | MIDL_INTERFACE("7D290010-D781-45da-A6F8-AA5D711A730E") 958 | ICLRPolicyManager : public IUnknown 959 | { 960 | public: 961 | virtual HRESULT STDMETHODCALLTYPE SetDefaultAction( 962 | /* [in] */ EClrOperation operation, 963 | /* [in] */ EPolicyAction action) = 0; 964 | 965 | virtual HRESULT STDMETHODCALLTYPE SetTimeout( 966 | /* [in] */ EClrOperation operation, 967 | /* [in] */ DWORD dwMilliseconds) = 0; 968 | 969 | virtual HRESULT STDMETHODCALLTYPE SetActionOnTimeout( 970 | /* [in] */ EClrOperation operation, 971 | /* [in] */ EPolicyAction action) = 0; 972 | 973 | virtual HRESULT STDMETHODCALLTYPE SetTimeoutAndAction( 974 | /* [in] */ EClrOperation operation, 975 | /* [in] */ DWORD dwMilliseconds, 976 | /* [in] */ EPolicyAction action) = 0; 977 | 978 | virtual HRESULT STDMETHODCALLTYPE SetActionOnFailure( 979 | /* [in] */ EClrFailure failure, 980 | /* [in] */ EPolicyAction action) = 0; 981 | 982 | virtual HRESULT STDMETHODCALLTYPE SetUnhandledExceptionPolicy( 983 | /* [in] */ EClrUnhandledException policy) = 0; 984 | 985 | }; 986 | 987 | 988 | #else /* C style interface */ 989 | 990 | typedef struct ICLRPolicyManagerVtbl 991 | { 992 | BEGIN_INTERFACE 993 | 994 | HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 995 | ICLRPolicyManager * This, 996 | /* [in] */ REFIID riid, 997 | /* [annotation][iid_is][out] */ 998 | _COM_Outptr_ void **ppvObject); 999 | 1000 | ULONG ( STDMETHODCALLTYPE *AddRef )( 1001 | ICLRPolicyManager * This); 1002 | 1003 | ULONG ( STDMETHODCALLTYPE *Release )( 1004 | ICLRPolicyManager * This); 1005 | 1006 | HRESULT ( STDMETHODCALLTYPE *SetDefaultAction )( 1007 | ICLRPolicyManager * This, 1008 | /* [in] */ EClrOperation operation, 1009 | /* [in] */ EPolicyAction action); 1010 | 1011 | HRESULT ( STDMETHODCALLTYPE *SetTimeout )( 1012 | ICLRPolicyManager * This, 1013 | /* [in] */ EClrOperation operation, 1014 | /* [in] */ DWORD dwMilliseconds); 1015 | 1016 | HRESULT ( STDMETHODCALLTYPE *SetActionOnTimeout )( 1017 | ICLRPolicyManager * This, 1018 | /* [in] */ EClrOperation operation, 1019 | /* [in] */ EPolicyAction action); 1020 | 1021 | HRESULT ( STDMETHODCALLTYPE *SetTimeoutAndAction )( 1022 | ICLRPolicyManager * This, 1023 | /* [in] */ EClrOperation operation, 1024 | /* [in] */ DWORD dwMilliseconds, 1025 | /* [in] */ EPolicyAction action); 1026 | 1027 | HRESULT ( STDMETHODCALLTYPE *SetActionOnFailure )( 1028 | ICLRPolicyManager * This, 1029 | /* [in] */ EClrFailure failure, 1030 | /* [in] */ EPolicyAction action); 1031 | 1032 | HRESULT ( STDMETHODCALLTYPE *SetUnhandledExceptionPolicy )( 1033 | ICLRPolicyManager * This, 1034 | /* [in] */ EClrUnhandledException policy); 1035 | 1036 | END_INTERFACE 1037 | } ICLRPolicyManagerVtbl; 1038 | 1039 | interface ICLRPolicyManager 1040 | { 1041 | CONST_VTBL struct ICLRPolicyManagerVtbl *lpVtbl; 1042 | }; 1043 | 1044 | 1045 | 1046 | #ifdef COBJMACROS 1047 | 1048 | 1049 | #define ICLRPolicyManager_QueryInterface(This,riid,ppvObject) \ 1050 | ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 1051 | 1052 | #define ICLRPolicyManager_AddRef(This) \ 1053 | ( (This)->lpVtbl -> AddRef(This) ) 1054 | 1055 | #define ICLRPolicyManager_Release(This) \ 1056 | ( (This)->lpVtbl -> Release(This) ) 1057 | 1058 | 1059 | #define ICLRPolicyManager_SetDefaultAction(This,operation,action) \ 1060 | ( (This)->lpVtbl -> SetDefaultAction(This,operation,action) ) 1061 | 1062 | #define ICLRPolicyManager_SetTimeout(This,operation,dwMilliseconds) \ 1063 | ( (This)->lpVtbl -> SetTimeout(This,operation,dwMilliseconds) ) 1064 | 1065 | #define ICLRPolicyManager_SetActionOnTimeout(This,operation,action) \ 1066 | ( (This)->lpVtbl -> SetActionOnTimeout(This,operation,action) ) 1067 | 1068 | #define ICLRPolicyManager_SetTimeoutAndAction(This,operation,dwMilliseconds,action) \ 1069 | ( (This)->lpVtbl -> SetTimeoutAndAction(This,operation,dwMilliseconds,action) ) 1070 | 1071 | #define ICLRPolicyManager_SetActionOnFailure(This,failure,action) \ 1072 | ( (This)->lpVtbl -> SetActionOnFailure(This,failure,action) ) 1073 | 1074 | #define ICLRPolicyManager_SetUnhandledExceptionPolicy(This,policy) \ 1075 | ( (This)->lpVtbl -> SetUnhandledExceptionPolicy(This,policy) ) 1076 | 1077 | #endif /* COBJMACROS */ 1078 | 1079 | 1080 | #endif /* C style interface */ 1081 | 1082 | 1083 | 1084 | 1085 | #endif /* __ICLRPolicyManager_INTERFACE_DEFINED__ */ 1086 | 1087 | 1088 | /* interface __MIDL_itf_mscoree_0000_0005 */ 1089 | /* [local] */ 1090 | 1091 | typedef /* [public] */ 1092 | enum __MIDL___MIDL_itf_mscoree_0000_0005_0001 1093 | { 1094 | Event_DomainUnload = 0, 1095 | Event_ClrDisabled = ( Event_DomainUnload + 1 ) , 1096 | Event_MDAFired = ( Event_ClrDisabled + 1 ) , 1097 | Event_StackOverflow = ( Event_MDAFired + 1 ) , 1098 | MaxClrEvent = ( Event_StackOverflow + 1 ) 1099 | } EClrEvent; 1100 | 1101 | typedef struct _MDAInfo 1102 | { 1103 | LPCWSTR lpMDACaption; 1104 | LPCWSTR lpMDAMessage; 1105 | LPCWSTR lpStackTrace; 1106 | } MDAInfo; 1107 | 1108 | typedef /* [public] */ 1109 | enum __MIDL___MIDL_itf_mscoree_0000_0005_0002 1110 | { 1111 | SO_Managed = 0, 1112 | SO_ClrEngine = ( SO_Managed + 1 ) , 1113 | SO_Other = ( SO_ClrEngine + 1 ) 1114 | } StackOverflowType; 1115 | 1116 | typedef struct _StackOverflowInfo 1117 | { 1118 | StackOverflowType soType; 1119 | EXCEPTION_POINTERS *pExceptionInfo; 1120 | } StackOverflowInfo; 1121 | 1122 | 1123 | extern RPC_IF_HANDLE __MIDL_itf_mscoree_0000_0005_v0_0_c_ifspec; 1124 | extern RPC_IF_HANDLE __MIDL_itf_mscoree_0000_0005_v0_0_s_ifspec; 1125 | 1126 | #ifndef __ICLRGCManager_INTERFACE_DEFINED__ 1127 | #define __ICLRGCManager_INTERFACE_DEFINED__ 1128 | 1129 | /* interface ICLRGCManager */ 1130 | /* [object][local][unique][version][uuid] */ 1131 | 1132 | 1133 | EXTERN_C const IID IID_ICLRGCManager; 1134 | 1135 | #if defined(__cplusplus) && !defined(CINTERFACE) 1136 | 1137 | MIDL_INTERFACE("54D9007E-A8E2-4885-B7BF-F998DEEE4F2A") 1138 | ICLRGCManager : public IUnknown 1139 | { 1140 | public: 1141 | virtual HRESULT STDMETHODCALLTYPE Collect( 1142 | /* [in] */ LONG Generation) = 0; 1143 | 1144 | virtual HRESULT STDMETHODCALLTYPE GetStats( 1145 | /* [out][in] */ COR_GC_STATS *pStats) = 0; 1146 | 1147 | virtual HRESULT STDMETHODCALLTYPE SetGCStartupLimits( 1148 | /* [in] */ DWORD SegmentSize, 1149 | /* [in] */ DWORD MaxGen0Size) = 0; 1150 | 1151 | }; 1152 | 1153 | 1154 | #else /* C style interface */ 1155 | 1156 | typedef struct ICLRGCManagerVtbl 1157 | { 1158 | BEGIN_INTERFACE 1159 | 1160 | HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 1161 | ICLRGCManager * This, 1162 | /* [in] */ REFIID riid, 1163 | /* [annotation][iid_is][out] */ 1164 | _COM_Outptr_ void **ppvObject); 1165 | 1166 | ULONG ( STDMETHODCALLTYPE *AddRef )( 1167 | ICLRGCManager * This); 1168 | 1169 | ULONG ( STDMETHODCALLTYPE *Release )( 1170 | ICLRGCManager * This); 1171 | 1172 | HRESULT ( STDMETHODCALLTYPE *Collect )( 1173 | ICLRGCManager * This, 1174 | /* [in] */ LONG Generation); 1175 | 1176 | HRESULT ( STDMETHODCALLTYPE *GetStats )( 1177 | ICLRGCManager * This, 1178 | /* [out][in] */ COR_GC_STATS *pStats); 1179 | 1180 | HRESULT ( STDMETHODCALLTYPE *SetGCStartupLimits )( 1181 | ICLRGCManager * This, 1182 | /* [in] */ DWORD SegmentSize, 1183 | /* [in] */ DWORD MaxGen0Size); 1184 | 1185 | END_INTERFACE 1186 | } ICLRGCManagerVtbl; 1187 | 1188 | interface ICLRGCManager 1189 | { 1190 | CONST_VTBL struct ICLRGCManagerVtbl *lpVtbl; 1191 | }; 1192 | 1193 | 1194 | 1195 | #ifdef COBJMACROS 1196 | 1197 | 1198 | #define ICLRGCManager_QueryInterface(This,riid,ppvObject) \ 1199 | ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 1200 | 1201 | #define ICLRGCManager_AddRef(This) \ 1202 | ( (This)->lpVtbl -> AddRef(This) ) 1203 | 1204 | #define ICLRGCManager_Release(This) \ 1205 | ( (This)->lpVtbl -> Release(This) ) 1206 | 1207 | 1208 | #define ICLRGCManager_Collect(This,Generation) \ 1209 | ( (This)->lpVtbl -> Collect(This,Generation) ) 1210 | 1211 | #define ICLRGCManager_GetStats(This,pStats) \ 1212 | ( (This)->lpVtbl -> GetStats(This,pStats) ) 1213 | 1214 | #define ICLRGCManager_SetGCStartupLimits(This,SegmentSize,MaxGen0Size) \ 1215 | ( (This)->lpVtbl -> SetGCStartupLimits(This,SegmentSize,MaxGen0Size) ) 1216 | 1217 | #endif /* COBJMACROS */ 1218 | 1219 | 1220 | #endif /* C style interface */ 1221 | 1222 | 1223 | 1224 | 1225 | #endif /* __ICLRGCManager_INTERFACE_DEFINED__ */ 1226 | 1227 | 1228 | #ifndef __ICLRGCManager2_INTERFACE_DEFINED__ 1229 | #define __ICLRGCManager2_INTERFACE_DEFINED__ 1230 | 1231 | /* interface ICLRGCManager2 */ 1232 | /* [object][local][unique][version][uuid] */ 1233 | 1234 | 1235 | EXTERN_C const IID IID_ICLRGCManager2; 1236 | 1237 | #if defined(__cplusplus) && !defined(CINTERFACE) 1238 | 1239 | MIDL_INTERFACE("0603B793-A97A-4712-9CB4-0CD1C74C0F7C") 1240 | ICLRGCManager2 : public ICLRGCManager 1241 | { 1242 | public: 1243 | virtual HRESULT STDMETHODCALLTYPE SetGCStartupLimitsEx( 1244 | /* [in] */ SIZE_T SegmentSize, 1245 | /* [in] */ SIZE_T MaxGen0Size) = 0; 1246 | 1247 | }; 1248 | 1249 | 1250 | #else /* C style interface */ 1251 | 1252 | typedef struct ICLRGCManager2Vtbl 1253 | { 1254 | BEGIN_INTERFACE 1255 | 1256 | HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 1257 | ICLRGCManager2 * This, 1258 | /* [in] */ REFIID riid, 1259 | /* [annotation][iid_is][out] */ 1260 | _COM_Outptr_ void **ppvObject); 1261 | 1262 | ULONG ( STDMETHODCALLTYPE *AddRef )( 1263 | ICLRGCManager2 * This); 1264 | 1265 | ULONG ( STDMETHODCALLTYPE *Release )( 1266 | ICLRGCManager2 * This); 1267 | 1268 | HRESULT ( STDMETHODCALLTYPE *Collect )( 1269 | ICLRGCManager2 * This, 1270 | /* [in] */ LONG Generation); 1271 | 1272 | HRESULT ( STDMETHODCALLTYPE *GetStats )( 1273 | ICLRGCManager2 * This, 1274 | /* [out][in] */ COR_GC_STATS *pStats); 1275 | 1276 | HRESULT ( STDMETHODCALLTYPE *SetGCStartupLimits )( 1277 | ICLRGCManager2 * This, 1278 | /* [in] */ DWORD SegmentSize, 1279 | /* [in] */ DWORD MaxGen0Size); 1280 | 1281 | HRESULT ( STDMETHODCALLTYPE *SetGCStartupLimitsEx )( 1282 | ICLRGCManager2 * This, 1283 | /* [in] */ SIZE_T SegmentSize, 1284 | /* [in] */ SIZE_T MaxGen0Size); 1285 | 1286 | END_INTERFACE 1287 | } ICLRGCManager2Vtbl; 1288 | 1289 | interface ICLRGCManager2 1290 | { 1291 | CONST_VTBL struct ICLRGCManager2Vtbl *lpVtbl; 1292 | }; 1293 | 1294 | 1295 | 1296 | #ifdef COBJMACROS 1297 | 1298 | 1299 | #define ICLRGCManager2_QueryInterface(This,riid,ppvObject) \ 1300 | ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 1301 | 1302 | #define ICLRGCManager2_AddRef(This) \ 1303 | ( (This)->lpVtbl -> AddRef(This) ) 1304 | 1305 | #define ICLRGCManager2_Release(This) \ 1306 | ( (This)->lpVtbl -> Release(This) ) 1307 | 1308 | 1309 | #define ICLRGCManager2_Collect(This,Generation) \ 1310 | ( (This)->lpVtbl -> Collect(This,Generation) ) 1311 | 1312 | #define ICLRGCManager2_GetStats(This,pStats) \ 1313 | ( (This)->lpVtbl -> GetStats(This,pStats) ) 1314 | 1315 | #define ICLRGCManager2_SetGCStartupLimits(This,SegmentSize,MaxGen0Size) \ 1316 | ( (This)->lpVtbl -> SetGCStartupLimits(This,SegmentSize,MaxGen0Size) ) 1317 | 1318 | 1319 | #define ICLRGCManager2_SetGCStartupLimitsEx(This,SegmentSize,MaxGen0Size) \ 1320 | ( (This)->lpVtbl -> SetGCStartupLimitsEx(This,SegmentSize,MaxGen0Size) ) 1321 | 1322 | #endif /* COBJMACROS */ 1323 | 1324 | 1325 | #endif /* C style interface */ 1326 | 1327 | 1328 | 1329 | 1330 | #endif /* __ICLRGCManager2_INTERFACE_DEFINED__ */ 1331 | 1332 | 1333 | /* interface __MIDL_itf_mscoree_0000_0007 */ 1334 | /* [local] */ 1335 | 1336 | typedef /* [public] */ 1337 | enum __MIDL___MIDL_itf_mscoree_0000_0007_0001 1338 | { 1339 | ePolicyLevelNone = 0, 1340 | ePolicyLevelRetargetable = 0x1, 1341 | ePolicyUnifiedToCLR = 0x2, 1342 | ePolicyLevelApp = 0x4, 1343 | ePolicyLevelPublisher = 0x8, 1344 | ePolicyLevelHost = 0x10, 1345 | ePolicyLevelAdmin = 0x20, 1346 | ePolicyPortability = 0x40 1347 | } EBindPolicyLevels; 1348 | 1349 | typedef struct _AssemblyBindInfo 1350 | { 1351 | DWORD dwAppDomainId; 1352 | LPCWSTR lpReferencedIdentity; 1353 | LPCWSTR lpPostPolicyIdentity; 1354 | DWORD ePolicyLevel; 1355 | } AssemblyBindInfo; 1356 | 1357 | typedef struct _ModuleBindInfo 1358 | { 1359 | DWORD dwAppDomainId; 1360 | LPCWSTR lpAssemblyIdentity; 1361 | LPCWSTR lpModuleName; 1362 | } ModuleBindInfo; 1363 | 1364 | typedef 1365 | enum _HostApplicationPolicy 1366 | { 1367 | HOST_APPLICATION_BINDING_POLICY = 1 1368 | } EHostApplicationPolicy; 1369 | 1370 | STDAPI GetCLRIdentityManager(REFIID riid, IUnknown **ppManager); 1371 | EXTERN_GUID(IID_IHostControl, 0x02CA073C, 0x7079, 0x4860, 0x88, 0x0A, 0xC2, 0xF7, 0xA4, 0x49, 0xC9, 0x91); 1372 | 1373 | 1374 | extern RPC_IF_HANDLE __MIDL_itf_mscoree_0000_0007_v0_0_c_ifspec; 1375 | extern RPC_IF_HANDLE __MIDL_itf_mscoree_0000_0007_v0_0_s_ifspec; 1376 | 1377 | #ifndef __IHostControl_INTERFACE_DEFINED__ 1378 | #define __IHostControl_INTERFACE_DEFINED__ 1379 | 1380 | /* interface IHostControl */ 1381 | /* [object][local][unique][helpstring][version][uuid] */ 1382 | 1383 | 1384 | EXTERN_C const IID IID_IHostControl; 1385 | 1386 | #if defined(__cplusplus) && !defined(CINTERFACE) 1387 | 1388 | MIDL_INTERFACE("02CA073C-7079-4860-880A-C2F7A449C991") 1389 | IHostControl : public IUnknown 1390 | { 1391 | public: 1392 | virtual HRESULT STDMETHODCALLTYPE GetHostManager( 1393 | /* [in] */ REFIID riid, 1394 | /* [out] */ void **ppObject) = 0; 1395 | 1396 | virtual HRESULT STDMETHODCALLTYPE SetAppDomainManager( 1397 | /* [in] */ DWORD dwAppDomainID, 1398 | /* [in] */ IUnknown *pUnkAppDomainManager) = 0; 1399 | 1400 | }; 1401 | 1402 | 1403 | #else /* C style interface */ 1404 | 1405 | typedef struct IHostControlVtbl 1406 | { 1407 | BEGIN_INTERFACE 1408 | 1409 | HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 1410 | IHostControl * This, 1411 | /* [in] */ REFIID riid, 1412 | /* [annotation][iid_is][out] */ 1413 | _COM_Outptr_ void **ppvObject); 1414 | 1415 | ULONG ( STDMETHODCALLTYPE *AddRef )( 1416 | IHostControl * This); 1417 | 1418 | ULONG ( STDMETHODCALLTYPE *Release )( 1419 | IHostControl * This); 1420 | 1421 | HRESULT ( STDMETHODCALLTYPE *GetHostManager )( 1422 | IHostControl * This, 1423 | /* [in] */ REFIID riid, 1424 | /* [out] */ void **ppObject); 1425 | 1426 | HRESULT ( STDMETHODCALLTYPE *SetAppDomainManager )( 1427 | IHostControl * This, 1428 | /* [in] */ DWORD dwAppDomainID, 1429 | /* [in] */ IUnknown *pUnkAppDomainManager); 1430 | 1431 | END_INTERFACE 1432 | } IHostControlVtbl; 1433 | 1434 | interface IHostControl 1435 | { 1436 | CONST_VTBL struct IHostControlVtbl *lpVtbl; 1437 | }; 1438 | 1439 | 1440 | 1441 | #ifdef COBJMACROS 1442 | 1443 | 1444 | #define IHostControl_QueryInterface(This,riid,ppvObject) \ 1445 | ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 1446 | 1447 | #define IHostControl_AddRef(This) \ 1448 | ( (This)->lpVtbl -> AddRef(This) ) 1449 | 1450 | #define IHostControl_Release(This) \ 1451 | ( (This)->lpVtbl -> Release(This) ) 1452 | 1453 | 1454 | #define IHostControl_GetHostManager(This,riid,ppObject) \ 1455 | ( (This)->lpVtbl -> GetHostManager(This,riid,ppObject) ) 1456 | 1457 | #define IHostControl_SetAppDomainManager(This,dwAppDomainID,pUnkAppDomainManager) \ 1458 | ( (This)->lpVtbl -> SetAppDomainManager(This,dwAppDomainID,pUnkAppDomainManager) ) 1459 | 1460 | #endif /* COBJMACROS */ 1461 | 1462 | 1463 | #endif /* C style interface */ 1464 | 1465 | 1466 | 1467 | 1468 | #endif /* __IHostControl_INTERFACE_DEFINED__ */ 1469 | 1470 | 1471 | /* interface __MIDL_itf_mscoree_0000_0008 */ 1472 | /* [local] */ 1473 | 1474 | EXTERN_GUID(IID_ICLRControl, 0x9065597E, 0xD1A1, 0x4fb2, 0xB6, 0xBA, 0x7E, 0x1F, 0xCE, 0x23, 0x0F, 0x61); 1475 | 1476 | 1477 | extern RPC_IF_HANDLE __MIDL_itf_mscoree_0000_0008_v0_0_c_ifspec; 1478 | extern RPC_IF_HANDLE __MIDL_itf_mscoree_0000_0008_v0_0_s_ifspec; 1479 | 1480 | #ifndef __ICLRControl_INTERFACE_DEFINED__ 1481 | #define __ICLRControl_INTERFACE_DEFINED__ 1482 | 1483 | /* interface ICLRControl */ 1484 | /* [object][local][unique][helpstring][version][uuid] */ 1485 | 1486 | 1487 | EXTERN_C const IID IID_ICLRControl; 1488 | 1489 | #if defined(__cplusplus) && !defined(CINTERFACE) 1490 | 1491 | MIDL_INTERFACE("9065597E-D1A1-4fb2-B6BA-7E1FCE230F61") 1492 | ICLRControl : public IUnknown 1493 | { 1494 | public: 1495 | virtual HRESULT STDMETHODCALLTYPE GetCLRManager( 1496 | /* [in] */ REFIID riid, 1497 | /* [out] */ void **ppObject) = 0; 1498 | 1499 | virtual HRESULT STDMETHODCALLTYPE SetAppDomainManagerType( 1500 | /* [in] */ LPCWSTR pwzAppDomainManagerAssembly, 1501 | /* [in] */ LPCWSTR pwzAppDomainManagerType) = 0; 1502 | 1503 | }; 1504 | 1505 | 1506 | #else /* C style interface */ 1507 | 1508 | typedef struct ICLRControlVtbl 1509 | { 1510 | BEGIN_INTERFACE 1511 | 1512 | HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 1513 | ICLRControl * This, 1514 | /* [in] */ REFIID riid, 1515 | /* [annotation][iid_is][out] */ 1516 | _COM_Outptr_ void **ppvObject); 1517 | 1518 | ULONG ( STDMETHODCALLTYPE *AddRef )( 1519 | ICLRControl * This); 1520 | 1521 | ULONG ( STDMETHODCALLTYPE *Release )( 1522 | ICLRControl * This); 1523 | 1524 | HRESULT ( STDMETHODCALLTYPE *GetCLRManager )( 1525 | ICLRControl * This, 1526 | /* [in] */ REFIID riid, 1527 | /* [out] */ void **ppObject); 1528 | 1529 | HRESULT ( STDMETHODCALLTYPE *SetAppDomainManagerType )( 1530 | ICLRControl * This, 1531 | /* [in] */ LPCWSTR pwzAppDomainManagerAssembly, 1532 | /* [in] */ LPCWSTR pwzAppDomainManagerType); 1533 | 1534 | END_INTERFACE 1535 | } ICLRControlVtbl; 1536 | 1537 | interface ICLRControl 1538 | { 1539 | CONST_VTBL struct ICLRControlVtbl *lpVtbl; 1540 | }; 1541 | 1542 | 1543 | 1544 | #ifdef COBJMACROS 1545 | 1546 | 1547 | #define ICLRControl_QueryInterface(This,riid,ppvObject) \ 1548 | ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 1549 | 1550 | #define ICLRControl_AddRef(This) \ 1551 | ( (This)->lpVtbl -> AddRef(This) ) 1552 | 1553 | #define ICLRControl_Release(This) \ 1554 | ( (This)->lpVtbl -> Release(This) ) 1555 | 1556 | 1557 | #define ICLRControl_GetCLRManager(This,riid,ppObject) \ 1558 | ( (This)->lpVtbl -> GetCLRManager(This,riid,ppObject) ) 1559 | 1560 | #define ICLRControl_SetAppDomainManagerType(This,pwzAppDomainManagerAssembly,pwzAppDomainManagerType) \ 1561 | ( (This)->lpVtbl -> SetAppDomainManagerType(This,pwzAppDomainManagerAssembly,pwzAppDomainManagerType) ) 1562 | 1563 | #endif /* COBJMACROS */ 1564 | 1565 | 1566 | #endif /* C style interface */ 1567 | 1568 | 1569 | 1570 | 1571 | #endif /* __ICLRControl_INTERFACE_DEFINED__ */ 1572 | 1573 | 1574 | #ifndef __ICLRRuntimeHost_INTERFACE_DEFINED__ 1575 | #define __ICLRRuntimeHost_INTERFACE_DEFINED__ 1576 | 1577 | /* interface ICLRRuntimeHost */ 1578 | /* [object][local][unique][helpstring][version][uuid] */ 1579 | 1580 | 1581 | EXTERN_C const IID IID_ICLRRuntimeHost; 1582 | 1583 | #if defined(__cplusplus) && !defined(CINTERFACE) 1584 | 1585 | MIDL_INTERFACE("90F1A06C-7712-4762-86B5-7A5EBA6BDB02") 1586 | ICLRRuntimeHost : public IUnknown 1587 | { 1588 | public: 1589 | virtual HRESULT STDMETHODCALLTYPE Start( void) = 0; 1590 | 1591 | virtual HRESULT STDMETHODCALLTYPE Stop( void) = 0; 1592 | 1593 | virtual HRESULT STDMETHODCALLTYPE SetHostControl( 1594 | /* [in] */ IHostControl *pHostControl) = 0; 1595 | 1596 | virtual HRESULT STDMETHODCALLTYPE GetCLRControl( 1597 | /* [out] */ ICLRControl **pCLRControl) = 0; 1598 | 1599 | virtual HRESULT STDMETHODCALLTYPE UnloadAppDomain( 1600 | /* [in] */ DWORD dwAppDomainId, 1601 | /* [in] */ BOOL fWaitUntilDone) = 0; 1602 | 1603 | virtual HRESULT STDMETHODCALLTYPE ExecuteInAppDomain( 1604 | /* [in] */ DWORD dwAppDomainId, 1605 | /* [in] */ FExecuteInAppDomainCallback pCallback, 1606 | /* [in] */ void *cookie) = 0; 1607 | 1608 | virtual HRESULT STDMETHODCALLTYPE GetCurrentAppDomainId( 1609 | /* [out] */ DWORD *pdwAppDomainId) = 0; 1610 | 1611 | virtual HRESULT STDMETHODCALLTYPE ExecuteApplication( 1612 | /* [in] */ LPCWSTR pwzAppFullName, 1613 | /* [in] */ DWORD dwManifestPaths, 1614 | /* [in] */ LPCWSTR *ppwzManifestPaths, 1615 | /* [in] */ DWORD dwActivationData, 1616 | /* [in] */ LPCWSTR *ppwzActivationData, 1617 | /* [out] */ int *pReturnValue) = 0; 1618 | 1619 | virtual HRESULT STDMETHODCALLTYPE ExecuteInDefaultAppDomain( 1620 | /* [in] */ LPCWSTR pwzAssemblyPath, 1621 | /* [in] */ LPCWSTR pwzTypeName, 1622 | /* [in] */ LPCWSTR pwzMethodName, 1623 | /* [in] */ LPCWSTR pwzArgument, 1624 | /* [out] */ DWORD *pReturnValue) = 0; 1625 | 1626 | }; 1627 | 1628 | 1629 | #else /* C style interface */ 1630 | 1631 | typedef struct ICLRRuntimeHostVtbl 1632 | { 1633 | BEGIN_INTERFACE 1634 | 1635 | HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 1636 | ICLRRuntimeHost * This, 1637 | /* [in] */ REFIID riid, 1638 | /* [annotation][iid_is][out] */ 1639 | _COM_Outptr_ void **ppvObject); 1640 | 1641 | ULONG ( STDMETHODCALLTYPE *AddRef )( 1642 | ICLRRuntimeHost * This); 1643 | 1644 | ULONG ( STDMETHODCALLTYPE *Release )( 1645 | ICLRRuntimeHost * This); 1646 | 1647 | HRESULT ( STDMETHODCALLTYPE *Start )( 1648 | ICLRRuntimeHost * This); 1649 | 1650 | HRESULT ( STDMETHODCALLTYPE *Stop )( 1651 | ICLRRuntimeHost * This); 1652 | 1653 | HRESULT ( STDMETHODCALLTYPE *SetHostControl )( 1654 | ICLRRuntimeHost * This, 1655 | /* [in] */ IHostControl *pHostControl); 1656 | 1657 | HRESULT ( STDMETHODCALLTYPE *GetCLRControl )( 1658 | ICLRRuntimeHost * This, 1659 | /* [out] */ ICLRControl **pCLRControl); 1660 | 1661 | HRESULT ( STDMETHODCALLTYPE *UnloadAppDomain )( 1662 | ICLRRuntimeHost * This, 1663 | /* [in] */ DWORD dwAppDomainId, 1664 | /* [in] */ BOOL fWaitUntilDone); 1665 | 1666 | HRESULT ( STDMETHODCALLTYPE *ExecuteInAppDomain )( 1667 | ICLRRuntimeHost * This, 1668 | /* [in] */ DWORD dwAppDomainId, 1669 | /* [in] */ FExecuteInAppDomainCallback pCallback, 1670 | /* [in] */ void *cookie); 1671 | 1672 | HRESULT ( STDMETHODCALLTYPE *GetCurrentAppDomainId )( 1673 | ICLRRuntimeHost * This, 1674 | /* [out] */ DWORD *pdwAppDomainId); 1675 | 1676 | HRESULT ( STDMETHODCALLTYPE *ExecuteApplication )( 1677 | ICLRRuntimeHost * This, 1678 | /* [in] */ LPCWSTR pwzAppFullName, 1679 | /* [in] */ DWORD dwManifestPaths, 1680 | /* [in] */ LPCWSTR *ppwzManifestPaths, 1681 | /* [in] */ DWORD dwActivationData, 1682 | /* [in] */ LPCWSTR *ppwzActivationData, 1683 | /* [out] */ int *pReturnValue); 1684 | 1685 | HRESULT ( STDMETHODCALLTYPE *ExecuteInDefaultAppDomain )( 1686 | ICLRRuntimeHost * This, 1687 | /* [in] */ LPCWSTR pwzAssemblyPath, 1688 | /* [in] */ LPCWSTR pwzTypeName, 1689 | /* [in] */ LPCWSTR pwzMethodName, 1690 | /* [in] */ LPCWSTR pwzArgument, 1691 | /* [out] */ DWORD *pReturnValue); 1692 | 1693 | END_INTERFACE 1694 | } ICLRRuntimeHostVtbl; 1695 | 1696 | interface ICLRRuntimeHost 1697 | { 1698 | CONST_VTBL struct ICLRRuntimeHostVtbl *lpVtbl; 1699 | }; 1700 | 1701 | 1702 | 1703 | #ifdef COBJMACROS 1704 | 1705 | 1706 | #define ICLRRuntimeHost_QueryInterface(This,riid,ppvObject) \ 1707 | ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 1708 | 1709 | #define ICLRRuntimeHost_AddRef(This) \ 1710 | ( (This)->lpVtbl -> AddRef(This) ) 1711 | 1712 | #define ICLRRuntimeHost_Release(This) \ 1713 | ( (This)->lpVtbl -> Release(This) ) 1714 | 1715 | 1716 | #define ICLRRuntimeHost_Start(This) \ 1717 | ( (This)->lpVtbl -> Start(This) ) 1718 | 1719 | #define ICLRRuntimeHost_Stop(This) \ 1720 | ( (This)->lpVtbl -> Stop(This) ) 1721 | 1722 | #define ICLRRuntimeHost_SetHostControl(This,pHostControl) \ 1723 | ( (This)->lpVtbl -> SetHostControl(This,pHostControl) ) 1724 | 1725 | #define ICLRRuntimeHost_GetCLRControl(This,pCLRControl) \ 1726 | ( (This)->lpVtbl -> GetCLRControl(This,pCLRControl) ) 1727 | 1728 | #define ICLRRuntimeHost_UnloadAppDomain(This,dwAppDomainId,fWaitUntilDone) \ 1729 | ( (This)->lpVtbl -> UnloadAppDomain(This,dwAppDomainId,fWaitUntilDone) ) 1730 | 1731 | #define ICLRRuntimeHost_ExecuteInAppDomain(This,dwAppDomainId,pCallback,cookie) \ 1732 | ( (This)->lpVtbl -> ExecuteInAppDomain(This,dwAppDomainId,pCallback,cookie) ) 1733 | 1734 | #define ICLRRuntimeHost_GetCurrentAppDomainId(This,pdwAppDomainId) \ 1735 | ( (This)->lpVtbl -> GetCurrentAppDomainId(This,pdwAppDomainId) ) 1736 | 1737 | #define ICLRRuntimeHost_ExecuteApplication(This,pwzAppFullName,dwManifestPaths,ppwzManifestPaths,dwActivationData,ppwzActivationData,pReturnValue) \ 1738 | ( (This)->lpVtbl -> ExecuteApplication(This,pwzAppFullName,dwManifestPaths,ppwzManifestPaths,dwActivationData,ppwzActivationData,pReturnValue) ) 1739 | 1740 | #define ICLRRuntimeHost_ExecuteInDefaultAppDomain(This,pwzAssemblyPath,pwzTypeName,pwzMethodName,pwzArgument,pReturnValue) \ 1741 | ( (This)->lpVtbl -> ExecuteInDefaultAppDomain(This,pwzAssemblyPath,pwzTypeName,pwzMethodName,pwzArgument,pReturnValue) ) 1742 | 1743 | #endif /* COBJMACROS */ 1744 | 1745 | 1746 | #endif /* C style interface */ 1747 | 1748 | 1749 | 1750 | 1751 | #endif /* __ICLRRuntimeHost_INTERFACE_DEFINED__ */ 1752 | 1753 | 1754 | /* interface __MIDL_itf_mscoree_0000_0010 */ 1755 | /* [local] */ 1756 | 1757 | #define CORECLR_HOST_AUTHENTICATION_KEY 0x1C6CA6F94025800LL 1758 | #define CORECLR_HOST_AUTHENTICATION_KEY_NONGEN 0x1C6CA6F94025801LL 1759 | 1760 | 1761 | extern RPC_IF_HANDLE __MIDL_itf_mscoree_0000_0010_v0_0_c_ifspec; 1762 | extern RPC_IF_HANDLE __MIDL_itf_mscoree_0000_0010_v0_0_s_ifspec; 1763 | 1764 | #ifndef __ICLRRuntimeHost2_INTERFACE_DEFINED__ 1765 | #define __ICLRRuntimeHost2_INTERFACE_DEFINED__ 1766 | 1767 | /* interface ICLRRuntimeHost2 */ 1768 | /* [local][unique][helpstring][version][uuid][object] */ 1769 | 1770 | 1771 | EXTERN_C const IID IID_ICLRRuntimeHost2; 1772 | 1773 | #if defined(__cplusplus) && !defined(CINTERFACE) 1774 | 1775 | MIDL_INTERFACE("712AB73F-2C22-4807-AD7E-F501D7B72C2D") 1776 | ICLRRuntimeHost2 : public ICLRRuntimeHost 1777 | { 1778 | public: 1779 | virtual HRESULT STDMETHODCALLTYPE CreateAppDomainWithManager( 1780 | /* [in] */ LPCWSTR wszFriendlyName, 1781 | /* [in] */ DWORD dwFlags, 1782 | /* [in] */ LPCWSTR wszAppDomainManagerAssemblyName, 1783 | /* [in] */ LPCWSTR wszAppDomainManagerTypeName, 1784 | /* [in] */ int nProperties, 1785 | /* [in] */ LPCWSTR *pPropertyNames, 1786 | /* [in] */ LPCWSTR *pPropertyValues, 1787 | /* [out] */ DWORD *pAppDomainID) = 0; 1788 | 1789 | virtual HRESULT STDMETHODCALLTYPE CreateDelegate( 1790 | /* [in] */ DWORD appDomainID, 1791 | /* [in] */ LPCWSTR wszAssemblyName, 1792 | /* [in] */ LPCWSTR wszClassName, 1793 | /* [in] */ LPCWSTR wszMethodName, 1794 | /* [out] */ INT_PTR *fnPtr) = 0; 1795 | 1796 | virtual HRESULT STDMETHODCALLTYPE Authenticate( 1797 | /* [in] */ ULONGLONG authKey) = 0; 1798 | 1799 | virtual HRESULT STDMETHODCALLTYPE RegisterMacEHPort( void) = 0; 1800 | 1801 | virtual HRESULT STDMETHODCALLTYPE SetStartupFlags( 1802 | /* [in] */ STARTUP_FLAGS dwFlags) = 0; 1803 | 1804 | }; 1805 | 1806 | 1807 | #else /* C style interface */ 1808 | 1809 | typedef struct ICLRRuntimeHost2Vtbl 1810 | { 1811 | BEGIN_INTERFACE 1812 | 1813 | HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 1814 | ICLRRuntimeHost2 * This, 1815 | /* [in] */ REFIID riid, 1816 | /* [annotation][iid_is][out] */ 1817 | _COM_Outptr_ void **ppvObject); 1818 | 1819 | ULONG ( STDMETHODCALLTYPE *AddRef )( 1820 | ICLRRuntimeHost2 * This); 1821 | 1822 | ULONG ( STDMETHODCALLTYPE *Release )( 1823 | ICLRRuntimeHost2 * This); 1824 | 1825 | HRESULT ( STDMETHODCALLTYPE *Start )( 1826 | ICLRRuntimeHost2 * This); 1827 | 1828 | HRESULT ( STDMETHODCALLTYPE *Stop )( 1829 | ICLRRuntimeHost2 * This); 1830 | 1831 | HRESULT ( STDMETHODCALLTYPE *SetHostControl )( 1832 | ICLRRuntimeHost2 * This, 1833 | /* [in] */ IHostControl *pHostControl); 1834 | 1835 | HRESULT ( STDMETHODCALLTYPE *GetCLRControl )( 1836 | ICLRRuntimeHost2 * This, 1837 | /* [out] */ ICLRControl **pCLRControl); 1838 | 1839 | HRESULT ( STDMETHODCALLTYPE *UnloadAppDomain )( 1840 | ICLRRuntimeHost2 * This, 1841 | /* [in] */ DWORD dwAppDomainId, 1842 | /* [in] */ BOOL fWaitUntilDone); 1843 | 1844 | HRESULT ( STDMETHODCALLTYPE *ExecuteInAppDomain )( 1845 | ICLRRuntimeHost2 * This, 1846 | /* [in] */ DWORD dwAppDomainId, 1847 | /* [in] */ FExecuteInAppDomainCallback pCallback, 1848 | /* [in] */ void *cookie); 1849 | 1850 | HRESULT ( STDMETHODCALLTYPE *GetCurrentAppDomainId )( 1851 | ICLRRuntimeHost2 * This, 1852 | /* [out] */ DWORD *pdwAppDomainId); 1853 | 1854 | HRESULT ( STDMETHODCALLTYPE *ExecuteApplication )( 1855 | ICLRRuntimeHost2 * This, 1856 | /* [in] */ LPCWSTR pwzAppFullName, 1857 | /* [in] */ DWORD dwManifestPaths, 1858 | /* [in] */ LPCWSTR *ppwzManifestPaths, 1859 | /* [in] */ DWORD dwActivationData, 1860 | /* [in] */ LPCWSTR *ppwzActivationData, 1861 | /* [out] */ int *pReturnValue); 1862 | 1863 | HRESULT ( STDMETHODCALLTYPE *ExecuteInDefaultAppDomain )( 1864 | ICLRRuntimeHost2 * This, 1865 | /* [in] */ LPCWSTR pwzAssemblyPath, 1866 | /* [in] */ LPCWSTR pwzTypeName, 1867 | /* [in] */ LPCWSTR pwzMethodName, 1868 | /* [in] */ LPCWSTR pwzArgument, 1869 | /* [out] */ DWORD *pReturnValue); 1870 | 1871 | HRESULT ( STDMETHODCALLTYPE *CreateAppDomainWithManager )( 1872 | ICLRRuntimeHost2 * This, 1873 | /* [in] */ LPCWSTR wszFriendlyName, 1874 | /* [in] */ DWORD dwFlags, 1875 | /* [in] */ LPCWSTR wszAppDomainManagerAssemblyName, 1876 | /* [in] */ LPCWSTR wszAppDomainManagerTypeName, 1877 | /* [in] */ int nProperties, 1878 | /* [in] */ LPCWSTR *pPropertyNames, 1879 | /* [in] */ LPCWSTR *pPropertyValues, 1880 | /* [out] */ DWORD *pAppDomainID); 1881 | 1882 | HRESULT ( STDMETHODCALLTYPE *CreateDelegate )( 1883 | ICLRRuntimeHost2 * This, 1884 | /* [in] */ DWORD appDomainID, 1885 | /* [in] */ LPCWSTR wszAssemblyName, 1886 | /* [in] */ LPCWSTR wszClassName, 1887 | /* [in] */ LPCWSTR wszMethodName, 1888 | /* [out] */ INT_PTR *fnPtr); 1889 | 1890 | HRESULT ( STDMETHODCALLTYPE *Authenticate )( 1891 | ICLRRuntimeHost2 * This, 1892 | /* [in] */ ULONGLONG authKey); 1893 | 1894 | HRESULT ( STDMETHODCALLTYPE *RegisterMacEHPort )( 1895 | ICLRRuntimeHost2 * This); 1896 | 1897 | HRESULT ( STDMETHODCALLTYPE *SetStartupFlags )( 1898 | ICLRRuntimeHost2 * This, 1899 | /* [in] */ STARTUP_FLAGS dwFlags); 1900 | 1901 | END_INTERFACE 1902 | } ICLRRuntimeHost2Vtbl; 1903 | 1904 | interface ICLRRuntimeHost2 1905 | { 1906 | CONST_VTBL struct ICLRRuntimeHost2Vtbl *lpVtbl; 1907 | }; 1908 | 1909 | 1910 | 1911 | #ifdef COBJMACROS 1912 | 1913 | 1914 | #define ICLRRuntimeHost2_QueryInterface(This,riid,ppvObject) \ 1915 | ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 1916 | 1917 | #define ICLRRuntimeHost2_AddRef(This) \ 1918 | ( (This)->lpVtbl -> AddRef(This) ) 1919 | 1920 | #define ICLRRuntimeHost2_Release(This) \ 1921 | ( (This)->lpVtbl -> Release(This) ) 1922 | 1923 | 1924 | #define ICLRRuntimeHost2_Start(This) \ 1925 | ( (This)->lpVtbl -> Start(This) ) 1926 | 1927 | #define ICLRRuntimeHost2_Stop(This) \ 1928 | ( (This)->lpVtbl -> Stop(This) ) 1929 | 1930 | #define ICLRRuntimeHost2_SetHostControl(This,pHostControl) \ 1931 | ( (This)->lpVtbl -> SetHostControl(This,pHostControl) ) 1932 | 1933 | #define ICLRRuntimeHost2_GetCLRControl(This,pCLRControl) \ 1934 | ( (This)->lpVtbl -> GetCLRControl(This,pCLRControl) ) 1935 | 1936 | #define ICLRRuntimeHost2_UnloadAppDomain(This,dwAppDomainId,fWaitUntilDone) \ 1937 | ( (This)->lpVtbl -> UnloadAppDomain(This,dwAppDomainId,fWaitUntilDone) ) 1938 | 1939 | #define ICLRRuntimeHost2_ExecuteInAppDomain(This,dwAppDomainId,pCallback,cookie) \ 1940 | ( (This)->lpVtbl -> ExecuteInAppDomain(This,dwAppDomainId,pCallback,cookie) ) 1941 | 1942 | #define ICLRRuntimeHost2_GetCurrentAppDomainId(This,pdwAppDomainId) \ 1943 | ( (This)->lpVtbl -> GetCurrentAppDomainId(This,pdwAppDomainId) ) 1944 | 1945 | #define ICLRRuntimeHost2_ExecuteApplication(This,pwzAppFullName,dwManifestPaths,ppwzManifestPaths,dwActivationData,ppwzActivationData,pReturnValue) \ 1946 | ( (This)->lpVtbl -> ExecuteApplication(This,pwzAppFullName,dwManifestPaths,ppwzManifestPaths,dwActivationData,ppwzActivationData,pReturnValue) ) 1947 | 1948 | #define ICLRRuntimeHost2_ExecuteInDefaultAppDomain(This,pwzAssemblyPath,pwzTypeName,pwzMethodName,pwzArgument,pReturnValue) \ 1949 | ( (This)->lpVtbl -> ExecuteInDefaultAppDomain(This,pwzAssemblyPath,pwzTypeName,pwzMethodName,pwzArgument,pReturnValue) ) 1950 | 1951 | 1952 | #define ICLRRuntimeHost2_CreateAppDomainWithManager(This,wszFriendlyName,dwFlags,wszAppDomainManagerAssemblyName,wszAppDomainManagerTypeName,nProperties,pPropertyNames,pPropertyValues,pAppDomainID) \ 1953 | ( (This)->lpVtbl -> CreateAppDomainWithManager(This,wszFriendlyName,dwFlags,wszAppDomainManagerAssemblyName,wszAppDomainManagerTypeName,nProperties,pPropertyNames,pPropertyValues,pAppDomainID) ) 1954 | 1955 | #define ICLRRuntimeHost2_CreateDelegate(This,appDomainID,wszAssemblyName,wszClassName,wszMethodName,fnPtr) \ 1956 | ( (This)->lpVtbl -> CreateDelegate(This,appDomainID,wszAssemblyName,wszClassName,wszMethodName,fnPtr) ) 1957 | 1958 | #define ICLRRuntimeHost2_Authenticate(This,authKey) \ 1959 | ( (This)->lpVtbl -> Authenticate(This,authKey) ) 1960 | 1961 | #define ICLRRuntimeHost2_RegisterMacEHPort(This) \ 1962 | ( (This)->lpVtbl -> RegisterMacEHPort(This) ) 1963 | 1964 | #define ICLRRuntimeHost2_SetStartupFlags(This,dwFlags) \ 1965 | ( (This)->lpVtbl -> SetStartupFlags(This,dwFlags) ) 1966 | 1967 | #endif /* COBJMACROS */ 1968 | 1969 | 1970 | #endif /* C style interface */ 1971 | 1972 | 1973 | 1974 | 1975 | #endif /* __ICLRRuntimeHost2_INTERFACE_DEFINED__ */ 1976 | 1977 | 1978 | #ifndef __ICLRExecutionManager_INTERFACE_DEFINED__ 1979 | #define __ICLRExecutionManager_INTERFACE_DEFINED__ 1980 | 1981 | /* interface ICLRExecutionManager */ 1982 | /* [object][local][unique][helpstring][version][uuid] */ 1983 | 1984 | 1985 | EXTERN_C const IID IID_ICLRExecutionManager; 1986 | 1987 | #if defined(__cplusplus) && !defined(CINTERFACE) 1988 | 1989 | MIDL_INTERFACE("1000A3E7-B420-4620-AE30-FB19B587AD1D") 1990 | ICLRExecutionManager : public IUnknown 1991 | { 1992 | public: 1993 | virtual HRESULT STDMETHODCALLTYPE Pause( 1994 | /* [in] */ DWORD dwAppDomainId, 1995 | /* [in] */ DWORD dwFlags) = 0; 1996 | 1997 | virtual HRESULT STDMETHODCALLTYPE Resume( 1998 | /* [in] */ DWORD dwAppDomainId) = 0; 1999 | 2000 | }; 2001 | 2002 | 2003 | #else /* C style interface */ 2004 | 2005 | typedef struct ICLRExecutionManagerVtbl 2006 | { 2007 | BEGIN_INTERFACE 2008 | 2009 | HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 2010 | ICLRExecutionManager * This, 2011 | /* [in] */ REFIID riid, 2012 | /* [annotation][iid_is][out] */ 2013 | _COM_Outptr_ void **ppvObject); 2014 | 2015 | ULONG ( STDMETHODCALLTYPE *AddRef )( 2016 | ICLRExecutionManager * This); 2017 | 2018 | ULONG ( STDMETHODCALLTYPE *Release )( 2019 | ICLRExecutionManager * This); 2020 | 2021 | HRESULT ( STDMETHODCALLTYPE *Pause )( 2022 | ICLRExecutionManager * This, 2023 | /* [in] */ DWORD dwAppDomainId, 2024 | /* [in] */ DWORD dwFlags); 2025 | 2026 | HRESULT ( STDMETHODCALLTYPE *Resume )( 2027 | ICLRExecutionManager * This, 2028 | /* [in] */ DWORD dwAppDomainId); 2029 | 2030 | END_INTERFACE 2031 | } ICLRExecutionManagerVtbl; 2032 | 2033 | interface ICLRExecutionManager 2034 | { 2035 | CONST_VTBL struct ICLRExecutionManagerVtbl *lpVtbl; 2036 | }; 2037 | 2038 | 2039 | 2040 | #ifdef COBJMACROS 2041 | 2042 | 2043 | #define ICLRExecutionManager_QueryInterface(This,riid,ppvObject) \ 2044 | ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 2045 | 2046 | #define ICLRExecutionManager_AddRef(This) \ 2047 | ( (This)->lpVtbl -> AddRef(This) ) 2048 | 2049 | #define ICLRExecutionManager_Release(This) \ 2050 | ( (This)->lpVtbl -> Release(This) ) 2051 | 2052 | 2053 | #define ICLRExecutionManager_Pause(This,dwAppDomainId,dwFlags) \ 2054 | ( (This)->lpVtbl -> Pause(This,dwAppDomainId,dwFlags) ) 2055 | 2056 | #define ICLRExecutionManager_Resume(This,dwAppDomainId) \ 2057 | ( (This)->lpVtbl -> Resume(This,dwAppDomainId) ) 2058 | 2059 | #endif /* COBJMACROS */ 2060 | 2061 | 2062 | #endif /* C style interface */ 2063 | 2064 | 2065 | 2066 | 2067 | #endif /* __ICLRExecutionManager_INTERFACE_DEFINED__ */ 2068 | 2069 | 2070 | #ifndef __IHostNetCFDebugControlManager_INTERFACE_DEFINED__ 2071 | #define __IHostNetCFDebugControlManager_INTERFACE_DEFINED__ 2072 | 2073 | /* interface IHostNetCFDebugControlManager */ 2074 | /* [object][local][unique][helpstring][version][uuid] */ 2075 | 2076 | 2077 | EXTERN_C const IID IID_IHostNetCFDebugControlManager; 2078 | 2079 | #if defined(__cplusplus) && !defined(CINTERFACE) 2080 | 2081 | MIDL_INTERFACE("F2833A0C-F944-48d8-940E-F59425EDBFCF") 2082 | IHostNetCFDebugControlManager : public IUnknown 2083 | { 2084 | public: 2085 | virtual HRESULT STDMETHODCALLTYPE NotifyPause( 2086 | DWORD dwReserved) = 0; 2087 | 2088 | virtual HRESULT STDMETHODCALLTYPE NotifyResume( 2089 | DWORD dwReserved) = 0; 2090 | 2091 | }; 2092 | 2093 | 2094 | #else /* C style interface */ 2095 | 2096 | typedef struct IHostNetCFDebugControlManagerVtbl 2097 | { 2098 | BEGIN_INTERFACE 2099 | 2100 | HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 2101 | IHostNetCFDebugControlManager * This, 2102 | /* [in] */ REFIID riid, 2103 | /* [annotation][iid_is][out] */ 2104 | _COM_Outptr_ void **ppvObject); 2105 | 2106 | ULONG ( STDMETHODCALLTYPE *AddRef )( 2107 | IHostNetCFDebugControlManager * This); 2108 | 2109 | ULONG ( STDMETHODCALLTYPE *Release )( 2110 | IHostNetCFDebugControlManager * This); 2111 | 2112 | HRESULT ( STDMETHODCALLTYPE *NotifyPause )( 2113 | IHostNetCFDebugControlManager * This, 2114 | DWORD dwReserved); 2115 | 2116 | HRESULT ( STDMETHODCALLTYPE *NotifyResume )( 2117 | IHostNetCFDebugControlManager * This, 2118 | DWORD dwReserved); 2119 | 2120 | END_INTERFACE 2121 | } IHostNetCFDebugControlManagerVtbl; 2122 | 2123 | interface IHostNetCFDebugControlManager 2124 | { 2125 | CONST_VTBL struct IHostNetCFDebugControlManagerVtbl *lpVtbl; 2126 | }; 2127 | 2128 | 2129 | 2130 | #ifdef COBJMACROS 2131 | 2132 | 2133 | #define IHostNetCFDebugControlManager_QueryInterface(This,riid,ppvObject) \ 2134 | ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 2135 | 2136 | #define IHostNetCFDebugControlManager_AddRef(This) \ 2137 | ( (This)->lpVtbl -> AddRef(This) ) 2138 | 2139 | #define IHostNetCFDebugControlManager_Release(This) \ 2140 | ( (This)->lpVtbl -> Release(This) ) 2141 | 2142 | 2143 | #define IHostNetCFDebugControlManager_NotifyPause(This,dwReserved) \ 2144 | ( (This)->lpVtbl -> NotifyPause(This,dwReserved) ) 2145 | 2146 | #define IHostNetCFDebugControlManager_NotifyResume(This,dwReserved) \ 2147 | ( (This)->lpVtbl -> NotifyResume(This,dwReserved) ) 2148 | 2149 | #endif /* COBJMACROS */ 2150 | 2151 | 2152 | #endif /* C style interface */ 2153 | 2154 | 2155 | 2156 | 2157 | #endif /* __IHostNetCFDebugControlManager_INTERFACE_DEFINED__ */ 2158 | 2159 | 2160 | /* interface __MIDL_itf_mscoree_0000_0013 */ 2161 | /* [local] */ 2162 | 2163 | typedef /* [public] */ 2164 | enum __MIDL___MIDL_itf_mscoree_0000_0013_0001 2165 | { 2166 | eNoChecks = 0, 2167 | eSynchronization = 0x1, 2168 | eSharedState = 0x2, 2169 | eExternalProcessMgmt = 0x4, 2170 | eSelfAffectingProcessMgmt = 0x8, 2171 | eExternalThreading = 0x10, 2172 | eSelfAffectingThreading = 0x20, 2173 | eSecurityInfrastructure = 0x40, 2174 | eUI = 0x80, 2175 | eMayLeakOnAbort = 0x100, 2176 | eAll = 0x1ff 2177 | } EApiCategories; 2178 | 2179 | typedef /* [public] */ 2180 | enum __MIDL___MIDL_itf_mscoree_0000_0013_0002 2181 | { 2182 | eInitializeNewDomainFlags_None = 0, 2183 | eInitializeNewDomainFlags_NoSecurityChanges = 0x2 2184 | } EInitializeNewDomainFlags; 2185 | 2186 | 2187 | 2188 | extern RPC_IF_HANDLE __MIDL_itf_mscoree_0000_0013_v0_0_c_ifspec; 2189 | extern RPC_IF_HANDLE __MIDL_itf_mscoree_0000_0013_v0_0_s_ifspec; 2190 | 2191 | 2192 | #ifndef __mscoree_LIBRARY_DEFINED__ 2193 | #define __mscoree_LIBRARY_DEFINED__ 2194 | 2195 | /* library mscoree */ 2196 | /* [helpstring][version][uuid] */ 2197 | 2198 | 2199 | EXTERN_C const IID LIBID_mscoree; 2200 | 2201 | #ifndef __ITypeName_INTERFACE_DEFINED__ 2202 | #define __ITypeName_INTERFACE_DEFINED__ 2203 | 2204 | /* interface ITypeName */ 2205 | /* [unique][helpstring][uuid][oleautomation][object] */ 2206 | 2207 | 2208 | EXTERN_C const IID IID_ITypeName; 2209 | 2210 | #if defined(__cplusplus) && !defined(CINTERFACE) 2211 | 2212 | MIDL_INTERFACE("B81FF171-20F3-11d2-8DCC-00A0C9B00522") 2213 | ITypeName : public IUnknown 2214 | { 2215 | public: 2216 | virtual HRESULT STDMETHODCALLTYPE GetNameCount( 2217 | /* [retval][out] */ DWORD *pCount) = 0; 2218 | 2219 | virtual HRESULT STDMETHODCALLTYPE GetNames( 2220 | /* [in] */ DWORD count, 2221 | /* [out] */ BSTR *rgbszNames, 2222 | /* [retval][out] */ DWORD *pCount) = 0; 2223 | 2224 | virtual HRESULT STDMETHODCALLTYPE GetTypeArgumentCount( 2225 | /* [retval][out] */ DWORD *pCount) = 0; 2226 | 2227 | virtual HRESULT STDMETHODCALLTYPE GetTypeArguments( 2228 | /* [in] */ DWORD count, 2229 | /* [out] */ ITypeName **rgpArguments, 2230 | /* [retval][out] */ DWORD *pCount) = 0; 2231 | 2232 | virtual HRESULT STDMETHODCALLTYPE GetModifierLength( 2233 | /* [retval][out] */ DWORD *pCount) = 0; 2234 | 2235 | virtual HRESULT STDMETHODCALLTYPE GetModifiers( 2236 | /* [in] */ DWORD count, 2237 | /* [out] */ DWORD *rgModifiers, 2238 | /* [retval][out] */ DWORD *pCount) = 0; 2239 | 2240 | virtual HRESULT STDMETHODCALLTYPE GetAssemblyName( 2241 | /* [retval][out] */ BSTR *rgbszAssemblyNames) = 0; 2242 | 2243 | }; 2244 | 2245 | 2246 | #else /* C style interface */ 2247 | 2248 | typedef struct ITypeNameVtbl 2249 | { 2250 | BEGIN_INTERFACE 2251 | 2252 | HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 2253 | ITypeName * This, 2254 | /* [in] */ REFIID riid, 2255 | /* [annotation][iid_is][out] */ 2256 | _COM_Outptr_ void **ppvObject); 2257 | 2258 | ULONG ( STDMETHODCALLTYPE *AddRef )( 2259 | ITypeName * This); 2260 | 2261 | ULONG ( STDMETHODCALLTYPE *Release )( 2262 | ITypeName * This); 2263 | 2264 | HRESULT ( STDMETHODCALLTYPE *GetNameCount )( 2265 | ITypeName * This, 2266 | /* [retval][out] */ DWORD *pCount); 2267 | 2268 | HRESULT ( STDMETHODCALLTYPE *GetNames )( 2269 | ITypeName * This, 2270 | /* [in] */ DWORD count, 2271 | /* [out] */ BSTR *rgbszNames, 2272 | /* [retval][out] */ DWORD *pCount); 2273 | 2274 | HRESULT ( STDMETHODCALLTYPE *GetTypeArgumentCount )( 2275 | ITypeName * This, 2276 | /* [retval][out] */ DWORD *pCount); 2277 | 2278 | HRESULT ( STDMETHODCALLTYPE *GetTypeArguments )( 2279 | ITypeName * This, 2280 | /* [in] */ DWORD count, 2281 | /* [out] */ ITypeName **rgpArguments, 2282 | /* [retval][out] */ DWORD *pCount); 2283 | 2284 | HRESULT ( STDMETHODCALLTYPE *GetModifierLength )( 2285 | ITypeName * This, 2286 | /* [retval][out] */ DWORD *pCount); 2287 | 2288 | HRESULT ( STDMETHODCALLTYPE *GetModifiers )( 2289 | ITypeName * This, 2290 | /* [in] */ DWORD count, 2291 | /* [out] */ DWORD *rgModifiers, 2292 | /* [retval][out] */ DWORD *pCount); 2293 | 2294 | HRESULT ( STDMETHODCALLTYPE *GetAssemblyName )( 2295 | ITypeName * This, 2296 | /* [retval][out] */ BSTR *rgbszAssemblyNames); 2297 | 2298 | END_INTERFACE 2299 | } ITypeNameVtbl; 2300 | 2301 | interface ITypeName 2302 | { 2303 | CONST_VTBL struct ITypeNameVtbl *lpVtbl; 2304 | }; 2305 | 2306 | 2307 | 2308 | #ifdef COBJMACROS 2309 | 2310 | 2311 | #define ITypeName_QueryInterface(This,riid,ppvObject) \ 2312 | ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 2313 | 2314 | #define ITypeName_AddRef(This) \ 2315 | ( (This)->lpVtbl -> AddRef(This) ) 2316 | 2317 | #define ITypeName_Release(This) \ 2318 | ( (This)->lpVtbl -> Release(This) ) 2319 | 2320 | 2321 | #define ITypeName_GetNameCount(This,pCount) \ 2322 | ( (This)->lpVtbl -> GetNameCount(This,pCount) ) 2323 | 2324 | #define ITypeName_GetNames(This,count,rgbszNames,pCount) \ 2325 | ( (This)->lpVtbl -> GetNames(This,count,rgbszNames,pCount) ) 2326 | 2327 | #define ITypeName_GetTypeArgumentCount(This,pCount) \ 2328 | ( (This)->lpVtbl -> GetTypeArgumentCount(This,pCount) ) 2329 | 2330 | #define ITypeName_GetTypeArguments(This,count,rgpArguments,pCount) \ 2331 | ( (This)->lpVtbl -> GetTypeArguments(This,count,rgpArguments,pCount) ) 2332 | 2333 | #define ITypeName_GetModifierLength(This,pCount) \ 2334 | ( (This)->lpVtbl -> GetModifierLength(This,pCount) ) 2335 | 2336 | #define ITypeName_GetModifiers(This,count,rgModifiers,pCount) \ 2337 | ( (This)->lpVtbl -> GetModifiers(This,count,rgModifiers,pCount) ) 2338 | 2339 | #define ITypeName_GetAssemblyName(This,rgbszAssemblyNames) \ 2340 | ( (This)->lpVtbl -> GetAssemblyName(This,rgbszAssemblyNames) ) 2341 | 2342 | #endif /* COBJMACROS */ 2343 | 2344 | 2345 | #endif /* C style interface */ 2346 | 2347 | 2348 | 2349 | 2350 | #endif /* __ITypeName_INTERFACE_DEFINED__ */ 2351 | 2352 | 2353 | #ifndef __ITypeNameBuilder_INTERFACE_DEFINED__ 2354 | #define __ITypeNameBuilder_INTERFACE_DEFINED__ 2355 | 2356 | /* interface ITypeNameBuilder */ 2357 | /* [unique][helpstring][uuid][oleautomation][object] */ 2358 | 2359 | 2360 | EXTERN_C const IID IID_ITypeNameBuilder; 2361 | 2362 | #if defined(__cplusplus) && !defined(CINTERFACE) 2363 | 2364 | MIDL_INTERFACE("B81FF171-20F3-11d2-8DCC-00A0C9B00523") 2365 | ITypeNameBuilder : public IUnknown 2366 | { 2367 | public: 2368 | virtual HRESULT STDMETHODCALLTYPE OpenGenericArguments( void) = 0; 2369 | 2370 | virtual HRESULT STDMETHODCALLTYPE CloseGenericArguments( void) = 0; 2371 | 2372 | virtual HRESULT STDMETHODCALLTYPE OpenGenericArgument( void) = 0; 2373 | 2374 | virtual HRESULT STDMETHODCALLTYPE CloseGenericArgument( void) = 0; 2375 | 2376 | virtual HRESULT STDMETHODCALLTYPE AddName( 2377 | /* [in] */ LPCWSTR szName) = 0; 2378 | 2379 | virtual HRESULT STDMETHODCALLTYPE AddPointer( void) = 0; 2380 | 2381 | virtual HRESULT STDMETHODCALLTYPE AddByRef( void) = 0; 2382 | 2383 | virtual HRESULT STDMETHODCALLTYPE AddSzArray( void) = 0; 2384 | 2385 | virtual HRESULT STDMETHODCALLTYPE AddArray( 2386 | /* [in] */ DWORD rank) = 0; 2387 | 2388 | virtual HRESULT STDMETHODCALLTYPE AddAssemblySpec( 2389 | /* [in] */ LPCWSTR szAssemblySpec) = 0; 2390 | 2391 | virtual HRESULT STDMETHODCALLTYPE ToString( 2392 | /* [retval][out] */ BSTR *pszStringRepresentation) = 0; 2393 | 2394 | virtual HRESULT STDMETHODCALLTYPE Clear( void) = 0; 2395 | 2396 | }; 2397 | 2398 | 2399 | #else /* C style interface */ 2400 | 2401 | typedef struct ITypeNameBuilderVtbl 2402 | { 2403 | BEGIN_INTERFACE 2404 | 2405 | HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 2406 | ITypeNameBuilder * This, 2407 | /* [in] */ REFIID riid, 2408 | /* [annotation][iid_is][out] */ 2409 | _COM_Outptr_ void **ppvObject); 2410 | 2411 | ULONG ( STDMETHODCALLTYPE *AddRef )( 2412 | ITypeNameBuilder * This); 2413 | 2414 | ULONG ( STDMETHODCALLTYPE *Release )( 2415 | ITypeNameBuilder * This); 2416 | 2417 | HRESULT ( STDMETHODCALLTYPE *OpenGenericArguments )( 2418 | ITypeNameBuilder * This); 2419 | 2420 | HRESULT ( STDMETHODCALLTYPE *CloseGenericArguments )( 2421 | ITypeNameBuilder * This); 2422 | 2423 | HRESULT ( STDMETHODCALLTYPE *OpenGenericArgument )( 2424 | ITypeNameBuilder * This); 2425 | 2426 | HRESULT ( STDMETHODCALLTYPE *CloseGenericArgument )( 2427 | ITypeNameBuilder * This); 2428 | 2429 | HRESULT ( STDMETHODCALLTYPE *AddName )( 2430 | ITypeNameBuilder * This, 2431 | /* [in] */ LPCWSTR szName); 2432 | 2433 | HRESULT ( STDMETHODCALLTYPE *AddPointer )( 2434 | ITypeNameBuilder * This); 2435 | 2436 | HRESULT ( STDMETHODCALLTYPE *AddByRef )( 2437 | ITypeNameBuilder * This); 2438 | 2439 | HRESULT ( STDMETHODCALLTYPE *AddSzArray )( 2440 | ITypeNameBuilder * This); 2441 | 2442 | HRESULT ( STDMETHODCALLTYPE *AddArray )( 2443 | ITypeNameBuilder * This, 2444 | /* [in] */ DWORD rank); 2445 | 2446 | HRESULT ( STDMETHODCALLTYPE *AddAssemblySpec )( 2447 | ITypeNameBuilder * This, 2448 | /* [in] */ LPCWSTR szAssemblySpec); 2449 | 2450 | HRESULT ( STDMETHODCALLTYPE *ToString )( 2451 | ITypeNameBuilder * This, 2452 | /* [retval][out] */ BSTR *pszStringRepresentation); 2453 | 2454 | HRESULT ( STDMETHODCALLTYPE *Clear )( 2455 | ITypeNameBuilder * This); 2456 | 2457 | END_INTERFACE 2458 | } ITypeNameBuilderVtbl; 2459 | 2460 | interface ITypeNameBuilder 2461 | { 2462 | CONST_VTBL struct ITypeNameBuilderVtbl *lpVtbl; 2463 | }; 2464 | 2465 | 2466 | 2467 | #ifdef COBJMACROS 2468 | 2469 | 2470 | #define ITypeNameBuilder_QueryInterface(This,riid,ppvObject) \ 2471 | ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 2472 | 2473 | #define ITypeNameBuilder_AddRef(This) \ 2474 | ( (This)->lpVtbl -> AddRef(This) ) 2475 | 2476 | #define ITypeNameBuilder_Release(This) \ 2477 | ( (This)->lpVtbl -> Release(This) ) 2478 | 2479 | 2480 | #define ITypeNameBuilder_OpenGenericArguments(This) \ 2481 | ( (This)->lpVtbl -> OpenGenericArguments(This) ) 2482 | 2483 | #define ITypeNameBuilder_CloseGenericArguments(This) \ 2484 | ( (This)->lpVtbl -> CloseGenericArguments(This) ) 2485 | 2486 | #define ITypeNameBuilder_OpenGenericArgument(This) \ 2487 | ( (This)->lpVtbl -> OpenGenericArgument(This) ) 2488 | 2489 | #define ITypeNameBuilder_CloseGenericArgument(This) \ 2490 | ( (This)->lpVtbl -> CloseGenericArgument(This) ) 2491 | 2492 | #define ITypeNameBuilder_AddName(This,szName) \ 2493 | ( (This)->lpVtbl -> AddName(This,szName) ) 2494 | 2495 | #define ITypeNameBuilder_AddPointer(This) \ 2496 | ( (This)->lpVtbl -> AddPointer(This) ) 2497 | 2498 | #define ITypeNameBuilder_AddByRef(This) \ 2499 | ( (This)->lpVtbl -> AddByRef(This) ) 2500 | 2501 | #define ITypeNameBuilder_AddSzArray(This) \ 2502 | ( (This)->lpVtbl -> AddSzArray(This) ) 2503 | 2504 | #define ITypeNameBuilder_AddArray(This,rank) \ 2505 | ( (This)->lpVtbl -> AddArray(This,rank) ) 2506 | 2507 | #define ITypeNameBuilder_AddAssemblySpec(This,szAssemblySpec) \ 2508 | ( (This)->lpVtbl -> AddAssemblySpec(This,szAssemblySpec) ) 2509 | 2510 | #define ITypeNameBuilder_ToString(This,pszStringRepresentation) \ 2511 | ( (This)->lpVtbl -> ToString(This,pszStringRepresentation) ) 2512 | 2513 | #define ITypeNameBuilder_Clear(This) \ 2514 | ( (This)->lpVtbl -> Clear(This) ) 2515 | 2516 | #endif /* COBJMACROS */ 2517 | 2518 | 2519 | #endif /* C style interface */ 2520 | 2521 | 2522 | 2523 | 2524 | #endif /* __ITypeNameBuilder_INTERFACE_DEFINED__ */ 2525 | 2526 | 2527 | #ifndef __ITypeNameFactory_INTERFACE_DEFINED__ 2528 | #define __ITypeNameFactory_INTERFACE_DEFINED__ 2529 | 2530 | /* interface ITypeNameFactory */ 2531 | /* [unique][helpstring][uuid][oleautomation][object] */ 2532 | 2533 | 2534 | EXTERN_C const IID IID_ITypeNameFactory; 2535 | 2536 | #if defined(__cplusplus) && !defined(CINTERFACE) 2537 | 2538 | MIDL_INTERFACE("B81FF171-20F3-11d2-8DCC-00A0C9B00521") 2539 | ITypeNameFactory : public IUnknown 2540 | { 2541 | public: 2542 | virtual HRESULT STDMETHODCALLTYPE ParseTypeName( 2543 | /* [in] */ LPCWSTR szName, 2544 | /* [out] */ DWORD *pError, 2545 | /* [retval][out] */ ITypeName **ppTypeName) = 0; 2546 | 2547 | virtual HRESULT STDMETHODCALLTYPE GetTypeNameBuilder( 2548 | /* [retval][out] */ ITypeNameBuilder **ppTypeBuilder) = 0; 2549 | 2550 | }; 2551 | 2552 | 2553 | #else /* C style interface */ 2554 | 2555 | typedef struct ITypeNameFactoryVtbl 2556 | { 2557 | BEGIN_INTERFACE 2558 | 2559 | HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 2560 | ITypeNameFactory * This, 2561 | /* [in] */ REFIID riid, 2562 | /* [annotation][iid_is][out] */ 2563 | _COM_Outptr_ void **ppvObject); 2564 | 2565 | ULONG ( STDMETHODCALLTYPE *AddRef )( 2566 | ITypeNameFactory * This); 2567 | 2568 | ULONG ( STDMETHODCALLTYPE *Release )( 2569 | ITypeNameFactory * This); 2570 | 2571 | HRESULT ( STDMETHODCALLTYPE *ParseTypeName )( 2572 | ITypeNameFactory * This, 2573 | /* [in] */ LPCWSTR szName, 2574 | /* [out] */ DWORD *pError, 2575 | /* [retval][out] */ ITypeName **ppTypeName); 2576 | 2577 | HRESULT ( STDMETHODCALLTYPE *GetTypeNameBuilder )( 2578 | ITypeNameFactory * This, 2579 | /* [retval][out] */ ITypeNameBuilder **ppTypeBuilder); 2580 | 2581 | END_INTERFACE 2582 | } ITypeNameFactoryVtbl; 2583 | 2584 | interface ITypeNameFactory 2585 | { 2586 | CONST_VTBL struct ITypeNameFactoryVtbl *lpVtbl; 2587 | }; 2588 | 2589 | 2590 | 2591 | #ifdef COBJMACROS 2592 | 2593 | 2594 | #define ITypeNameFactory_QueryInterface(This,riid,ppvObject) \ 2595 | ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 2596 | 2597 | #define ITypeNameFactory_AddRef(This) \ 2598 | ( (This)->lpVtbl -> AddRef(This) ) 2599 | 2600 | #define ITypeNameFactory_Release(This) \ 2601 | ( (This)->lpVtbl -> Release(This) ) 2602 | 2603 | 2604 | #define ITypeNameFactory_ParseTypeName(This,szName,pError,ppTypeName) \ 2605 | ( (This)->lpVtbl -> ParseTypeName(This,szName,pError,ppTypeName) ) 2606 | 2607 | #define ITypeNameFactory_GetTypeNameBuilder(This,ppTypeBuilder) \ 2608 | ( (This)->lpVtbl -> GetTypeNameBuilder(This,ppTypeBuilder) ) 2609 | 2610 | #endif /* COBJMACROS */ 2611 | 2612 | 2613 | #endif /* C style interface */ 2614 | 2615 | 2616 | 2617 | 2618 | #endif /* __ITypeNameFactory_INTERFACE_DEFINED__ */ 2619 | 2620 | 2621 | #ifndef __IManagedObject_INTERFACE_DEFINED__ 2622 | #define __IManagedObject_INTERFACE_DEFINED__ 2623 | 2624 | /* interface IManagedObject */ 2625 | /* [proxy][unique][helpstring][uuid][oleautomation][object] */ 2626 | 2627 | 2628 | EXTERN_C const IID IID_IManagedObject; 2629 | 2630 | #if defined(__cplusplus) && !defined(CINTERFACE) 2631 | 2632 | MIDL_INTERFACE("C3FCC19E-A970-11d2-8B5A-00A0C9B7C9C4") 2633 | IManagedObject : public IUnknown 2634 | { 2635 | public: 2636 | virtual HRESULT STDMETHODCALLTYPE GetSerializedBuffer( 2637 | /* [out] */ BSTR *pBSTR) = 0; 2638 | 2639 | virtual HRESULT STDMETHODCALLTYPE GetObjectIdentity( 2640 | /* [out] */ BSTR *pBSTRGUID, 2641 | /* [out] */ int *AppDomainID, 2642 | /* [out] */ int *pCCW) = 0; 2643 | 2644 | }; 2645 | 2646 | 2647 | #else /* C style interface */ 2648 | 2649 | typedef struct IManagedObjectVtbl 2650 | { 2651 | BEGIN_INTERFACE 2652 | 2653 | HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 2654 | IManagedObject * This, 2655 | /* [in] */ REFIID riid, 2656 | /* [annotation][iid_is][out] */ 2657 | _COM_Outptr_ void **ppvObject); 2658 | 2659 | ULONG ( STDMETHODCALLTYPE *AddRef )( 2660 | IManagedObject * This); 2661 | 2662 | ULONG ( STDMETHODCALLTYPE *Release )( 2663 | IManagedObject * This); 2664 | 2665 | HRESULT ( STDMETHODCALLTYPE *GetSerializedBuffer )( 2666 | IManagedObject * This, 2667 | /* [out] */ BSTR *pBSTR); 2668 | 2669 | HRESULT ( STDMETHODCALLTYPE *GetObjectIdentity )( 2670 | IManagedObject * This, 2671 | /* [out] */ BSTR *pBSTRGUID, 2672 | /* [out] */ int *AppDomainID, 2673 | /* [out] */ int *pCCW); 2674 | 2675 | END_INTERFACE 2676 | } IManagedObjectVtbl; 2677 | 2678 | interface IManagedObject 2679 | { 2680 | CONST_VTBL struct IManagedObjectVtbl *lpVtbl; 2681 | }; 2682 | 2683 | 2684 | 2685 | #ifdef COBJMACROS 2686 | 2687 | 2688 | #define IManagedObject_QueryInterface(This,riid,ppvObject) \ 2689 | ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 2690 | 2691 | #define IManagedObject_AddRef(This) \ 2692 | ( (This)->lpVtbl -> AddRef(This) ) 2693 | 2694 | #define IManagedObject_Release(This) \ 2695 | ( (This)->lpVtbl -> Release(This) ) 2696 | 2697 | 2698 | #define IManagedObject_GetSerializedBuffer(This,pBSTR) \ 2699 | ( (This)->lpVtbl -> GetSerializedBuffer(This,pBSTR) ) 2700 | 2701 | #define IManagedObject_GetObjectIdentity(This,pBSTRGUID,AppDomainID,pCCW) \ 2702 | ( (This)->lpVtbl -> GetObjectIdentity(This,pBSTRGUID,AppDomainID,pCCW) ) 2703 | 2704 | #endif /* COBJMACROS */ 2705 | 2706 | 2707 | #endif /* C style interface */ 2708 | 2709 | 2710 | 2711 | 2712 | #endif /* __IManagedObject_INTERFACE_DEFINED__ */ 2713 | 2714 | 2715 | EXTERN_C const CLSID CLSID_ComCallUnmarshal; 2716 | 2717 | #ifdef __cplusplus 2718 | 2719 | class DECLSPEC_UUID("3F281000-E95A-11d2-886B-00C04F869F04") 2720 | ComCallUnmarshal; 2721 | #endif 2722 | 2723 | EXTERN_C const CLSID CLSID_ComCallUnmarshalV4; 2724 | 2725 | #ifdef __cplusplus 2726 | 2727 | class DECLSPEC_UUID("45FB4600-E6E8-4928-B25E-50476FF79425") 2728 | ComCallUnmarshalV4; 2729 | #endif 2730 | 2731 | EXTERN_C const CLSID CLSID_CLRRuntimeHost; 2732 | 2733 | #ifdef __cplusplus 2734 | 2735 | class DECLSPEC_UUID("90F1A06E-7712-4762-86B5-7A5EBA6BDB02") 2736 | CLRRuntimeHost; 2737 | #endif 2738 | 2739 | EXTERN_C const CLSID CLSID_TypeNameFactory; 2740 | 2741 | #ifdef __cplusplus 2742 | 2743 | class DECLSPEC_UUID("B81FF171-20F3-11d2-8DCC-00A0C9B00525") 2744 | TypeNameFactory; 2745 | #endif 2746 | #endif /* __mscoree_LIBRARY_DEFINED__ */ 2747 | 2748 | /* interface __MIDL_itf_mscoree_0000_0014 */ 2749 | /* [local] */ 2750 | 2751 | typedef /* [public] */ 2752 | enum __MIDL___MIDL_itf_mscoree_0000_0014_0001 2753 | { 2754 | eCurrentContext = 0, 2755 | eRestrictedContext = 0x1 2756 | } EContextType; 2757 | 2758 | 2759 | 2760 | extern RPC_IF_HANDLE __MIDL_itf_mscoree_0000_0014_v0_0_c_ifspec; 2761 | extern RPC_IF_HANDLE __MIDL_itf_mscoree_0000_0014_v0_0_s_ifspec; 2762 | 2763 | #ifndef __ICLRAppDomainResourceMonitor_INTERFACE_DEFINED__ 2764 | #define __ICLRAppDomainResourceMonitor_INTERFACE_DEFINED__ 2765 | 2766 | /* interface ICLRAppDomainResourceMonitor */ 2767 | /* [object][local][unique][helpstring][uuid][version] */ 2768 | 2769 | 2770 | EXTERN_C const IID IID_ICLRAppDomainResourceMonitor; 2771 | 2772 | #if defined(__cplusplus) && !defined(CINTERFACE) 2773 | 2774 | MIDL_INTERFACE("c62de18c-2e23-4aea-8423-b40c1fc59eae") 2775 | ICLRAppDomainResourceMonitor : public IUnknown 2776 | { 2777 | public: 2778 | virtual HRESULT STDMETHODCALLTYPE GetCurrentAllocated( 2779 | /* [in] */ DWORD dwAppDomainId, 2780 | /* [out] */ ULONGLONG *pBytesAllocated) = 0; 2781 | 2782 | virtual HRESULT STDMETHODCALLTYPE GetCurrentSurvived( 2783 | /* [in] */ DWORD dwAppDomainId, 2784 | /* [out] */ ULONGLONG *pAppDomainBytesSurvived, 2785 | /* [out] */ ULONGLONG *pTotalBytesSurvived) = 0; 2786 | 2787 | virtual HRESULT STDMETHODCALLTYPE GetCurrentCpuTime( 2788 | /* [in] */ DWORD dwAppDomainId, 2789 | /* [out] */ ULONGLONG *pMilliseconds) = 0; 2790 | 2791 | }; 2792 | 2793 | 2794 | #else /* C style interface */ 2795 | 2796 | typedef struct ICLRAppDomainResourceMonitorVtbl 2797 | { 2798 | BEGIN_INTERFACE 2799 | 2800 | HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 2801 | ICLRAppDomainResourceMonitor * This, 2802 | /* [in] */ REFIID riid, 2803 | /* [annotation][iid_is][out] */ 2804 | _COM_Outptr_ void **ppvObject); 2805 | 2806 | ULONG ( STDMETHODCALLTYPE *AddRef )( 2807 | ICLRAppDomainResourceMonitor * This); 2808 | 2809 | ULONG ( STDMETHODCALLTYPE *Release )( 2810 | ICLRAppDomainResourceMonitor * This); 2811 | 2812 | HRESULT ( STDMETHODCALLTYPE *GetCurrentAllocated )( 2813 | ICLRAppDomainResourceMonitor * This, 2814 | /* [in] */ DWORD dwAppDomainId, 2815 | /* [out] */ ULONGLONG *pBytesAllocated); 2816 | 2817 | HRESULT ( STDMETHODCALLTYPE *GetCurrentSurvived )( 2818 | ICLRAppDomainResourceMonitor * This, 2819 | /* [in] */ DWORD dwAppDomainId, 2820 | /* [out] */ ULONGLONG *pAppDomainBytesSurvived, 2821 | /* [out] */ ULONGLONG *pTotalBytesSurvived); 2822 | 2823 | HRESULT ( STDMETHODCALLTYPE *GetCurrentCpuTime )( 2824 | ICLRAppDomainResourceMonitor * This, 2825 | /* [in] */ DWORD dwAppDomainId, 2826 | /* [out] */ ULONGLONG *pMilliseconds); 2827 | 2828 | END_INTERFACE 2829 | } ICLRAppDomainResourceMonitorVtbl; 2830 | 2831 | interface ICLRAppDomainResourceMonitor 2832 | { 2833 | CONST_VTBL struct ICLRAppDomainResourceMonitorVtbl *lpVtbl; 2834 | }; 2835 | 2836 | 2837 | 2838 | #ifdef COBJMACROS 2839 | 2840 | 2841 | #define ICLRAppDomainResourceMonitor_QueryInterface(This,riid,ppvObject) \ 2842 | ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 2843 | 2844 | #define ICLRAppDomainResourceMonitor_AddRef(This) \ 2845 | ( (This)->lpVtbl -> AddRef(This) ) 2846 | 2847 | #define ICLRAppDomainResourceMonitor_Release(This) \ 2848 | ( (This)->lpVtbl -> Release(This) ) 2849 | 2850 | 2851 | #define ICLRAppDomainResourceMonitor_GetCurrentAllocated(This,dwAppDomainId,pBytesAllocated) \ 2852 | ( (This)->lpVtbl -> GetCurrentAllocated(This,dwAppDomainId,pBytesAllocated) ) 2853 | 2854 | #define ICLRAppDomainResourceMonitor_GetCurrentSurvived(This,dwAppDomainId,pAppDomainBytesSurvived,pTotalBytesSurvived) \ 2855 | ( (This)->lpVtbl -> GetCurrentSurvived(This,dwAppDomainId,pAppDomainBytesSurvived,pTotalBytesSurvived) ) 2856 | 2857 | #define ICLRAppDomainResourceMonitor_GetCurrentCpuTime(This,dwAppDomainId,pMilliseconds) \ 2858 | ( (This)->lpVtbl -> GetCurrentCpuTime(This,dwAppDomainId,pMilliseconds) ) 2859 | 2860 | #endif /* COBJMACROS */ 2861 | 2862 | 2863 | #endif /* C style interface */ 2864 | 2865 | 2866 | 2867 | 2868 | #endif /* __ICLRAppDomainResourceMonitor_INTERFACE_DEFINED__ */ 2869 | 2870 | 2871 | /* interface __MIDL_itf_mscoree_0000_0015 */ 2872 | /* [local] */ 2873 | 2874 | #undef DEPRECATED_CLR_STDAPI 2875 | #undef DECLARE_DEPRECATED 2876 | #undef DEPRECATED_CLR_API_MESG 2877 | 2878 | 2879 | extern RPC_IF_HANDLE __MIDL_itf_mscoree_0000_0015_v0_0_c_ifspec; 2880 | extern RPC_IF_HANDLE __MIDL_itf_mscoree_0000_0015_v0_0_s_ifspec; 2881 | 2882 | /* Additional Prototypes for ALL interfaces */ 2883 | 2884 | /* end of Additional Prototypes */ 2885 | 2886 | #ifdef __cplusplus 2887 | } 2888 | #endif 2889 | 2890 | #endif 2891 | 2892 | 2893 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Fancy.CoreClrHost 2 | ================= 3 | 4 | A host application to start .NET Core Crl with user defined assemblies. 5 | 6 | ##What is Fancy.CoreClrHost 7 | Fancy.CoreClrHost enables you to start .NET Code (IL) assemblies using the .NET Core Clr runtime. The assembly which you want to run may not have dependencies to assemblies of the full .NET Framework (no directly and also no indirectly references). Use only nuget packages. 8 | 9 | ## How to use it 10 | Add the [Fancy.CoreClrHost](https://www.nuget.org/packages/Fancy.CoreClrHost/) nuget package and the CoreClr package to your project (currently you can get the CoreClr package from the aspnetvnext package feed located at myget.org. 11 | 12 | Within your project create a static method which takes no arguments and has no return value. This is the entry point into you .NET code. 13 | 14 | Compile your project and call Fancy.CoreClrHost.exe with the following command line arguments: 15 | 16 | - --CoreClrFolderPath: Path to folder containing coreclr (The contents of the CoreClr nuget package). 17 | - --AppFolderPath: Path to the folder containing your .NET assemblies you wand to execute code from. 18 | - --EntryPointAssemblyName: The name of the assembly containing your entry point. 19 | - --EntryPointTypeName: The name of the type containing the method you want to start. 20 | - --EntryPointMethodName:The name of the method you want to run. 21 | 22 | ## Example 23 | Imagine we have the follwing .NET Code compiled into an assembly: 24 | ``` 25 | namespace CoreClrExampleAssembly 26 | { 27 | public class Program 28 | { 29 | public static int Main() 30 | { 31 | Console.WriteLine("Hello .NET Core"); 32 | Console.ReadLine(); 33 | } 34 | } 35 | } 36 | ``` 37 | Lets assume the compiled code of the example can be found at C:\Dev\CoreClrExampleAssembly.dll and the contents of the CoreClr package at C:\Dev\CoreClr. 38 | 39 | To run the main method using CoreClr you have to use the follwing command line. 40 | 41 | ``` 42 | Fancy.CoreClrHost.exe --CoreClrFolderPath:C:\Dev\CoreClr\Runtime\x86\ --AppFolderPath:C:\Dev\ --EntryPointAssemblyName:CoreClrExampleAssembly --EntryPointTypeName:CoreClrExampleAssembly.Program --EntryPointMethodName:Main 43 | ``` 44 | 45 | ## Known Issues 46 | - Currently all paths you provide need to be absolute path and need to end with a backslash. 47 | - Debugging with Visual Studio is possible but only if you attach the debugger when the application is already running. Directly starting the application from Visual Studio with the Debugger (F5) is currently not possible. 48 | - Currently only the the CoreClr NuGet package from the Asp.NET vNext feed at myget.org is supported (the release Version of CoreClr at nuget.org has a different package structure). Support for the release version of CoreClr is not yet implemented. 49 | 50 | ## Requirements 51 | - If you load the NuGet Package and want to run the executeable you need to have the Visual Studio 2015 (v140) C++ Runtime installed on your machine 52 | 53 | ### More Information: 54 | To get some background you can also read my blog posts: 55 | 56 | [http://www.fancy-development.net/fancy-coreclrhost-published](http://www.fancy-development.net/fancy-coreclrhost-published) 57 | [http://www.fancy-development.net/hosting-net-core-clr-in-your-own-process](http://www.fancy-development.net/hosting-net-core-clr-in-your-own-process) --------------------------------------------------------------------------------