summaryrefslogtreecommitdiff
path: root/src/inc
diff options
context:
space:
mode:
Diffstat (limited to 'src/inc')
-rw-r--r--src/inc/CMakeLists.txt1
-rw-r--r--src/inc/CrstTypes.def6
-rw-r--r--src/inc/MSCOREE.IDL1353
-rw-r--r--src/inc/apithreadstress.h33
-rw-r--r--src/inc/appxutil.h93
-rw-r--r--src/inc/binderngen.idl1
-rw-r--r--src/inc/clrconfig.h10
-rw-r--r--src/inc/clrconfigvalues.h50
-rw-r--r--src/inc/clrhost.h2
-rw-r--r--src/inc/clrinternal.idl195
-rw-r--r--src/inc/clrnt.h2
-rw-r--r--src/inc/clrprivbinderutil.h125
-rw-r--r--src/inc/clrtypes.h2
-rw-r--r--src/inc/cor.h15
-rw-r--r--src/inc/corbbtprof.h27
-rw-r--r--src/inc/corcompile.h107
-rw-r--r--src/inc/coregen.h1
-rw-r--r--src/inc/corhdr.h1
-rw-r--r--src/inc/corhost.h697
-rw-r--r--src/inc/corinfo.h149
-rw-r--r--src/inc/corjit.h93
-rw-r--r--src/inc/corpolicy.h40
-rw-r--r--src/inc/corpriv.h171
-rw-r--r--src/inc/corprof.idl9
-rw-r--r--src/inc/crosscomp.h4
-rw-r--r--src/inc/crsttypes.h260
-rw-r--r--src/inc/daccess.h9
-rw-r--r--src/inc/dacprivate.h23
-rw-r--r--src/inc/dacvars.h72
-rw-r--r--src/inc/eetwain.h5
-rw-r--r--src/inc/eventtracebase.h10
-rw-r--r--src/inc/formattype.cpp2
-rw-r--r--src/inc/fusion.idl288
-rw-r--r--src/inc/fusionbind.h316
-rw-r--r--src/inc/fusionpriv.idl970
-rw-r--r--src/inc/fusionsink.h129
-rw-r--r--src/inc/gchost.idl95
-rw-r--r--src/inc/holder.h31
-rw-r--r--src/inc/jithelpers.h44
-rw-r--r--src/inc/legacyactivationshim.h1382
-rw-r--r--src/inc/legacyactivationshimdelayload.h13
-rw-r--r--src/inc/loglf.h66
-rw-r--r--src/inc/longfilepathwrappers.h115
-rw-r--r--src/inc/metadatatracker.h2
-rw-r--r--src/inc/mscoruef.idl117
-rw-r--r--src/inc/newapis.h16
-rw-r--r--src/inc/palclr_win.h61
-rw-r--r--src/inc/profilepriv.h4
-rw-r--r--src/inc/readytorun.h15
-rw-r--r--src/inc/readytorunhelpers.h2
-rw-r--r--src/inc/regdisp.h67
-rw-r--r--src/inc/registrywrapper.h28
-rw-r--r--src/inc/shimload.h11
-rw-r--r--src/inc/stacktrace.h6
-rw-r--r--src/inc/stdmacros.h2
-rw-r--r--src/inc/stgpool.h15
-rw-r--r--src/inc/switches.h37
-rw-r--r--src/inc/tlbutils.h52
-rw-r--r--src/inc/utilcode.h250
-rw-r--r--src/inc/volatile.h2
-rw-r--r--src/inc/vptr_list.h30
-rw-r--r--src/inc/winrt/windowsruntime.h17
-rw-r--r--src/inc/winwrap.h13
-rw-r--r--src/inc/zapper.h116
64 files changed, 376 insertions, 7504 deletions
diff --git a/src/inc/CMakeLists.txt b/src/inc/CMakeLists.txt
index d38fa40773..40499b44ea 100644
--- a/src/inc/CMakeLists.txt
+++ b/src/inc/CMakeLists.txt
@@ -9,7 +9,6 @@ set( CORGUIDS_IDL_SOURCES
ivalidator.idl
ivehandler.idl
gchost.idl
- fusionpriv.idl
mscorsvc.idl
tlbimpexp.idl
clrprivappxhosting.idl
diff --git a/src/inc/CrstTypes.def b/src/inc/CrstTypes.def
index bb6e710647..227f986a85 100644
--- a/src/inc/CrstTypes.def
+++ b/src/inc/CrstTypes.def
@@ -778,4 +778,8 @@ End
Crst InlineTrackingMap
AcquiredBefore IbcProfile
-End \ No newline at end of file
+End
+
+Crst EventPipe
+ AcquiredBefore ThreadIdDispenser ThreadStore
+End
diff --git a/src/inc/MSCOREE.IDL b/src/inc/MSCOREE.IDL
index 67605e23d4..97e2f2aca6 100644
--- a/src/inc/MSCOREE.IDL
+++ b/src/inc/MSCOREE.IDL
@@ -10,38 +10,24 @@
** **
**************************************************************************************/
-#ifdef FEATURE_CORECLR
-// API deprecation does not apply to CoreCLR
cpp_quote("#define DECLARE_DEPRECATED ")
cpp_quote("#define DEPRECATED_CLR_STDAPI STDAPI")
-#else // !FEATURE_CORECLR
-// API deprecation is only applicable to Desktop runtime.
-cpp_quote("#ifndef USE_DEPRECATED_CLR_API_WITHOUT_WARNING")
-cpp_quote("#define DEPRECATED_CLR_API_MESG \"This API has been deprecated. Refer to http://go.microsoft.com/fwlink/?LinkId=143720 for more details.\"")
-cpp_quote("#define DECLARE_DEPRECATED __declspec(deprecated(DEPRECATED_CLR_API_MESG))")
-cpp_quote("#define DEPRECATED_CLR_STDAPI EXTERN_C DECLARE_DEPRECATED HRESULT STDAPICALLTYPE")
-cpp_quote("#else // USE_DEPRECATED_CLR_API_WITHOUT_WARNING")
-cpp_quote("#define DECLARE_DEPRECATED ")
-cpp_quote("#define DEPRECATED_CLR_STDAPI STDAPI")
-cpp_quote("#endif // !USE_DEPRECATED_CLR_API_WITHOUT_WARNING")
-#endif // FEATURE_CORECLR
+
cpp_quote("")
//
// Interface descriptions
//
import "unknwn.idl";
-#if defined(FEATURE_INCLUDE_ALL_INTERFACES) || defined(FEATURE_WINDOWSPHONE)
+#if defined(FEATURE_WINDOWSPHONE)
import "gchost.idl";
#endif
import "ivalidator.idl";
#include "product_version.h"
-#ifdef FEATURE_CORECLR
cpp_quote("struct IActivationFactory;")
interface IActivationFactory;
-#endif
const char* CLR_MAJOR_VERSION = VER_MAJORVERSION;
const char* CLR_MINOR_VERSION = VER_MINORVERSION;
@@ -51,21 +37,10 @@ const char* CLR_ASSEMBLY_MAJOR_VERSION = VER_ASSEMBLYMAJORVERSION;
const char* CLR_ASSEMBLY_MINOR_VERSION = VER_ASSEMBLYMINORVERSION;
const char* CLR_ASSEMBLY_BUILD_VERSION = VER_ASSEMBLYBUILD;
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
-// LIBID mscoree
-cpp_quote("EXTERN_GUID(LIBID_mscoree, 0x5477469e,0x83b1,0x11d2,0x8b,0x49,0x00,0xa0,0xc9,0xb7,0xc9,0xc4);")
-
-// CLSID CorRuntimeHost : uuid(CB2F6723-AB3A-11d2-9C40-00C04FA30A3E)
-cpp_quote("EXTERN_GUID(CLSID_CorRuntimeHost, 0xcb2f6723, 0xab3a, 0x11d2, 0x9c, 0x40, 0x00, 0xc0, 0x4f, 0xa3, 0x0a, 0x3e);")
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
// CLSID TypeNameFactory : uuid{B81FF171-20F3-11d2-8DCC-00A0C9B00525}
cpp_quote("EXTERN_GUID(CLSID_TypeNameFactory, 0xB81FF171, 0x20F3, 0x11d2, 0x8d, 0xcc, 0x00, 0xa0, 0xc9, 0xb0, 0x05, 0x25);")
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
-// CLSID CLRRuntimeHost : uuid(90F1A06E-7712-4762-86B5-7A5EBA6BDB02)
-cpp_quote("EXTERN_GUID(CLSID_CLRRuntimeHost, 0x90F1A06E, 0x7712, 0x4762, 0x86, 0xB5, 0x7A, 0x5E, 0xBA, 0x6B, 0xDB, 0x02);")
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
#ifdef FEATURE_COMINTEROP
// CLSID ComCallUnmarshal
@@ -75,83 +50,12 @@ cpp_quote("EXTERN_GUID(CLSID_ComCallUnmarshal, 0x3F281000,0xE95A,0x11d2,0x88,0x6
cpp_quote("EXTERN_GUID(CLSID_ComCallUnmarshalV4, 0x45fb4600,0xe6e8,0x4928,0xb2,0x5e,0x50,0x47,0x6f,0xf7,0x94,0x25);")
#endif // FEATURE_COMINTEROP
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
-// IID IObjectHandle : uuid(C460E2B4-E199-412a-8456-84DC3E4838C3)
-cpp_quote("EXTERN_GUID(IID_IObjectHandle, 0xc460e2b4, 0xe199, 0x412a, 0x84, 0x56, 0x84, 0xdc, 0x3e, 0x48, 0x38, 0xc3);")
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
#ifdef FEATURE_COMINTEROP
// IID IManagedObject : uuid(C3FCC19E-A970-11d2-8B5A-00A0C9B7C9C4)
cpp_quote("EXTERN_GUID(IID_IManagedObject, 0xc3fcc19e, 0xa970, 0x11d2, 0x8b, 0x5a, 0x00, 0xa0, 0xc9, 0xb7, 0xc9, 0xc4);")
#endif // FEATURE_COMINTEROP
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
-// IID IApartmentCallback : uuid(178E5337-1528-4591-B1C9-1C6E484686D8)
-cpp_quote("EXTERN_GUID(IID_IApartmentCallback, 0x178e5337, 0x1528, 0x4591, 0xb1, 0xc9, 0x1c, 0x6e, 0x48, 0x46, 0x86, 0xd8);")
-
-// IID ICatalogServices : uuid(04C6BE1E-1DB1-4058-AB7A-700CCCFBF254)
-cpp_quote("EXTERN_GUID(IID_ICatalogServices, 0x04c6be1e, 0x1db1, 0x4058, 0xab, 0x7a, 0x70, 0x0c, 0xcc, 0xfb, 0xf2, 0x54);")
-
-// IID ICorRuntimeHost : uuid(CB2F6722-AB3A-11d2-9C40-00C04FA30A3E)
-cpp_quote("EXTERN_GUID(IID_ICorRuntimeHost, 0xcb2f6722, 0xab3a, 0x11d2, 0x9c, 0x40, 0x00, 0xc0, 0x4f, 0xa3, 0x0a, 0x3e);")
-
-// IID ICorThreadpool : uuid(84680D3A-B2C1-46e8-ACC2-DBC0A359159A)
-cpp_quote("EXTERN_GUID(IID_ICorThreadpool, 0x84680D3A, 0xB2C1, 0x46e8, 0xAC, 0xC2, 0xDB, 0xC0, 0xA3, 0x59, 0x15, 0x9A);")
-
-// IID_ICLRDebugManager : uuid(00DCAEC6-2AC0-43a9-ACF9-1E36C139B10D)
-cpp_quote("EXTERN_GUID(IID_ICLRDebugManager, 0xdcaec6, 0x2ac0, 0x43a9, 0xac, 0xf9, 0x1e, 0x36, 0xc1, 0x39, 0xb1, 0xd);")
-
-// IID IHostMemoryNeededCallback : uuid(47EB8E57-0846-4546-AF76-6F42FCFC2649)
-cpp_quote("EXTERN_GUID(IID_IHostMemoryNeededCallback, 0x47EB8E57, 0x0846, 0x4546, 0xAF, 0x76, 0x6F, 0x42, 0xFC, 0xFC, 0x26, 0x49);")
-
-// IID IHostMalloc : uuid(1831991C-CC53-4A31-B218-04E910446479)
-cpp_quote("EXTERN_GUID(IID_IHostMalloc, 0x1831991C, 0xCC53, 0x4A31, 0xB2, 0x18, 0x04, 0xE9, 0x10, 0x44, 0x64, 0x79);")
-
-// IID IHostMemoryManager : uuid(7BC698D1-F9E3-4460-9CDE-D04248E9FA25)
-cpp_quote("EXTERN_GUID(IID_IHostMemoryManager, 0x7BC698D1, 0xF9E3, 0x4460, 0x9C, 0xDE, 0xD0, 0x42, 0x48, 0xE9, 0xFA, 0x25);")
-
-// IID ICLRTask : uuid(28E66A4A-9906-4225-B231-9187C3EB8611)
-cpp_quote("EXTERN_GUID(IID_ICLRTask, 0x28E66A4A, 0x9906, 0x4225, 0xB2, 0x31, 0x91, 0x87, 0xc3, 0xeb, 0x86, 0x11);")
-
-// IID ICLRTask2 : uuid(28E66A4A-9906-4225-B231-9187C3EB8612)
-cpp_quote("EXTERN_GUID(IID_ICLRTask2, 0x28E66A4A, 0x9906, 0x4225, 0xB2, 0x31, 0x91, 0x87, 0xc3, 0xeb, 0x86, 0x12);")
-
-// IID IHostTask : uuid(C2275828-C4B1-4B55-82C9-92135F74DF1A)
-cpp_quote("EXTERN_GUID(IID_IHostTask, 0xC2275828, 0xC4B1, 0x4B55, 0x82, 0xC9, 0x92, 0x13, 0x5F, 0x74, 0xDF, 0x1A);")
-
-// IID ICLRTaskManager : uuid(4862efbe-3ae5-44f8-8feb-346190ee8a34)
-cpp_quote("EXTERN_GUID(IID_ICLRTaskManager, 0x4862efbe, 0x3ae5, 0x44f8, 0x8F, 0xEB, 0x34, 0x61, 0x90, 0xeE, 0x8A, 0x34);")
-
-// IID IHostTaskManager : uuid(997FF24C-43B7-4352-8667-0DC04FAFD354)
-cpp_quote("EXTERN_GUID(IID_IHostTaskManager, 0x997FF24C, 0x43B7, 0x4352, 0x86, 0x67, 0x0D, 0xC0, 0x4F, 0xAF, 0xD3, 0x54);")
-
-// IID IHostThreadpoolManager : uuid(983D50E2-CB15-466B-80FC-845DC6E8C5FD)
-cpp_quote("EXTERN_GUID(IID_IHostThreadpoolManager, 0x983D50E2, 0xCB15, 0x466B, 0x80, 0xFC, 0x84, 0x5D, 0xC6, 0xE8, 0xC5, 0xFD);")
-
-// IID_ICLRIOCompletionManager : uuid(2D74CE86-B8D6-4C84-B3A7-9768933B3C12)
-cpp_quote("EXTERN_GUID(IID_ICLRIoCompletionManager, 0x2D74CE86, 0xB8D6, 0x4C84, 0xB3, 0xA7, 0x97, 0x68, 0x93, 0x3B, 0x3C, 0x12);")
-
-// IID_IHostIOCompletionManager : uuid(8BDE9D80-EC06-41D6-83E6-22580EFFCC20)
-cpp_quote("EXTERN_GUID(IID_IHostIoCompletionManager, 0x8BDE9D80, 0xEC06, 0x41D6, 0x83, 0xE6, 0x22, 0x58, 0x0E, 0xFF, 0xCC, 0x20);")
-
-// IID IHostSyncManager : uuid(234330c7-5f10-4f20-9615-5122dab7a0ac)
-cpp_quote("EXTERN_GUID(IID_IHostSyncManager, 0x234330c7, 0x5f10, 0x4f20, 0x96, 0x15, 0x51, 0x22, 0xda, 0xb7, 0xa0, 0xac);")
-
-// IID IHostCrst : uuid(6DF710A6-26A4-4a65-8CD5-7237B8BDA8DC)
-cpp_quote("EXTERN_GUID(IID_IHostCrst, 0x6DF710A6, 0x26A4, 0x4a65, 0x8c, 0xd5, 0x72, 0x37, 0xb8, 0xbd, 0xa8, 0xdc);")
-
-// IID IHostAutoEvent : uuid(50B0CFCE-4063-4278-9673-E5CB4ED0BDB8)
-cpp_quote("EXTERN_GUID(IID_IHostAutoEvent, 0x50B0CFCE, 0x4063, 0x4278, 0x96, 0x73, 0xe5, 0xcb, 0x4e, 0xd0, 0xbd, 0xb8);")
-
-// IID IHostManualEvent : uuid(1BF4EC38-AFFE-4fb9-85A6-525268F15B54)
-cpp_quote("EXTERN_GUID(IID_IHostManualEvent, 0x1BF4EC38, 0xAFFE, 0x4fb9, 0x85, 0xa6, 0x52, 0x52, 0x68, 0xf1, 0x5b, 0x54);")
-
-// IID IHostSemaphore : uuid(855efd47-cc09-463a-a97d-16acab882661)
-cpp_quote("EXTERN_GUID(IID_IHostSemaphore, 0x855efd47, 0xcc09, 0x463a, 0xa9, 0x7d, 0x16, 0xac, 0xab, 0x88, 0x26, 0x61);")
-
-// IID ICLRSyncManager : uuid(55FF199D-AD21-48f9-A16C-F24EBBB8727D)
-cpp_quote("EXTERN_GUID(IID_ICLRSyncManager, 0x55FF199D, 0xAD21, 0x48f9, 0xa1, 0x6c, 0xf2, 0x4e, 0xbb, 0xb8, 0x72, 0x7d);")
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
#ifdef FEATURE_APPDOMAIN_RESOURCE_MONITORING
// IID ICLRAppDomainResourceMonitor: uuid(C62DE18C-2E23-4AEA-8423-B40C1FC59EAE)
@@ -161,86 +65,34 @@ cpp_quote("EXTERN_GUID(IID_ICLRAppDomainResourceMonitor, 0XC62DE18C, 0X2E23, 0X4
// {7D290010-D781-45da-A6F8-AA5D711A730E}
cpp_quote("EXTERN_GUID(IID_ICLRPolicyManager, 0x7D290010, 0xD781, 0x45da, 0xA6, 0xF8, 0xAA, 0x5D, 0x71, 0x1A, 0x73, 0x0E);")
-#if defined(FEATURE_INCLUDE_ALL_INTERFACES) || defined (FEATURE_WINDOWSPHONE)
+#if defined (FEATURE_WINDOWSPHONE)
// IID_ICLRGCManager : uuid(54D9007E-A8E2-4885-B7BF-F998DEEE4F2A)
cpp_quote("EXTERN_GUID(IID_ICLRGCManager, 0x54D9007E, 0xA8E2, 0x4885, 0xB7, 0xBF, 0xF9, 0x98, 0xDE, 0xEE, 0x4F, 0x2A);")
// IID_ICLRGCManager2 : uuid(0603B793-A97A-4712-9CB4-0CD1C74C0F7C)
cpp_quote("EXTERN_GUID(IID_ICLRGCManager2, 0x0603B793, 0xA97A, 0x4712, 0x9C, 0xB4, 0x0C, 0xD1, 0xC7, 0x4C, 0x0F, 0x7C);")
// IID_ICLRErrorReportingManager : uuid(980D2F1A-BF79-4c08-812A-BB9778928F78)
cpp_quote("EXTERN_GUID(IID_ICLRErrorReportingManager, 0x980d2f1a, 0xbf79, 0x4c08, 0x81, 0x2a, 0xbb, 0x97, 0x78, 0x92, 0x8f, 0x78);")
-#endif // FEATURE_INCLUDE_ALL_INTERFACES || FEATURE_WINDOWSPHONE
+#endif // FEATURE_WINDOWSPHONE
#ifdef FEATURE_WINDOWSPHONE
// IID_ICLRErrorReportingManager2 : uuid(C68F63B1-4D8B-4E0B-9564-9D2EFE2FA18C)
cpp_quote("EXTERN_GUID(IID_ICLRErrorReportingManager2, 0xc68f63b1, 0x4d8b, 0x4e0b, 0x95, 0x64, 0x9d, 0x2e, 0xfe, 0x2f, 0xa1, 0x8c);")
#endif // FEATURE_WINDOWSPHONE
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
-// {7AE49844-B1E3-4683-BA7C-1E8212EA3B79}
-cpp_quote("EXTERN_GUID(IID_IHostPolicyManager, 0x7AE49844, 0xB1E3, 0x4683, 0xBA, 0x7C, 0x1E, 0x82, 0x12, 0xEA, 0x3B, 0x79);")
-
-// IID IHostGCManager : uuid(5D4EC34E-F248-457B-B603-255FAABA0D21)
-cpp_quote("EXTERN_GUID(IID_IHostGCManager, 0x5D4EC34E, 0xF248, 0x457B, 0xB6, 0x03, 0x25, 0x5F, 0xAA, 0xBA, 0x0D, 0x21);")
-
-// {607BE24B-D91B-4E28-A242-61871CE56E35}
-cpp_quote("EXTERN_GUID(IID_IActionOnCLREvent, 0x607BE24B, 0xD91B, 0x4E28, 0xA2, 0x42, 0x61, 0x87, 0x1C, 0xE5, 0x6E, 0x35);")
-
-// {1D0E0132-E64F-493D-9260-025C0E32C175}
-cpp_quote("EXTERN_GUID(IID_ICLROnEventManager, 0x1D0E0132, 0xE64F, 0x493D, 0x92, 0x60, 0x02, 0x5C, 0x0E, 0x32, 0xC1, 0x75);")
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
// IID ICLRRuntimeHost: uuid(90F1A06C-7712-4762-86B5-7A5EBA6BDB02)
cpp_quote("EXTERN_GUID(IID_ICLRRuntimeHost, 0x90F1A06C, 0x7712, 0x4762, 0x86, 0xB5, 0x7A, 0x5E, 0xBA, 0x6B, 0xDB, 0x02);")
-#ifdef FEATURE_CORECLR
// IID ICLRRuntimeHost2: uuid(712AB73F-2C22-4807-AD7E-F501D7B72C2D)
cpp_quote("EXTERN_GUID(IID_ICLRRuntimeHost2, 0x712AB73F, 0x2C22, 0x4807, 0xAD, 0x7E, 0xF5, 0x01, 0xD7, 0xb7, 0x2C, 0x2D);")
// IID IID_ICLRExecutionManager: uuid(1000A3E7-B420-4620-AE30-FB19B587AD1D)
cpp_quote("EXTERN_GUID(IID_ICLRExecutionManager, 0x1000A3E7, 0xB420, 0x4620, 0xAE, 0x30, 0xFB, 0x19, 0xB5, 0x87, 0xAD, 0x1D);")
-#endif // FEATURE_CORECLR
-
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
-// IID ICLRHostProtectionManager : uuid{89F25F5C-CEEF-43e1-9CFA-A68CE863AAAC}
-cpp_quote("EXTERN_GUID(IID_ICLRHostProtectionManager, 0x89f25f5c, 0xceef, 0x43e1, 0x9c, 0xfa, 0xa6, 0x8c, 0xe8, 0x63, 0xaa, 0xac);")
-
-// IID IHostAssemblyStore : uuid(7B102A88-3F7F-496D-8FA2-C35374E01AF3)
-cpp_quote("EXTERN_GUID(IID_IHostAssemblyStore, 0x7b102a88, 0x3f7f, 0x496d, 0x8f, 0xa2, 0xc3, 0x53, 0x74, 0xe0, 0x1a, 0xf3);")
-
-// IID IHostAssemblyManager : uuid(613dabd7-62b2-493e-9e65-c1e32a1e0c5e)
-cpp_quote("EXTERN_GUID(IID_IHostAssemblyManager, 0x613dabd7, 0x62b2, 0x493e, 0x9e, 0x65, 0xc1, 0xe3, 0x2a, 0x1e, 0x0c, 0x5e);")
-
-// IID IHostSecurityManager : uuid{75AD2468-A349-4D02-A764-76A68AEE0C4F}
-cpp_quote("EXTERN_GUID(IID_IHostSecurityManager, 0x75ad2468, 0xa349, 0x4d02, 0xa7, 0x64, 0x76, 0xa6, 0x8a, 0xee, 0x0c, 0x4f);")
-
-// IID IHostSecurityContext : uuid{7E573CE4-0343-4423-98D7-6318348A1D3C}
-cpp_quote("EXTERN_GUID(IID_IHostSecurityContext, 0x7e573ce4, 0x343, 0x4423, 0x98, 0xd7, 0x63, 0x18, 0x34, 0x8a, 0x1d, 0x3c);")
-
-// IID ICLRAssemblyIdentityManager: uuid(15f0a9da-3ff6-4393-9da9-fdfd284e6972)
-cpp_quote("EXTERN_GUID(IID_ICLRAssemblyIdentityManager, 0x15f0a9da, 0x3ff6, 0x4393, 0x9d, 0xa9, 0xfd, 0xfd, 0x28, 0x4e, 0x69, 0x72);")
-
-// IID ICLRDomainManager: uuid(270D00A2-8E15-4d0b-ADEB-37BC3E47DF77)
-cpp_quote("EXTERN_GUID(IID_ICLRDomainManager, 0x270d00a2, 0x8e15, 0x4d0b, 0xad, 0xeb, 0x37, 0xbc, 0x3e, 0x47, 0xdf, 0x77);")
-
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
// IID ITypeName : uuid{B81FF171-20F3-11d2-8DCC-00A0C9B00522}
cpp_quote("EXTERN_GUID(IID_ITypeName, 0xB81FF171, 0x20F3, 0x11d2, 0x8d, 0xcc, 0x00, 0xa0, 0xc9, 0xb0, 0x05, 0x22);")
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
-// IID ICLRAssemblyReferenceList: uuid(1b2c9750-2e66-4bda-8b44-0a642c5cd733)
-cpp_quote("EXTERN_GUID(IID_ICLRAssemblyReferenceList, 0x1b2c9750, 0x2e66, 0x4bda, 0x8b, 0x44, 0x0a, 0x64, 0x2c, 0x5c, 0xd7, 0x33);")
-
-// IID ICLRReferenceAssemblyEnum: uuid(d509cb5d-cf32-4876-ae61-67770cf91973)
-cpp_quote("EXTERN_GUID(IID_ICLRReferenceAssemblyEnum, 0xd509cb5d, 0xcf32, 0x4876, 0xae, 0x61, 0x67, 0x77, 0x0c, 0xf9, 0x19, 0x73);")
-
-// IID ICLRProbingAssemblyEnum: uuid(d0c5fb1f-416b-4f97-81f4-7ac7dc24dd5d)
-cpp_quote("EXTERN_GUID(IID_ICLRProbingAssemblyEnum, 0xd0c5fb1f, 0x416b, 0x4f97, 0x81, 0xf4, 0x7a, 0xc7, 0xdc, 0x24, 0xdd, 0x5d);")
-
-// IID ICLRHostBindingPolicyManager: uuid(4b3545e7-1856-48c9-a8ba-24b21a753c09)
-cpp_quote("EXTERN_GUID(IID_ICLRHostBindingPolicyManager, 0x4b3545e7, 0x1856, 0x48c9, 0xa8, 0xba, 0x24, 0xb2, 0x1a, 0x75, 0x3c, 0x09);")
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
// IID ITypeNameBuilder : uuid{B81FF171-20F3-11d2-8DCC-00A0C9B00523}
cpp_quote("EXTERN_GUID(IID_ITypeNameBuilder, 0xB81FF171, 0x20F3, 0x11d2, 0x8d, 0xcc, 0x00, 0xa0, 0xc9, 0xb0, 0x05, 0x23);")
@@ -271,24 +123,7 @@ cpp_quote("EXTERN_GUID(IID_ITypeNameFactory, 0xB81FF171, 0x20F3, 0x11d2, 0x8d, 0
#pragma midl_echo("DEPRECATED_CLR_STDAPI LoadStringRCEx(LCID lcid, UINT iResouceID, _Out_writes_z_(iMax) LPWSTR szBuffer, int iMax, int bQuiet, int *pcwchUsed);")
#endif
-#ifndef FEATURE_CORECLR
-// Ideally we would like to make the function pointer definition below as DEPRECATED_CLR_STDAPI. However,
-// since it is referenced in the following definition of LockClrVersion, it will result in a build failure
-// in our own build (since we treat warnings as errors).
-//
-// However, there is no other usage of this pointer outside LockClrVersion. Thus, we will not mark
-// the pointer as legacy API. This will ensure we can build the runtime and if someone tries to use
-// it via LockClrVersion, they will have build warning since LockClrVersion is marked as legacy API.
-#pragma midl_echo("typedef HRESULT (__stdcall *FLockClrVersionCallback) ();")
-#pragma midl_echo("DEPRECATED_CLR_STDAPI LockClrVersion(FLockClrVersionCallback hostCallback,FLockClrVersionCallback *pBeginHostSetup,FLockClrVersionCallback *pEndHostSetup);")
-#pragma midl_echo("DEPRECATED_CLR_STDAPI CreateDebuggingInterfaceFromVersion(int iDebuggerVersion, LPCWSTR szDebuggeeVersion, IUnknown ** ppCordb);")
-#pragma midl_echo("DEPRECATED_CLR_STDAPI GetVersionFromProcess(HANDLE hProcess, _Out_writes_to_(cchBuffer, *dwLength) LPWSTR pVersion, DWORD cchBuffer, _Out_ DWORD* dwLength);")
-#endif
-
-
-#ifdef FEATURE_CORECLR
#pragma midl_echo("typedef HRESULT (STDAPICALLTYPE *FnGetCLRRuntimeHost)(REFIID riid, IUnknown **pUnk);")
-#endif
typedef enum {
HOST_TYPE_DEFAULT = 0x0,
@@ -324,11 +159,9 @@ typedef enum {
STARTUP_TRIM_GC_COMMIT = 0x80000, // GC uses less committed space when system memory low
STARTUP_ETW = 0x100000,
STARTUP_ARM = 0x400000, // Enable the ARM feature.
-#ifdef FEATURE_CORECLR
STARTUP_SINGLE_APPDOMAIN = 0x800000, // application runs in default domain, no more domains are created
STARTUP_APPX_APP_MODEL = 0x1000000, // jupiter app
STARTUP_DISABLE_RANDOMIZED_STRING_HASHING = 0x2000000 // Disable the randomized string hashing
-#endif
} STARTUP_FLAGS;
typedef enum {
@@ -356,11 +189,8 @@ typedef enum
APPDOMAIN_SECURITY_DEFAULT =0x0,
APPDOMAIN_SECURITY_SANDBOXED = 0x1, // appdomain is sandboxed
APPDOMAIN_SECURITY_FORBID_CROSSAD_REVERSE_PINVOKE = 0x2, // no cross ad reverse pinvokes
-#ifdef FEATURE_CORECLR
APPDOMAIN_IGNORE_UNHANDLED_EXCEPTIONS = 0x4, //
-#endif //FEATURE_CORECLR
APPDOMAIN_FORCE_TRIVIAL_WAIT_OPERATIONS = 0x08, // do not pump messages during wait operations, do not call sync context
-#ifdef FEATURE_CORECLR
// When passed by the host, this flag will allow any assembly to perform PInvoke or COMInterop operations.
// Otherwise, by default, only platform assemblies can perform those operations.
APPDOMAIN_ENABLE_PINVOKE_AND_CLASSIC_COMINTEROP = 0x10,
@@ -369,159 +199,10 @@ typedef enum
APPDOMAIN_ENABLE_ASSEMBLY_LOADFILE = 0x80,
APPDOMAIN_DISABLE_TRANSPARENCY_ENFORCEMENT = 0x100,
-#endif //FEATURE_CORECLR
} APPDOMAIN_SECURITY_FLAGS;
#pragma midl_echo("STDAPI GetRequestedRuntimeVersionForCLSID(REFCLSID rclsid, _Out_writes_opt_(cchBuffer) LPWSTR pVersion, DWORD cchBuffer, _Out_opt_ DWORD* dwLength, CLSID_RESOLUTION_FLAGS dwResolutionFlags);")
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
-//*****************************************************************************
-// Interface for Object Handles
-//*****************************************************************************
-[
- object,
- oleautomation,
- uuid(C460E2B4-E199-412a-8456-84DC3E4838C3),
- helpstring("Object Handle Interface"),
- pointer_default(unique)
-]
-interface IObjectHandle : IUnknown
-{
- HRESULT Unwrap([out, retval] VARIANT *ppv);
-};
-
-//*****************************************************************************
-// Interface for Setting runtime configuration
-//*****************************************************************************
-[
- uuid(5C2B07A7-1E98-11d3-872F-00C04F79ED0D),
- version(1.0),
- helpstring("Application Domain call back"),
- pointer_default(unique),
- local
-]
-interface IAppDomainBinding : IUnknown
-{
- // <TODO>TODO: this should return an AppDomain interface
- // The event is invoked everytime a domain is created </TODO>
- HRESULT OnAppDomain([in] IUnknown* pAppdomain);
-}
-
-
-//*****************************************************************************
-// Interface for participating in the scheduling of threads that would
-// otherwise be blocked for a GC
-//*****************************************************************************
-[
- uuid(F31D1788-C397-4725-87A5-6AF3472C2791),
- version(1.0),
- helpstring("Control over threads blocked in GC"),
- pointer_default(unique),
- local
-]
-interface IGCThreadControl : IUnknown
-{
- // Notification that the thread making the call is about to block, perhaps for
- // a GC or other suspension. This gives the host an opportunity to re-schedule
- // the thread for unmanaged tasks.
- HRESULT ThreadIsBlockingForSuspension();
-
- // Notification that the runtime is beginning a thread suspension for a GC or
- // other suspension. Do not reschedule this thread!
- HRESULT SuspensionStarting();
-
- // Notification that the runtime is resuming threads after a GC or other
- // suspension. Do not reschedule this thread!
- HRESULT SuspensionEnding(DWORD Generation);
-}
-
-//*****************************************************************************
-// Interface for GC to request change in virtual memory limit
-//*****************************************************************************
-[
- uuid(5513D564-8374-4cb9-AED9-0083F4160A1D),
- version(1.1),
- helpstring("Request change in virtual memory for GC"),
- pointer_default(unique),
- local
-]
-interface IGCHostControl : IUnknown
-{
- // Request to increase the virtual memeory limit of the runtime (GC heap)
- HRESULT RequestVirtualMemLimit([in] SIZE_T sztMaxVirtualMemMB,
- [in, out] SIZE_T* psztNewMaxVirtualMemMB);
-}
-
-//*****************************************************************************
-// Interface for accessing threadpool
-//*****************************************************************************
-cpp_quote("#ifdef __midl")
-typedef VOID (__stdcall *WAITORTIMERCALLBACK)(PVOID, BOOL);
-cpp_quote("#endif // __midl")
-
-cpp_quote("#ifdef __midl")
-typedef DWORD (__stdcall *LPTHREAD_START_ROUTINE)(LPVOID lpThreadParameter);
-typedef VOID (*LPOVERLAPPED_COMPLETION_ROUTINE)(DWORD dwErrorCode,
- DWORD dwNumberOfBytesTransfered,
- LPVOID lpOverlapped);
-cpp_quote("#endif // __midl")
-
-// Callback function for cleaning up TLS
-typedef VOID (__stdcall *PTLS_CALLBACK_FUNCTION)(PVOID);
-
-[
- uuid(84680D3A-B2C1-46e8-ACC2-DBC0A359159A),
- version(1.0),
- helpstring("Threadpool interface"),
- pointer_default(unique),
- local
-]
-interface ICorThreadpool : IUnknown
-{
- HRESULT CorRegisterWaitForSingleObject([in] HANDLE* phNewWaitObject,
- [in] HANDLE hWaitObject,
- [in] WAITORTIMERCALLBACK Callback,
- [in] PVOID Context,
- [in] ULONG timeout,
- [in] BOOL executeOnlyOnce,
- [out] BOOL* result );
-
- HRESULT CorUnregisterWait([in] HANDLE hWaitObject,[in] HANDLE CompletionEvent,[out] BOOL* result);
-
- HRESULT CorQueueUserWorkItem([in] LPTHREAD_START_ROUTINE Function,
- [in] PVOID Context,
- [in] BOOL executeOnlyOnce,
- [out] BOOL* result );
-
-
- HRESULT CorCreateTimer([in] HANDLE* phNewTimer,
- [in] WAITORTIMERCALLBACK Callback,
- [in] PVOID Parameter,
- [in] DWORD DueTime,
- [in] DWORD Period,
- [out] BOOL* result);
-
- HRESULT CorChangeTimer([in] HANDLE Timer, [in] ULONG DueTime, [in] ULONG Period, [out] BOOL* result);
-
- HRESULT CorDeleteTimer([in] HANDLE Timer, [in] HANDLE CompletionEvent, [out] BOOL* result);
-
- HRESULT CorBindIoCompletionCallback([in] HANDLE fileHandle, [in] LPOVERLAPPED_COMPLETION_ROUTINE callback);
-
- HRESULT CorCallOrQueueUserWorkItem([in] LPTHREAD_START_ROUTINE Function,
- [in] PVOID Context,
- [out] BOOL* result );
- HRESULT CorSetMaxThreads([in] DWORD MaxWorkerThreads,
- [in] DWORD MaxIOCompletionThreads);
-
- HRESULT CorGetMaxThreads([out] DWORD *MaxWorkerThreads,
- [out] DWORD *MaxIOCompletionThreads);
-
- HRESULT CorGetAvailableThreads([out] DWORD *AvailableWorkerThreads,
- [out] DWORD *AvailableIOCompletionThreads);
-
-
-}
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
cpp_quote("EXTERN_GUID(IID_IDebuggerThreadControl, 0x23d86786, 0x0bb5, 0x4774, 0x8f, 0xb5, 0xe3, 0x52, 0x2a, 0xdd, 0x62, 0x46);")
[
@@ -567,124 +248,12 @@ interface IDebuggerInfo : IUnknown
HRESULT IsDebuggerAttached([out] BOOL *pbAttached);
}
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
-// {5C2B07A5-1E98-11d3-872F-00C04F79ED0D}
-cpp_quote("EXTERN_GUID(IID_ICorConfiguration, 0x5c2b07a5, 0x1e98, 0x11d3, 0x87, 0x2f, 0x00, 0xc0, 0x4f, 0x79, 0xed, 0x0d);")
-[
- uuid(5C2B07A5-1E98-11d3-872F-00C04F79ED0D),
- version(1.0),
- helpstring("Common Language Runtime Configuration Interface"),
- pointer_default(unique),
- local
-]
-interface ICorConfiguration : IUnknown
-{
- // Set the callback for scheduling threads for non-runtime tasks when they
- // would otherwise be blocked for a GC.
- HRESULT SetGCThreadControl([in] IGCThreadControl* pGCThreadControl);
-
- // Set the callback for gc to request a change in virtual memmory limit
- HRESULT SetGCHostControl([in] IGCHostControl* pGCHostControl);
-
- // Set the callback interface that the debugging services will
- // call as Runtime threads are blocked and un-blocked for
- // debugging.
- HRESULT SetDebuggerThreadControl([in] IDebuggerThreadControl* pDebuggerThreadControl);
-
- // The host may indicate to the debugging services that a
- // particular thread should be allowed to continue to execute
- // while the debugger has an application stopped during
- // managed/unmanaged debugging scenarios. The specified thread
- // will not be allowed to run managed code, or to enter the
- // Runtime in any way. An example of such a thread would be an
- // in-process thread to support legacy script debuggers.
- HRESULT AddDebuggerSpecialThread([in] DWORD dwSpecialThreadId);
-}
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
//*****************************************************************************
// Interface for hosting mscoree
//*****************************************************************************
typedef void* HDOMAINENUM;
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
-[
- uuid(CB2F6722-AB3A-11d2-9C40-00C04FA30A3E),
- version(1.0),
- helpstring("Common Language Runtime Hosting Interface"),
- pointer_default(unique),
- local
-]
-interface ICorRuntimeHost : IUnknown
-{
- HRESULT CreateLogicalThreadState();
- HRESULT DeleteLogicalThreadState();
- HRESULT SwitchInLogicalThreadState(
- [in] DWORD *pFiberCookie); // [in] Cookie that indicates the fiber to use.
-
- HRESULT SwitchOutLogicalThreadState(
- [out] DWORD **pFiberCookie); // [out] Cookie that indicates the fiber being switched out.
-
- HRESULT LocksHeldByLogicalThread( // Return code.
- [out] DWORD *pCount // [out] Number of locks that the current thread holds.
- );
-
- HRESULT MapFile(
- [in] HANDLE hFile, // [in] HANDLE for file
- [out] HMODULE* hMapAddress); // [out] HINSTANCE for mapped file
-
- //=================================================================
- //
- // New hosting methods
- //
- // Returns an object for configuring the runtime prior to
- // it starting. If the runtime has been initialized this
- // routine returns an error. See ICorConfiguration.
- HRESULT GetConfiguration([out] ICorConfiguration** pConfiguration);
-
- // Starts the runtime. This is equivalent to CoInitializeCor();
- HRESULT Start();
-
- // Terminates the runtime, This is equivalent CoUninitializeCor();
- HRESULT Stop();
-
- // Creates a domain in the runtime. The identity array is
- // a pointer to an array TYPE containing IIdentity objects defining
- // the security identity.
- HRESULT CreateDomain([in] LPCWSTR pwzFriendlyName,
- [in] IUnknown* pIdentityArray, // Optional
- [out] IUnknown** pAppDomain);
-
- // Returns the default domain.
- HRESULT GetDefaultDomain([out] IUnknown** pAppDomain);
-
-
- // Enumerate currently existing domains.
- HRESULT EnumDomains([out] HDOMAINENUM *hEnum);
-
- // Returns S_FALSE when there are no more domains. A domain
- // is passed out only when S_OK is returned.
- HRESULT NextDomain([in] HDOMAINENUM hEnum,
- [out] IUnknown** pAppDomain);
-
- // Close the enumeration, releasing resources
- HRESULT CloseEnum([in] HDOMAINENUM hEnum);
-
- HRESULT CreateDomainEx([in] LPCWSTR pwzFriendlyName, // Optional
- [in] IUnknown* pSetup, // Optional
- [in] IUnknown* pEvidence, // Optional
- [out] IUnknown** pAppDomain);
-
- HRESULT CreateDomainSetup([out] IUnknown** pAppDomainSetup);
-
- HRESULT CreateEvidence([out] IUnknown** pEvidence);
-
- HRESULT UnloadDomain([in] IUnknown* pAppDomain);
-
- // Returns the thread's domain.
- HRESULT CurrentDomain([out] IUnknown** pAppDomain);
-};
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
typedef enum
{
@@ -706,162 +275,10 @@ typedef enum {
WAIT_NOTINDEADLOCK = 0x4
}WAIT_OPTION;
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
-cpp_quote("EXTERN_GUID(IID_ICLRMemoryNotificationCallback, 0x47EB8E57, 0x0846, 0x4546, 0xAF, 0x76, 0x6F, 0x42, 0xFC, 0xFC, 0x26, 0x49);")
-[
- uuid(47EB8E57-0846-4546-AF76-6F42FCFC2649),
- version(1.0),
- helpstring("Callback by Host to notify runtime short of memory"),
- pointer_default(unique),
- local
-]
-interface ICLRMemoryNotificationCallback : IUnknown
-{
- // Callback by Host on out of memory to request runtime to free memory.
- // Runtime will do a GC and Wait for PendingFinalizer.
- HRESULT OnMemoryNotification([in] EMemoryAvailable eMemoryAvailable);
-}
-
-[
- uuid(1831991C-CC53-4A31-B218-04E910446479),
- version(1.0),
- helpstring("Host Malloc"),
- pointer_default(unique),
- local
-]
-interface IHostMalloc : IUnknown
-{
- HRESULT Alloc([in] SIZE_T cbSize,
- [in] EMemoryCriticalLevel eCriticalLevel,
- [out] void** ppMem);
-
- HRESULT DebugAlloc([in] SIZE_T cbSize,
- [in] EMemoryCriticalLevel eCriticalLevel,
- [in, annotation("_In_ ")] char* pszFileName,
- [in] int iLineNo,
- [out, annotation("_Outptr_result_maybenull_")] void** ppMem);
-
- HRESULT Free([in] void* pMem);
-}
-
-typedef enum
-{
- MALLOC_THREADSAFE = 0x1,
- MALLOC_EXECUTABLE = 0x2,
-} MALLOC_TYPE;
-
-[
- uuid(7BC698D1-F9E3-4460-9CDE-D04248E9FA25),
- version(1.0),
- helpstring("Host memory manager"),
- pointer_default(unique),
- local
-]
-interface IHostMemoryManager : IUnknown
-{
- HRESULT CreateMalloc([in] DWORD dwMallocType,
- [out] IHostMalloc **ppMalloc);
-
- HRESULT VirtualAlloc([in] void* pAddress,
- [in] SIZE_T dwSize,
- [in] DWORD flAllocationType,
- [in] DWORD flProtect,
- [in] EMemoryCriticalLevel eCriticalLevel,
- [out] void** ppMem);
-
- HRESULT VirtualFree([in] LPVOID lpAddress,
- [in] SIZE_T dwSize,
- [in] DWORD dwFreeType);
-
- HRESULT VirtualQuery([in] void * lpAddress,
- [out] void* lpBuffer,
- [in] SIZE_T dwLength,
- [out] SIZE_T * pResult);
-
- HRESULT VirtualProtect([in] void * lpAddress,
- [in] SIZE_T dwSize,
- [in] DWORD flNewProtect,
- [out] DWORD * pflOldProtect);
-
- HRESULT GetMemoryLoad([out] DWORD* pMemoryLoad,
- [out] SIZE_T *pAvailableBytes);
-
- HRESULT RegisterMemoryNotificationCallback([in] ICLRMemoryNotificationCallback * pCallback);
-
- HRESULT NeedsVirtualAddressSpace(
- [in] LPVOID startAddress,
- [in] SIZE_T size
- );
-
- HRESULT AcquiredVirtualAddressSpace(
- [in] LPVOID startAddress,
- [in] SIZE_T size
- );
-
- HRESULT ReleasedVirtualAddressSpace(
- [in] LPVOID startAddress
- );
-}
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
typedef UINT64 TASKID;
typedef DWORD CONNID;
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
-[
- uuid(28E66A4A-9906-4225-B231-9187C3EB8611),
- version(1.0),
- helpstring("Callback by Host to collaborate with CLR on HostTask"),
- pointer_default(unique),
- local
-]
-interface ICLRTask: IUnknown
-{
- HRESULT SwitchIn([in] HANDLE threadHandle);
- HRESULT SwitchOut();
- HRESULT GetMemStats([out] COR_GC_THREAD_STATS *memUsage);
- HRESULT Reset(BOOL fFull);
- HRESULT ExitTask();
- HRESULT Abort();
- HRESULT RudeAbort();
- HRESULT NeedsPriorityScheduling([out] BOOL * pbNeedsPriorityScheduling);
- HRESULT YieldTask();
- HRESULT LocksHeld([out] SIZE_T *pLockCount);
- HRESULT SetTaskIdentifier([in] TASKID asked);
-}
-
-[
- uuid(28E66A4A-9906-4225-B231-9187C3EB8612),
- version(1.0),
- helpstring("Callback by Host to collaborate with CLR on HostTask"),
- pointer_default(unique),
- local
-]
-interface ICLRTask2 : ICLRTask
-{
- HRESULT BeginPreventAsyncAbort();
- HRESULT EndPreventAsyncAbort();
-}
-
-
-[
- uuid(C2275828-C4B1-4B55-82C9-92135F74DF1A),
- version(1.0),
- helpstring("Called by CLR to operate on a HostTask"),
- pointer_default(unique),
- local
-]
-interface IHostTask : IUnknown
-{
- HRESULT Start();
- HRESULT Alert();
- HRESULT Join([in] DWORD dwMilliseconds,
- [in] DWORD option);
- HRESULT SetPriority([in] int newPriority);
- HRESULT GetPriority([out] int *pPriority);
- HRESULT SetCLRTask([in] ICLRTask *pCLRTask);
-}
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
typedef enum ETaskType
{
@@ -879,141 +296,6 @@ typedef enum ETaskType
TT_UNKNOWN = 0x80000000,
} ETaskType;
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
-[
- uuid(4862efbe-3ae5-44f8-8feb-346190ee8a34),
- version(1.0),
- helpstring("Functions provided by CLR to handle a CLRTask"),
- pointer_default(unique),
- local
-]
-interface ICLRTaskManager : IUnknown
-{
- HRESULT CreateTask ([out] ICLRTask **pTask);
- HRESULT GetCurrentTask ([out] ICLRTask **pTask);
- HRESULT SetUILocale([in] LCID lcid);
- HRESULT SetLocale([in] LCID lcid);
-
- HRESULT GetCurrentTaskType([out] ETaskType *pTaskType);
-
-}
-
-[
- uuid(997FF24C-43B7-4352-8667-0DC04FAFD354),
- version(1.0),
- helpstring("Functions provided by host to handle a HostTask"),
- pointer_default(unique),
- local
-]
-interface IHostTaskManager : IUnknown
-{
- HRESULT GetCurrentTask ([out] IHostTask **pTask);
- HRESULT CreateTask ([in] DWORD dwStackSize,
- [in] LPTHREAD_START_ROUTINE pStartAddress,
- [in] PVOID pParameter,
- [out] IHostTask **ppTask);
- HRESULT Sleep([in] DWORD dwMilliseconds,
- [in] DWORD option);
- HRESULT SwitchToTask([in] DWORD option);
-
- HRESULT SetUILocale([in] LCID lcid);
- HRESULT SetLocale([in] LCID lcid);
-
- HRESULT CallNeedsHostHook([in] SIZE_T target,
- [out] BOOL *pbCallNeedsHostHook);
-
- HRESULT LeaveRuntime([in] SIZE_T target);
- HRESULT EnterRuntime();
-
- HRESULT ReverseLeaveRuntime();
- HRESULT ReverseEnterRuntime();
-
- HRESULT BeginDelayAbort();
- HRESULT EndDelayAbort();
- HRESULT BeginThreadAffinity();
- HRESULT EndThreadAffinity();
-
- HRESULT SetStackGuarantee([in] ULONG guarantee);
- HRESULT GetStackGuarantee([out] ULONG *pGuarantee);
-
- HRESULT SetCLRTaskManager([in] ICLRTaskManager *ppManager);
-
-}
-
-[
- uuid(983D50E2-CB15-466B-80FC-845DC6E8C5FD),
- version(1.0),
- helpstring("Threadpool Functions provided by host"),
- pointer_default(unique),
- local
-]
-interface IHostThreadpoolManager : IUnknown
-{
- HRESULT QueueUserWorkItem(
- [in] LPTHREAD_START_ROUTINE Function,
- [in] PVOID Context,
- [in] ULONG Flags);
- HRESULT SetMaxThreads(
- [in] DWORD dwMaxWorkerThreads);
- HRESULT GetMaxThreads(
- [out] DWORD *pdwMaxWorkerThreads);
- HRESULT GetAvailableThreads(
- [out] DWORD *pdwAvailableWorkerThreads);
- HRESULT SetMinThreads(
- [in] DWORD dwMinIOCompletionThreads);
- HRESULT GetMinThreads(
- [out] DWORD *pdwMinIOCompletionThreads);
-}
-
-[
- uuid(2d74ce86-b8d6-4c84-b3a7-9768933b3c12),
- version(1.0),
- helpstring("Asynchronous IO support callback"),
- pointer_default(unique),
- local
-]
-interface ICLRIoCompletionManager : IUnknown
-{
- HRESULT OnComplete(
- [in] DWORD dwErrorCode,
- [in] DWORD NumberOfBytesTransferred,
- [in] void* pvOverlapped);
-}
-
-[
- uuid(8bde9d80-ec06-41d6-83e6-22580effcc20),
- version(1.0),
- helpstring("Asynchronous IO support provided by host"),
- pointer_default(unique),
- local
-]
-interface IHostIoCompletionManager : IUnknown
-{
- HRESULT CreateIoCompletionPort(
- [out] HANDLE *phPort);
- HRESULT CloseIoCompletionPort(
- [in] HANDLE hPort);
- HRESULT SetMaxThreads(
- [in] DWORD dwMaxIOCompletionThreads);
- HRESULT GetMaxThreads(
- [out] DWORD *pdwMaxIOCompletionThreads);
- HRESULT GetAvailableThreads(
- [out] DWORD *pdwAvailableIOCompletionThreads);
- HRESULT GetHostOverlappedSize(
- [out] DWORD * pcbSize);
- HRESULT SetCLRIoCompletionManager(
- [in] ICLRIoCompletionManager * pManager);
- HRESULT InitializeHostOverlapped(
- [in] void * pvOverlapped);
- HRESULT Bind(
- [in] HANDLE hPort,
- [in] HANDLE hHandle);
- HRESULT SetMinThreads(
- [in] DWORD dwMinIOCompletionThreads);
- HRESULT GetMinThreads(
- [out] DWORD *pdwMinIOCompletionThreads);
-}
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
typedef enum {
eSymbolReadingNever = 0, // Never read PDBs
@@ -1021,41 +303,6 @@ typedef enum {
eSymbolReadingFullTrustOnly = 2 // Only read PDBs that correspond to full-trust assemblies
} ESymbolReadingPolicy;
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
-[
- uuid(00DCAEC6-2AC0-43a9-ACF9-1E36C139B10D),
- version(1.0),
- helpstring("CLR debugger manager"),
- pointer_default(unique),
- local
-]
-interface ICLRDebugManager : IUnknown
-{
- HRESULT BeginConnection(
- [in] CONNID dwConnectionId,
- [in, string, annotation("_In_")] wchar_t *szConnectionName);
- HRESULT SetConnectionTasks(
- [in] CONNID id,
- [in] DWORD dwCount,
- [in, size_is(dwCount)] ICLRTask **ppCLRTask);
- HRESULT EndConnection(
- [in] CONNID dwConnectionId);
- // Set ACL on shared section, events, and process
- HRESULT SetDacl([in] PACL pacl);
-
- // Returning the current ACL that CLR is using
- // The memory is allocated by runtime using CoTaskmemAlloc. Caller must
- // free the memory pointed to by pacl using CoTaskMemFree.
- HRESULT GetDacl([out] PACL *pacl);
-
- // Indicates whether or not a managed debugger is attached to this process.
- HRESULT IsDebuggerAttached([out] BOOL *pbAttached);
-
- // Specify whether the symbol reader should be used. Affects whether file and line
- // info can be included when the CLR captures a call stack.
- HRESULT SetSymbolReadingPolicy([in] ESymbolReadingPolicy policy);
-}
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
typedef enum {
// Default to minidump
@@ -1117,7 +364,7 @@ typedef struct _BucketParameters
WCHAR pszParams[BucketParamsCount][BucketParamLength]; // Parameter strings.
} BucketParameters;
-#if defined(FEATURE_INCLUDE_ALL_INTERFACES) || defined(FEATURE_WINDOWSPHONE)
+#if defined(FEATURE_WINDOWSPHONE)
[
uuid(980D2F1A-BF79-4c08-812A-BB9778928F78),
version(1.0),
@@ -1221,119 +468,8 @@ interface ICLRErrorReportingManager2 : ICLRErrorReportingManager
}
#endif // FEATURE_WINDOWSPHONE
-#endif // defined(FEATURE_INCLUDE_ALL_INTERFACES) || defined(FEATURE_WINDOWSPHONE)
-
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
-[
- uuid(6DF710A6-26A4-4a65-8CD5-7237B8BDA8DC),
- version(1.0),
- helpstring("CriticalSection provided by host"),
- pointer_default(unique),
- local
-]
-interface IHostCrst : IUnknown
-{
- HRESULT Enter([in] DWORD option);
- HRESULT Leave();
- HRESULT TryEnter([in] DWORD option,
- [out] BOOL *pbSucceeded);
- HRESULT SetSpinCount([in] DWORD dwSpinCount);
-}
-
-[
- uuid(50B0CFCE-4063-4278-9673-E5CB4ED0BDB8),
- version(1.0),
- helpstring("AutoEvent provided by host"),
- pointer_default(unique),
- local
-]
-interface IHostAutoEvent : IUnknown
-{
- HRESULT Wait([in] DWORD dwMilliseconds,
- [in] DWORD option);
- HRESULT Set();
-}
-
-[
- uuid(1BF4EC38-AFFE-4fb9-85A6-525268F15B54),
- version(1.0),
- helpstring("ManualEvent provided by host"),
- pointer_default(unique),
- local
-]
-interface IHostManualEvent : IUnknown
-{
- HRESULT Wait([in] DWORD dwMilliseconds,
- [in] DWORD option);
- HRESULT Reset();
- HRESULT Set();
-}
-
-[
- uuid(855efd47-cc09-463a-a97d-16acab882661),
- version(1.0),
- helpstring("Semaphore provided by host"),
- pointer_default(unique),
- local
-]
-interface IHostSemaphore : IUnknown
-{
- HRESULT Wait([in] DWORD dwMilliseconds,
- [in] DWORD option);
- HRESULT ReleaseSemaphore([in] LONG lReleaseCount,
- [out] LONG *lpPreviousCount);
-}
-
-[
- uuid(55FF199D-AD21-48f9-A16C-F24EBBB8727D),
- version(1.0),
- helpstring("Functions provided by CLR to provide infomation on synchronization objects"),
- pointer_default(unique),
- local
-]
-interface ICLRSyncManager : IUnknown
-{
- HRESULT GetMonitorOwner ([in] SIZE_T Cookie,
- [out] IHostTask **ppOwnerHostTask);
-
- HRESULT CreateRWLockOwnerIterator([in] SIZE_T Cookie, [out] SIZE_T *pIterator);
- HRESULT GetRWLockOwnerNext([in] SIZE_T Iterator, [out] IHostTask **ppOwnerHostTask);
- HRESULT DeleteRWLockOwnerIterator([in] SIZE_T Iterator);
-}
-
-[
- uuid(234330c7-5f10-4f20-9615-5122dab7a0ac),
- version(1.0),
- helpstring("Functions provided by host to create synchronization objects"),
- pointer_default(unique),
- local
-]
-interface IHostSyncManager : IUnknown
-{
- HRESULT SetCLRSyncManager([in] ICLRSyncManager *pManager);
-
- HRESULT CreateCrst([out] IHostCrst** ppCrst);
- HRESULT CreateCrstWithSpinCount ([in] DWORD dwSpinCount,
- [out] IHostCrst** ppCrst);
-
- HRESULT CreateAutoEvent([out] IHostAutoEvent **ppEvent);
- HRESULT CreateManualEvent([in] BOOL bInitialState,
- [out] IHostManualEvent **ppEvent);
+#endif // defined(FEATURE_WINDOWSPHONE)
- HRESULT CreateMonitorEvent([in] SIZE_T Cookie,
- [out] IHostAutoEvent **ppEvent);
-
- HRESULT CreateRWLockWriterEvent([in] SIZE_T Cookie,
- [out] IHostAutoEvent **ppEvent);
- HRESULT CreateRWLockReaderEvent([in] BOOL bInitialState,
- [in] SIZE_T Cookie,
- [out] IHostManualEvent **ppEvent);
-
- HRESULT CreateSemaphore([in] DWORD dwInitial,
- [in] DWORD dwMax,
- [out] IHostSemaphore ** ppSemaphore);
-}
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
typedef enum
{
@@ -1423,29 +559,6 @@ interface ICLRPolicyManager: IUnknown
[in] EClrUnhandledException policy);
}
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
-[
- uuid(7AE49844-B1E3-4683-BA7C-1E8212EA3B79),
- version(1.0),
- helpstring("Notify host about how CLR handles abnormal condition"),
- pointer_default(unique),
- local
-]
-interface IHostPolicyManager: IUnknown
-{
- HRESULT OnDefaultAction(
- [in] EClrOperation operation,
- [in] EPolicyAction action);
-
- HRESULT OnTimeout(
- [in] EClrOperation operation,
- [in] EPolicyAction action);
-
- HRESULT OnFailure(
- [in] EClrFailure failure,
- [in] EPolicyAction action);
-}
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
typedef enum
{
@@ -1479,250 +592,8 @@ cpp_quote(" StackOverflowType soType;")
cpp_quote(" EXCEPTION_POINTERS *pExceptionInfo;")
cpp_quote("} StackOverflowInfo;")
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
-[
- uuid(607BE24B-D91B-4E28-A242-61871CE56E35),
- version(1.0),
- helpstring("Allow host to register action on domain unload"),
- pointer_default(unique),
- local
-]
-interface IActionOnCLREvent: IUnknown
-{
- HRESULT OnEvent(
- [in] EClrEvent event,
- [in] PVOID data
- );
-}
-
-[
- uuid(1D0E0132-E64F-493D-9260-025C0E32C175),
- version(1.0),
- helpstring("Allow host to register action on event"),
- pointer_default(unique),
- local
-]
-interface ICLROnEventManager: IUnknown
-{
- HRESULT RegisterActionOnEvent(
- [in] EClrEvent event,
- [in] IActionOnCLREvent *pAction
- );
- HRESULT UnregisterActionOnEvent(
- [in] EClrEvent event,
- [in] IActionOnCLREvent *pAction
- );
-}
-
-[
- uuid(5D4EC34E-F248-457B-B603-255FAABA0D21),
- version(1.0),
- helpstring("Control over threads blocked in GC"),
- pointer_default(unique),
- local
-]
-interface IHostGCManager : IUnknown
-{
- // Notification that the thread making the call is about to block, perhaps for
- // a GC or other suspension. This gives the host an opportunity to re-schedule
- // the thread for unmanaged tasks.
- HRESULT ThreadIsBlockingForSuspension();
-
- // Notification that the runtime is beginning a thread suspension for a GC or
- // other suspension. Do not reschedule this thread!
- HRESULT SuspensionStarting();
-
- // Notification that the runtime is resuming threads after a GC or other
- // suspension. Do not reschedule this thread!
- HRESULT SuspensionEnding(DWORD Generation);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// ICLRAssemblyReferenceList
-//
-///////////////////////////////////////////////////////////////////////////////
-[
- object,
- version(1.0),
- uuid(1b2c9750-2e66-4bda-8b44-0a642c5cd733),
- helpstring("Generic Assembly Reference List, created by CLR."),
- pointer_default(unique),
- local
-]
-interface ICLRAssemblyReferenceList : IUnknown
-{
- HRESULT IsStringAssemblyReferenceInList(
- [in] LPCWSTR pwzAssemblyName
- );
-
- HRESULT IsAssemblyReferenceInList(
- [in] IUnknown *pName
- );
-};
-///////////////////////////////////////////////////////////////////////////////
-//
-// ICLRReferenceAssemblyEnum
-//
-///////////////////////////////////////////////////////////////////////////////
-[
- object,
- version(1.0),
- uuid(d509cb5d-cf32-4876-ae61-67770cf91973),
- helpstring("Reference Enum of an Assembly."),
- pointer_default(unique),
- local
-]
-interface ICLRReferenceAssemblyEnum : IUnknown
-{
- HRESULT Get(
- [in] DWORD dwIndex,
- [out, size_is(*pcchBufferSize), annotation("_Out_writes_all_(*pcchBufferSize)")]
- LPWSTR pwzBuffer,
- [in, out] DWORD *pcchBufferSize
- );
-};
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// ICLRProbingAssemblyEnum
-//
-///////////////////////////////////////////////////////////////////////////////
-[
- object,
- version(1.0),
- uuid(d0c5fb1f-416b-4f97-81f4-7ac7dc24dd5d),
- helpstring("The assemblies CLR will probe for given assembly"),
- pointer_default(unique),
- local
-]
-interface ICLRProbingAssemblyEnum:IUnknown
-{
- HRESULT Get(
- [in] DWORD dwIndex,
- [out, size_is(*pcchBufferSize), annotation("_Out_writes_all_(*pcchBufferSize)")]
- LPWSTR pwzBuffer,
- [in, out] DWORD *pcchBufferSize
- );
-};
-
-typedef enum _CLRAssemblyIdentityFlags
-{
- CLR_ASSEMBLY_IDENTITY_FLAGS_DEFAULT = 0
-}ECLRAssemblyIdentityFlags;
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// ICLRAssemblyIdentityManager
-//
-///////////////////////////////////////////////////////////////////////////////
-[
- object,
- version(1.0),
- uuid(15f0a9da-3ff6-4393-9da9-fdfd284e6972),
- helpstring("CLR Assembly Identity Manager"),
- pointer_default(unique),
- local
-]
-interface ICLRAssemblyIdentityManager : IUnknown
-{
- HRESULT GetCLRAssemblyReferenceList(
- [in] LPCWSTR *ppwzAssemblyReferences,
- [in] DWORD dwNumOfReferences,
- [out] ICLRAssemblyReferenceList **ppReferenceList
- );
-
- HRESULT GetBindingIdentityFromFile(
- [in] LPCWSTR pwzFilePath,
- [in] DWORD dwFlags,
- [out, size_is(*pcchBufferSize), annotation("_Out_writes_all_(*pcchBufferSize)")]
- LPWSTR pwzBuffer,
- [in, out] DWORD *pcchBufferSize
- );
-
- HRESULT GetBindingIdentityFromStream(
- [in] IStream *pStream,
- [in] DWORD dwFlags,
- [out, size_is(*pcchBufferSize), annotation("_Out_writes_all_(*pcchBufferSize)")]
- LPWSTR pwzBuffer,
- [in, out] DWORD *pcchBufferSize
- );
-
- HRESULT GetReferencedAssembliesFromFile(
- [in] LPCWSTR pwzFilePath,
- [in] DWORD dwFlags,
- [in] ICLRAssemblyReferenceList *pExcludeAssembliesList,
- [out] ICLRReferenceAssemblyEnum **ppReferenceEnum
- );
-
- HRESULT GetReferencedAssembliesFromStream(
- [in] IStream *pStream,
- [in] DWORD dwFlags,
- [in] ICLRAssemblyReferenceList *pExcludeAssembliesList,
- [out] ICLRReferenceAssemblyEnum **ppReferenceEnum
- );
-
- HRESULT GetProbingAssembliesFromReference(
- [in] DWORD dwMachineType,
- [in] DWORD dwFlags,
- [in] LPCWSTR pwzReferenceIdentity,
- [out] ICLRProbingAssemblyEnum **ppProbingAssemblyEnum
- );
-
- HRESULT IsStronglyNamed(
- [in] LPCWSTR pwzAssemblyIdentity,
- [out] BOOL *pbIsStronglyNamed
- );
-};
-
-typedef enum _hostBiningPolicyModifyFlags
-{
- HOST_BINDING_POLICY_MODIFY_DEFAULT = 0,
- HOST_BINDING_POLICY_MODIFY_CHAIN = 1,
- HOST_BINDING_POLICY_MODIFY_REMOVE = 2,
- HOST_BINDING_POLICY_MODIFY_MAX = 3
-}EHostBindingPolicyModifyFlags;
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// ICLRHostBindingPolicyManager
-//
-///////////////////////////////////////////////////////////////////////////////
-[
- object,
- version(1.0),
- uuid(4b3545e7-1856-48c9-a8ba-24b21a753c09),
- helpstring("CLR Host Binding Policy Manager, managing binding policy for host."),
- pointer_default(unique),
- local
-]
-interface ICLRHostBindingPolicyManager : IUnknown
-{
- HRESULT ModifyApplicationPolicy(
- [in] LPCWSTR pwzSourceAssemblyIdentity,
- [in] LPCWSTR pwzTargetAssemblyIdentity,
- [in] BYTE *pbApplicationPolicy,
- [in] DWORD cbAppPolicySize,
- [in] DWORD dwPolicyModifyFlags,
- [out, size_is(*pcbNewAppPolicySize), annotation("_Out_writes_all_(*pcbNewAppPolicySize)")]
- BYTE *pbNewApplicationPolicy,
- [in, out] DWORD *pcbNewAppPolicySize
- );
-
- HRESULT EvaluatePolicy(
- [in] LPCWSTR pwzReferenceIdentity,
- [in] BYTE *pbApplicationPolicy,
- [in] DWORD cbAppPolicySize,
- [out, size_is(*pcchPostPolicyReferenceIdentity), annotation("_Out_writes_all_(*pcchPostPolicyReferenceIdentity)")]
- LPWSTR pwzPostPolicyReferenceIdentity,
- [in, out] DWORD *pcchPostPolicyReferenceIdentity,
- [out] DWORD *pdwPoliciesApplied
- );
-};
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
-
-#if defined(FEATURE_INCLUDE_ALL_INTERFACES) || defined(FEATURE_WINDOWSPHONE)
+#if defined(FEATURE_WINDOWSPHONE)
/*
* This interface is used to get information about the GC system and
@@ -1778,7 +649,7 @@ interface ICLRGCManager2 : ICLRGCManager
};
-#endif //FEATURE_INCLUDE_ALL_INTERFACES || FEATURE_WINDOWSPHONE
+#endif // FEATURE_WINDOWSPHONE
///////////////////////////////////////////////////////////////////////////////
//
@@ -1827,64 +698,6 @@ typedef enum _HostApplicationPolicy
}EHostApplicationPolicy;
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
-///////////////////////////////////////////////////////////////////////////////
-//
-// IHostAssemblyStore
-//
-///////////////////////////////////////////////////////////////////////////////
-[
- local,
- object,
- version(1.0),
- uuid(7b102a88-3f7f-496d-8fa2-c35374e01af3),
- helpstring("Assembly Store provided by host"),
- pointer_default(unique)
-]
-interface IHostAssemblyStore: IUnknown
-{
- HRESULT ProvideAssembly
- (
- [in] AssemblyBindInfo *pBindInfo,
- [out] UINT64 *pAssemblyId,
- [out] UINT64 *pContext,
- [out] IStream **ppStmAssemblyImage,
- [out] IStream **ppStmPDB);
-
- HRESULT ProvideModule
- (
- [in] ModuleBindInfo *pBindInfo,
- [out] DWORD *pdwModuleId,
- [out] IStream **ppStmModuleImage,
- [out] IStream **ppStmPDB);
-};
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// IHostAssemblyManager
-//
-///////////////////////////////////////////////////////////////////////////////
-[
- local,
- object,
- version(1.0),
- uuid(613dabd7-62b2-493e-9e65-c1e32a1e0c5e),
- helpstring("Assembly Manager provided by host"),
- pointer_default(unique)
-]
-interface IHostAssemblyManager: IUnknown
-{
- HRESULT GetNonHostStoreAssemblies
- (
- [out] ICLRAssemblyReferenceList **ppReferenceList
- );
-
- HRESULT GetAssemblyStore
- (
- [out] IHostAssemblyStore **ppAssemblyStore
- );
-};
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
// Implemented in mscorwks.dll, use mscoree!GetRealProcAddress to get
// a function pointer of this API.
@@ -1980,8 +793,6 @@ interface ICLRRuntimeHost : IUnknown
[out] DWORD *pReturnValue);
};
-#ifdef FEATURE_CORECLR
-
// Keys for ICLRRuntmeHost2::Authenticate. No longer required.
cpp_quote("#define CORECLR_HOST_AUTHENTICATION_KEY 0x1C6CA6F94025800LL")
cpp_quote("#define CORECLR_HOST_AUTHENTICATION_KEY_NONGEN 0x1C6CA6F94025801LL")
@@ -2054,8 +865,6 @@ interface ICLRExecutionManager : IUnknown
HRESULT Resume([in] DWORD dwAppDomainId);
}
-#endif // FEATURE_CORECLR
-
//*****************************************************************************
// Interface to utilize HostProtection
//*****************************************************************************
@@ -2076,26 +885,6 @@ typedef enum
eAll = 0x1ff
} EApiCategories;
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
-[
- object,
- uuid(89F25F5C-CEEF-43e1-9CFA-A68CE863AAAC),
- helpstring("Host Protection Interface"),
- pointer_default(unique)
-]
-interface ICLRHostProtectionManager : IUnknown
-{
- // These allow the host to specify resources that could cause
- // instability in order to guarantee protection from them.
- HRESULT SetProtectedCategories([in] EApiCategories categories);
-
- // Call once before starting the runtime to sacrifice a little
- // assembly-loading-performance for a guarantee that a certain
- // rare race condition that can result in a FatalEE error won't
- // happen.
- HRESULT SetEagerSerializeGrantSets();
-};
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
//
// Interface for configuring the default AppDomain
@@ -2110,24 +899,6 @@ typedef enum
}
EInitializeNewDomainFlags;
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
-[
- object,
- uuid(270D00A2-8E15-4d0b-ADEB-37BC3E47DF77),
- helpstring("Default AppDomain Configuration Interface"),
- pointer_default(unique)
-]
-interface ICLRDomainManager : IUnknown
-{
- HRESULT SetAppDomainManagerType([in] LPCWSTR wszAppDomainManagerAssembly,
- [in] LPCWSTR wszAppDomainManagerType,
- [in] EInitializeNewDomainFlags dwInitializeDomainFlags);
-
- HRESULT SetPropertiesForDefaultAppDomain([in] DWORD nProperties,
- [in] LPCWSTR *pwszPropertyNames,
- [in] LPCWSTR *pwszPropertyValues);
-}
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
//*****************************************************************************
// mscoree typelib definition
@@ -2210,24 +981,6 @@ library mscoree
HRESULT GetTypeNameBuilder([out, retval] ITypeNameBuilder** ppTypeBuilder);
};
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
- //*****************************************************************************
- // Interface for apartment callbacks.
- //*****************************************************************************
- [
- object,
- oleautomation,
- uuid(178E5337-1528-4591-B1C9-1C6E484686D8),
- helpstring("Apartment callback interface"),
- pointer_default(unique)
- ]
- interface IApartmentCallback : IUnknown
- {
- HRESULT _stdcall DoCallback(
- [in] SIZE_T pFunc,
- [in] SIZE_T pData);
- };
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
#ifdef _WIN64
#define CCW_PTR __int64 *
@@ -2259,24 +1012,6 @@ library mscoree
};
#endif // FEATURE_COMINTEROP
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
- //*****************************************************************************
- // Interface for controlling a managed object
- //*****************************************************************************
- [
- object,
- oleautomation,
- uuid(04C6BE1E-1DB1-4058-AB7A-700CCCFBF254),
- helpstring("ICatalogServices Interface"),
- pointer_default(unique)
- ]
- interface ICatalogServices : IUnknown
- {
- HRESULT Autodone();
-
- HRESULT NotAutodone();
- };
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
#ifdef FEATURE_COMINTEROP
//*****************************************************************************
@@ -2304,20 +1039,6 @@ library mscoree
};
#endif // FEATURE_COMINTEROP
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
- [
- uuid(CB2F6723-AB3A-11d2-9C40-00C04FA30A3E),
- helpstring("Cor Runtime Hosting Class")
- ]
- coclass CorRuntimeHost
- {
- [default] interface ICorRuntimeHost;
- interface IGCHost;
- interface ICorConfiguration;
- interface IValidator;
- interface IDebuggerInfo;
- };
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
[
uuid(90F1A06E-7712-4762-86B5-7A5EBA6BDB02),
@@ -2345,64 +1066,6 @@ typedef enum
eRestrictedContext=0x01
} EContextType;
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
-///////////////////////////////////////////////////////////////////////////////
-//
-// IHostSecurityContext
-//
-///////////////////////////////////////////////////////////////////////////////
-[
- object,
- version(1.0),
- uuid(7E573CE4-0343-4423-98D7-6318348A1D3C),
- helpstring("Security Context provided by host"),
- pointer_default(unique),
- local
-]
-
-interface IHostSecurityContext : IUnknown
-{
- HRESULT Capture([out] IHostSecurityContext** ppClonedContext);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// IHostSecurityManager
-//
-///////////////////////////////////////////////////////////////////////////////
-[
- object,
- version(1.0),
- uuid(75ad2468-a349-4d02-a764-76a68aee0c4f),
- helpstring("Security Manager provided by host"),
- pointer_default(unique),
- local
-]
-interface IHostSecurityManager: IUnknown
-{
- // Impersonation APIs.
- HRESULT ImpersonateLoggedOnUser(
- [in] HANDLE hToken);
-
- HRESULT RevertToSelf();
-
- HRESULT OpenThreadToken(
- [in] DWORD dwDesiredAccess,
- [in] BOOL bOpenAsSelf,
- [out] HANDLE *phThreadToken
- );
-
- HRESULT SetThreadToken(
- [in] HANDLE hToken);
-
- HRESULT GetSecurityContext([in] EContextType eContextType,
- [out] IHostSecurityContext** ppSecurityContext);
- // May return S_OK, E_FAIL (in what circumstances?)
- HRESULT SetSecurityContext([in] EContextType eContextType,
- [in] IHostSecurityContext* pSecurityContext);
-
-};
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
#ifdef FEATURE_APPDOMAIN_RESOURCE_MONITORING
///////////////////////////////////////////////////////////////////////////////
diff --git a/src/inc/apithreadstress.h b/src/inc/apithreadstress.h
index fc18dcc6e1..a0c6cdeb0b 100644
--- a/src/inc/apithreadstress.h
+++ b/src/inc/apithreadstress.h
@@ -46,37 +46,6 @@
#include "utilcode.h"
-#ifdef STRESS_THREAD
-
-class APIThreadStress
-{
- public:
- APIThreadStress();
- ~APIThreadStress();
-
- BOOL DoThreadStress();
- static void SyncThreadStress();
-
- static void SetThreadStressCount(int count);
-
- protected:
- virtual void Invoke() {LIMITED_METHOD_CONTRACT;};
-
- private:
- static DWORD WINAPI StartThread(void *arg);
-
- static int s_threadStressCount;
-
- int m_threadCount;
- HANDLE *m_hThreadArray;
- BOOL m_setupOK;
- LONG m_runCount;
- HANDLE m_syncEvent;
-
-};
-
-#else // STRESS_THREAD
-
class APIThreadStress
{
public:
@@ -85,6 +54,4 @@ class APIThreadStress
static void SetThreadStressCount(int count) { }
};
-#endif // STRESS_THREAD
-
#endif // _APITHREADSTRESS_H_
diff --git a/src/inc/appxutil.h b/src/inc/appxutil.h
index 2892ab7dd8..312c486332 100644
--- a/src/inc/appxutil.h
+++ b/src/inc/appxutil.h
@@ -24,7 +24,6 @@ template <typename T>
class NewArrayHolder;
BOOL WinRTSupported();
-#ifdef FEATURE_CORECLR
namespace AppX
{
@@ -34,103 +33,11 @@ namespace AppX
// On CoreCLR, the host is in charge of determining whether the process is AppX or not.
void SetIsAppXProcess(bool);
- inline bool IsAppXNGen()
- {
- WRAPPER_NO_CONTRACT;
- return false;
- }
-
#ifdef DACCESS_COMPILE
bool DacIsAppXProcess();
#endif // DACCESS_COMPILE
};
-#else // FEATURE_CORECLR
-
-struct AppXRTInfo;
-typedef DPTR(AppXRTInfo) PTR_AppXRTInfo;
-
-//---------------------------------------------------------------------------------------------
-namespace AppX
-{
- // cleans up resources allocated in InitAppXRT()
- void ShutDown();
-
- // Returns true if process is immersive (or if running in mockup environment).
- // NOTE: a return value of true doesn't necessarily indicate that the process is a
- // real Metro app, e.g. it could be an ngen process compiling an AppX assembly.
- bool IsAppXProcess();
-
-#ifdef DACCESS_COMPILE
- bool DacIsAppXProcess();
-#endif // DACCESS_COMPILE
-
- // Returns true if process is immersive (or if running in mockup environment).
- // Use only in NOFAULT regions when you are 100% sure that code:IsAppXProcess has been already called.
- // This function does not initialize (no faults).
- bool IsAppXProcess_Initialized_NoFault();
-
- // Returns true if process is NGen worker compiling an AppX assembly.
- bool IsAppXNGen();
-
- // Returns true if the host OS supports immersive apps.
- inline bool IsAppXSupported()
- { return WinRTSupported() != FALSE; }
-
- LPCWSTR GetHeadPackageMoniker();
-
- HRESULT GetCurrentPackageId(
- __inout PUINT32 pBufferLength,
- __out PBYTE pBuffer);
-
- HRESULT GetCurrentPackageInfo(
- __in UINT32 dwFlags,
- __inout PUINT32 pcbBuffer,
- __out PBYTE pbBuffer,
- __out PUINT32 nCount);
-
- bool IsAdaptiveApp();
- HRESULT GetCurrentPackageRoot(_Inout_ UINT32* length, _Out_opt_ PWSTR packageRoot);
- HRESULT GetWinMetadataDirForAdaptiveApps(_Out_ LPWSTR* winMetadDataDir);
-#ifdef FEATURE_APPX_BINDER
- enum FindFindInPackageFlags
- {
- FindFindInPackageFlags_None = 0,
- FindFindInPackageFlags_AllowLongFormatPath = 1,
- FindFindInPackageFlags_SkipCurrentPackageGraph = 2, // Only search in alt path
- };
-
- // If the function succeeds, pcchPathName is set to the length of the string that is copied to the buffer,
- // in characters, including the terminating null character, and the function returns S_OK. If the buffer
- // is too small, pcchPathName is set to the length of the buffer required (in characters),
- // including the terminating null character, and the function returns ERROR_INSUFFICIENT_BUFFER.
- HRESULT FindFileInCurrentPackage(
- __in PCWSTR pszFileName,
- __inout PUINT32 pcchPathName,
- __out PWSTR pszPathName,
- __in UINT32 uiFlags = PACKAGE_FILTER_CLR_DEFAULT,
- __in PCWSTR *rgwzAltPaths = NULL,
- __in UINT32 cAltPaths = 0,
- FindFindInPackageFlags findInCurrentPackageFlags = FindFindInPackageFlags_None);
-#endif // FEATURE_APPX_BINDER
-
- // Attempts to retrieve the AppContainer SID for the specified process.
- // For non-AppContainer processes the function will return S_FALSE and pAppContainerTokenInfo will be NULL.
- // For AppContainer processes the function will return S_OK and pAppContainerTokenInfo will contain data.
- // Note that there might be legitimate cases where this function fails (caller doesn't have permissions to
- // OpenProcess() for example) so any callers must account for such failures.
- // Use of NewArrayHolder permits method to reuse info for current process (dwPid == self) or to allocate
- // memory (dwPid != self). Cast the result to PTOKEN_APPCONTAINER_INFORMATION;
- HRESULT GetAppContainerTokenInfoForProcess(
- DWORD dwPid,
- NewArrayHolder<BYTE>& pbAppContainerTokenInfo, // Cast to PTOKEN_APPCONTAINER_INFORMATION on return.
- DWORD* pcbAppContainerTokenInfo = nullptr);
-
- // Called during NGen to pretend that we are in a certain package.
- HRESULT SetCurrentPackageForNGen(__in PCWSTR pszPackageFullName);
-}
-
-#endif // FEATURE_CORECLR
#else // FEATURE_APPX
diff --git a/src/inc/binderngen.idl b/src/inc/binderngen.idl
index d20cf93701..f3d41cd6a6 100644
--- a/src/inc/binderngen.idl
+++ b/src/inc/binderngen.idl
@@ -36,7 +36,6 @@ cpp_quote("#endif")
// interface IAssemblyName defined in fusion.idl
// interface IAssemblyEnum defined in fusion.idl
-// interface IFusionBindLog defined in fusionpriv.idl
// interface ICorSvcLogger defined in mscorsvc.idl
interface IAssemblyLocation;
diff --git a/src/inc/clrconfig.h b/src/inc/clrconfig.h
index 6d8c98190d..c15e2eb2f5 100644
--- a/src/inc/clrconfig.h
+++ b/src/inc/clrconfig.h
@@ -164,9 +164,6 @@ public:
//
// Methods to do config value (DWORD and String) lookups.
//
-#ifdef FEATURE_WIN_DB_APPCOMPAT
- static HRESULT getQuirkEnabledAndValueFromWinDB(LPCWSTR wszQuirkName, BOOL* isEnabled, CPT_QUIRK_DATA* quirkData);
-#endif
static BOOL IsConfigEnabled(const ConfigDWORDInfo & info);
// Look up a DWORD config value.
@@ -201,9 +198,6 @@ public:
// Register PerformanceDefaults' LookupConfigValue so CLRConfig can support 'MayHavePerformanceDefault' values
static void RegisterGetPerformanceDefaultValueCallback(GetPerformanceDefaultValueFunction func);
-#ifdef FEATURE_WIN_DB_APPCOMPAT
- static void RegisterWinDbQuirkApis(PFN_CptQuirkIsEnabled3 func1, PFN_CptQuirkGetData2 func2);
-#endif // FEATURE_WIN_DB_APPCOMPAT
private:
@@ -213,10 +207,6 @@ private:
// Function pointer to PerformanceDefaults' LookupConfigValue function (can't static bind from utilcode to VM)
static GetPerformanceDefaultValueFunction s_GetPerformanceDefaultValueCallback;
-#ifdef FEATURE_WIN_DB_APPCOMPAT
- static PFN_CptQuirkIsEnabled3 s_IsQuirkEnabledCallback;
- static PFN_CptQuirkGetData2 s_GetQuirkValueCallback;
-#endif // FEATURE_WIN_DB_APPCOMPAT
// Helper method to translate LookupOptions to REGUTIL::CORConfigLevel
static REGUTIL::CORConfigLevel GetConfigLevel(LookupOptions options);
diff --git a/src/inc/clrconfigvalues.h b/src/inc/clrconfigvalues.h
index eb321f3b3b..a0c24567d7 100644
--- a/src/inc/clrconfigvalues.h
+++ b/src/inc/clrconfigvalues.h
@@ -123,13 +123,9 @@ CONFIG_DWORD_INFO(INTERNAL_AppDomainNoUnload, W("AppDomainNoUnload"), 0, "Not us
RETAIL_CONFIG_STRING_INFO_EX(INTERNAL_TargetFrameworkMoniker, W("TargetFrameworkMoniker"), "Allows the test team to specify what TargetFrameworkMoniker to use.", CLRConfig::IgnoreHKLM | CLRConfig::IgnoreHKCU | CLRConfig::IgnoreConfigFiles | CLRConfig::IgnoreWindowsQuirkDB)
RETAIL_CONFIG_STRING_INFO_EX(INTERNAL_AppContextSwitchOverrides, W("AppContextSwitchOverrides"), "Allows default switch values defined in AppContext to be overwritten by values in the Config", CLRConfig::IgnoreEnv | CLRConfig::IgnoreHKLM | CLRConfig::IgnoreHKCU | CLRConfig::IgnoreWindowsQuirkDB | CLRConfig::ConfigFile_ApplicationFirst)
-#ifdef FEATURE_CORECLR
// For the proposal and discussion on why finalizers are not run on shutdown by default anymore in CoreCLR, see the API review:
// https://github.com/dotnet/corefx/issues/5205
#define DEFAULT_FinalizeOnShutdown (0)
-#else
-#define DEFAULT_FinalizeOnShutdown (1)
-#endif
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_FinalizeOnShutdown, W("FinalizeOnShutdown"), DEFAULT_FinalizeOnShutdown, "When enabled, on shutdown, blocks all user threads and calls finalizers for all finalizable objects, including live objects")
//
@@ -160,9 +156,6 @@ RETAIL_CONFIG_DWORD_INFO(EXTERNAL_DateTime_NetFX40AmPmParseAdjustment, W("Enable
#ifdef FEATURE_RANDOMIZED_STRING_HASHING
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_UseRandomizedStringHashAlgorithm, W("UseRandomizedStringHashAlgorithm"), 0, "Flag to use a string hashing algorithm who's behavior differs between AppDomains")
#endif // FEATURE_RANDOMIZED_STRING_HASHING
-#ifdef FEATURE_APPX
-RETAIL_CONFIG_DWORD_INFO(INTERNAL_Windows8ProfileAPICheckFlag, W("Windows8ProfileAPICheckFlag"), 0, "Windows 8 Profile API check behavior (non-W8P framework APIs cannot be accessed through Reflection and RefEmit). 0: normal (only check in non-dev-mode APPX). 1: always check. 2: never check.");
-#endif
//
// Conditional breakpoints
@@ -312,9 +305,7 @@ RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_gcConcurrent, W("gcConcurrent"), (DWORD)-1,
#ifdef FEATURE_CONSERVATIVE_GC
RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_gcConservative, W("gcConservative"), 0, "Enables/Disables conservative GC")
#endif
-#ifdef FEATURE_CORECLR
RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_gcServer, W("gcServer"), 0, "Enables server GC")
-#endif
CONFIG_STRING_INFO(INTERNAL_GcCoverage, W("GcCoverage"), "specify a method or regular expression of method names to run with GCStress")
CONFIG_STRING_INFO(INTERNAL_SkipGCCoverage, W("SkipGcCoverage"), "specify a list of assembly names to skip with GC Coverage")
RETAIL_CONFIG_DWORD_INFO_DIRECT_ACCESS(UNSUPPORTED_gcForceCompact, W("gcForceCompact"), "When set to true, always do compacting GC")
@@ -386,7 +377,7 @@ CONFIG_STRING_INFO_EX(INTERNAL_JitDebugBreak, W("JitDebugBreak"), "", CLRConfig:
CONFIG_DWORD_INFO_DIRECT_ACCESS(INTERNAL_JitDebuggable, W("JitDebuggable"), "")
CONFIG_DWORD_INFO_EX(INTERNAL_JitDefaultFill, W("JitDefaultFill"), 0xDD, "In debug builds, initialize the memory allocated by the nra with this byte.", CLRConfig::REGUTIL_default)
CONFIG_DWORD_INFO_EX(INTERNAL_JitDirectAlloc, W("JitDirectAlloc"), 0, "", CLRConfig::REGUTIL_default)
-#if (!defined(DEBUG) && !defined(_DEBUG)) || (defined(CROSSGEN_COMPILE) && !defined(FEATURE_CORECLR))
+#if !defined(DEBUG) && !defined(_DEBUG)
#define INTERNAL_JitEnableNoWayAssert_Default 0
#else
#define INTERNAL_JitEnableNoWayAssert_Default 1
@@ -477,7 +468,7 @@ RETAIL_CONFIG_DWORD_INFO(EXTERNAL_UseLegacyJit, W("useLegacyJit"), 0, "Set to 1
RETAIL_CONFIG_STRING_INFO_EX(EXTERNAL_DisableNativeImageLoadList, W("DisableNativeImageLoadList"), "Refuse to load native images corresponding to one of the assemblies on this semicolon-delimited list of assembly names.", CLRConfig::REGUTIL_default)
#endif
-#if defined(FEATURE_CORECLR) && defined(_TARGET_X86_)
+#if defined(_TARGET_X86_)
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_UseWindowsX86CoreLegacyJit, W("UseWindowsX86CoreLegacyJit"), 0, "Set to 1 to do all JITing with compatjit.dll. Only applicable to Windows x86 .NET Core.")
#endif
@@ -670,9 +661,6 @@ CONFIG_DWORD_INFO_EX(INTERNAL_MD_RegMetaDump, W("MD_RegMetaDump"), 0, "? Dump MD
CONFIG_DWORD_INFO_EX(INTERNAL_MD_TlbImp_BreakOnErr, W("MD_TlbImp_BreakOnErr"), 0, "ASSERT when importing TLB into MD", CLRConfig::REGUTIL_default)
CONFIG_STRING_INFO_EX(INTERNAL_MD_TlbImp_BreakOnTypeImport, W("MD_TlbImp_BreakOnTypeImport"), "ASSERT when importing a type from TLB", (CLRConfig::LookupOptions) (CLRConfig::REGUTIL_default | CLRConfig::DontPrependCOMPlus_))
// MetaData - Desktop-only
-#ifndef FEATURE_CORECLR
-RETAIL_CONFIG_DWORD_INFO_EX(INTERNAL_MD_UseMinimalDeltas, W("MD_UseMinimalDeltas"), 1, "? Some MD modifications when applying EnC?", CLRConfig::REGUTIL_default)
-#endif //!FEATURE_CORECLR
CONFIG_DWORD_INFO_EX(INTERNAL_MD_WinMD_Disable, W("MD_WinMD_Disable"), 0, "Never activate the WinMD import adapter", CLRConfig::REGUTIL_default)
CONFIG_DWORD_INFO_EX(INTERNAL_MD_WinMD_AssertOnIllegalUsage, W("MD_WinMD_AssertOnIllegalUsage"), 0, "ASSERT if a WinMD import adapter detects a tool incompatibility", CLRConfig::REGUTIL_default)
@@ -777,12 +765,7 @@ RETAIL_CONFIG_STRING_INFO_EX(UNSUPPORTED_NicPath, W("NicPath"), "Redirects NIC a
RETAIL_CONFIG_DWORD_INFO(INTERNAL_NGenTaskDelayStart, W("NGenTaskDelayStart"), 0, "Use NGen Task delay start trigger, instead of critical idle task")
// Flag for cross-platform ngen: Removes all execution of managed or third-party code in the ngen compilation process.
-#ifdef FEATURE_CORECLR
RETAIL_CONFIG_DWORD_INFO(INTERNAL_Ningen, W("Ningen"), 1, "Enable no-impact ngen")
-#else
-// Ningen is off by default for desktop to reduce compat risk
-RETAIL_CONFIG_DWORD_INFO(INTERNAL_Ningen, W("Ningen"), 0, "Enable no-impact ngen")
-#endif
CONFIG_DWORD_INFO(INTERNAL_NoASLRForNgen, W("NoASLRForNgen"), 0, "Turn off IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE bit in generated ngen images. Makes nidump output repeatable from run to run.")
RETAIL_CONFIG_DWORD_INFO_EX(EXTERNAL_NgenAllowOutput, W("NgenAllowOutput"), 0, "If set to 1, the NGEN worker will bind to the parent console, thus allowing stdout output to work", CLRConfig::REGUTIL_default)
@@ -953,6 +936,12 @@ CONFIG_DWORD_INFO(INTERNAL_SuspendDeadlockTimeout, W("SuspendDeadlockTimeout"),
CONFIG_DWORD_INFO(INTERNAL_SuspendThreadDeadlockTimeoutMs, W("SuspendThreadDeadlockTimeoutMs"), 2000, "")
RETAIL_CONFIG_DWORD_INFO(INTERNAL_ThreadSuspendInjection, W("INTERNAL_ThreadSuspendInjection"), 1, "Specifies whether to inject activations for thread suspension on Unix")
+//
+// Thread (miscellaneous)
+//
+RETAIL_CONFIG_DWORD_INFO(INTERNAL_Thread_DeadThreadCountThresholdForGCTrigger, W("Thread_DeadThreadCountThresholdForGCTrigger"), 75, "In the heuristics to clean up dead threads, this threshold must be reached before triggering a GC will be considered. Set to 0 to disable triggering a GC based on dead threads.")
+RETAIL_CONFIG_DWORD_INFO(INTERNAL_Thread_DeadThreadGCTriggerPeriodMilliseconds, W("Thread_DeadThreadGCTriggerPeriodMilliseconds"), 1000 * 60 * 30, "In the heuristics to clean up dead threads, this much time must have elapsed since the previous max-generation GC before triggering another GC will be considered")
+
//
// Threadpool
//
@@ -980,6 +969,15 @@ RETAIL_CONFIG_DWORD_INFO(INTERNAL_HillClimbing_SampleIntervalLow,
RETAIL_CONFIG_DWORD_INFO(INTERNAL_HillClimbing_SampleIntervalHigh, W("HillClimbing_SampleIntervalHigh"), 200, "");
RETAIL_CONFIG_DWORD_INFO(INTERNAL_HillClimbing_GainExponent, W("HillClimbing_GainExponent"), 200, "The exponent to apply to the gain, times 100. 100 means to use linear gain, higher values will enhance large moves and damp small ones.");
+
+//
+// Tiered Compilation
+//
+#ifdef FEATURE_TIERED_COMPILATION
+RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_TieredCompilation, W("EXPERIMENTAL_TieredCompilation"), 0, "Enables tiered compilation")
+#endif
+
+
//
// TypeLoader
//
@@ -1027,11 +1025,7 @@ CONFIG_DWORD_INFO(INTERNAL_DebugAssertOnMissedCOWPage, W("DebugAssertOnMissedCOW
#endif //FEATURE_LAZY_COW_PAGES
-#ifdef FEATURE_CORECLR
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_ReadyToRun, W("ReadyToRun"), 1, "Enable/disable use of ReadyToRun native code") // On by default for CoreCLR
-#else
-RETAIL_CONFIG_DWORD_INFO(EXTERNAL_ReadyToRun, W("ReadyToRun"), 0, "Enable/disable use of ReadyToRun native code") // Off by default for desktop
-#endif
RETAIL_CONFIG_STRING_INFO(EXTERNAL_ReadyToRunExcludeList, W("ReadyToRunExcludeList"), "List of assemblies that cannot use Ready to Run images")
RETAIL_CONFIG_STRING_INFO(EXTERNAL_ReadyToRunLogFile, W("ReadyToRunLogFile"), "Name of file to log success/failure of using Ready to Run images")
@@ -1060,6 +1054,11 @@ RETAIL_CONFIG_STRING_INFO(INTERNAL_LocalWinMDPath, W("LocalWinMDPath"), "Additio
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_AllowDComReflection, W("AllowDComReflection"), 0, "Allows out of process DCOM clients to marshal blocked reflection types.")
//
+// Performance Tracing
+//
+RETAIL_CONFIG_DWORD_INFO(INTERNAL_PerformanceTracing, W("PerformanceTracing"), 0, "Enable/disable performance tracing. Non-zero values enable tracing.")
+
+//
// Unknown
//
//---------------------------------------------------------------------------------------
@@ -1076,7 +1075,6 @@ CONFIG_DWORD_INFO_DIRECT_ACCESS(INTERNAL_AlwaysUseMetadataInterfaceMapLayout, W(
CONFIG_DWORD_INFO(INTERNAL_AssertOnUnneededThis, W("AssertOnUnneededThis"), 0, "While the ConfigDWORD is unnecessary, the contained ASSERT should be kept. This may result in some work tracking down violating MethodDescCallSites.")
CONFIG_DWORD_INFO_EX(INTERNAL_AssertStacktrace, W("AssertStacktrace"), 1, "", CLRConfig::REGUTIL_default)
RETAIL_CONFIG_STRING_INFO_DIRECT_ACCESS(UNSUPPORTED_BuildFlavor, W("BuildFlavor"), "Choice of build flavor (wks or svr) of CLR")
-CONFIG_DWORD_INFO(INTERNAL_CerLogging, W("CerLogging"), 0, "In vm\\ConstrainedExecutionRegion.cpp. Debug-only logging when we prepare methods, find reliability contract problems, restore stuff from ngen images, etc.")
CONFIG_DWORD_INFO_EX(INTERNAL_clearNativeImageStress, W("clearNativeImageStress"), 0, "", CLRConfig::REGUTIL_default)
RETAIL_CONFIG_STRING_INFO_DIRECT_ACCESS(INTERNAL_CLRLoadLogDir, W("CLRLoadLogDir"), "Enable logging of CLR selection")
RETAIL_CONFIG_STRING_INFO_EX(EXTERNAL_CONFIG, W("CONFIG"), "Used to specify an XML config file for EEConfig", CLRConfig::REGUTIL_default)
@@ -1128,11 +1126,7 @@ CONFIG_DWORD_INFO_EX(INTERNAL_MscorsnLogging, W("MscorsnLogging"), 0, "Enables s
RETAIL_CONFIG_DWORD_INFO_EX(EXTERNAL_NativeImageRequire, W("NativeImageRequire"), 0, "", CLRConfig::REGUTIL_default)
CONFIG_DWORD_INFO_EX(INTERNAL_NestedEhOom, W("NestedEhOom"), 0, "", CLRConfig::REGUTIL_default)
RETAIL_CONFIG_DWORD_INFO_EX(EXTERNAL_NO_SO_NOT_MAINLINE, W("NO_SO_NOT_MAINLINE"), 0, "", CLRConfig::REGUTIL_default)
-#if defined(CROSSGEN_COMPILE) || defined(FEATURE_CORECLR)
#define INTERNAL_NoGuiOnAssert_Default 1
-#else
-#define INTERNAL_NoGuiOnAssert_Default 0
-#endif
RETAIL_CONFIG_DWORD_INFO_EX(INTERNAL_NoGuiOnAssert, W("NoGuiOnAssert"), INTERNAL_NoGuiOnAssert_Default, "", CLRConfig::REGUTIL_default)
RETAIL_CONFIG_DWORD_INFO_EX(EXTERNAL_NoProcedureSplitting, W("NoProcedureSplitting"), 0, "", CLRConfig::REGUTIL_default)
CONFIG_DWORD_INFO_EX(INTERNAL_NoStringInterning, W("NoStringInterning"), 1, "Disallows string interning. I see no value in it anymore.", CLRConfig::REGUTIL_default)
diff --git a/src/inc/clrhost.h b/src/inc/clrhost.h
index 8cd9e3e9c2..9fe978f95a 100644
--- a/src/inc/clrhost.h
+++ b/src/inc/clrhost.h
@@ -364,9 +364,7 @@ private:
SEMAPHORE_COOKIE m_semaphore;
};
-#if defined(FEATURE_CORECLR) || !defined(SELF_NO_HOST) || defined(DACCESS_COMPILE)
HMODULE GetCLRModule ();
-#endif // defined(FEATURE_CORECLR) || !defined(SELF_NO_HOST) || defined(DACCESS_COMPILE)
#ifndef FEATURE_NO_HOST
/*
diff --git a/src/inc/clrinternal.idl b/src/inc/clrinternal.idl
index 4193d1bfe8..0c93f4ae6d 100644
--- a/src/inc/clrinternal.idl
+++ b/src/inc/clrinternal.idl
@@ -16,17 +16,7 @@ import "unknwn.idl";
// import mscoree.idl for BucketParameters definition
import "mscoree.idl";
-#ifndef FEATURE_CORECLR
-import "hstring.idl";
-#endif //!FEATURE_CORECLR
-#ifndef FEATURE_CORECLR
-interface IActivationFactory;
-cpp_quote("interface IActivationFactory;")
-
-interface IWinRTClassActivator;
-cpp_quote("interface IWinRTClassActivator;")
-#endif //!FEATURE_CORECLR
cpp_quote("#if 0")
@@ -97,30 +87,6 @@ cpp_quote("EXTERN_GUID(CLR_ID_ONECORE_CLR, 0xb1ee760d, 0x6c4a, 0x4533, 0xba, 0x4
// IID_IPrivateManagedExceptionReporting : uuid{AD76A023-332D-4298-8001-07AA9350DCA4}
cpp_quote("EXTERN_GUID(IID_IPrivateManagedExceptionReporting, 0xad76a023, 0x332d, 0x4298, 0x80, 0x01, 0x07, 0xaa, 0x93, 0x50, 0xdc, 0xa4);")
-#ifndef FEATURE_CORECLR
-// CLSID CLRRuntimeHostInternal : uuid(f7721072-bf57-476d-89f8-a7625d27683a)
-cpp_quote("EXTERN_GUID(CLSID_CLRRuntimeHostInternal, 0xf7721072, 0xbf57, 0x476d, 0x89, 0xf8, 0xa7, 0x62, 0x5d, 0x27, 0x68, 0x3a);")
-// IID ICLRRuntimeHostInternal : uuid{07C4E752-3CBA-4A07-9943-B5F206382178}
-cpp_quote("EXTERN_GUID(IID_ICLRRuntimeHostInternal, 0x07c4e752, 0x3cba, 0x4a07, 0x99, 0x43, 0xb5, 0xf2, 0x06, 0x38, 0x21, 0x78);")
-
-// CLSID_CLRShimControlInternal : uuid(62D02A5B-F527-44d8-80BC-650BBD3CB082)
-cpp_quote("EXTERN_GUID(CLSID_CLRShimControlInternal, 0x62d02a5b, 0xf527, 0x44d8, 0x80, 0xbc, 0x65, 0xb, 0xbd, 0x3c, 0xb0, 0x82);")
-
-// IID ICLRShimControlInternal : uuid{826AAAD7-717B-44f8-9BB0-7DAC368B85A5}
-cpp_quote("EXTERN_GUID(IID_ICLRShimControlInternal, 0x826AAAD7, 0x717b, 0x44f8, 0x9b, 0xb0, 0x7d, 0xac, 0x36, 0x8b, 0x85, 0xa5);")
-
-// CLSID_CLRActivationFactory : uuid{5B132A7D-DA8E-461b-A0F2-109141C768CB}
-cpp_quote("EXTERN_GUID(CLSID_CLRActivationFactory, 0x5b132a7d, 0xda8e, 0x461b, 0xa0, 0xf2, 0x10, 0x91, 0x41, 0xc7, 0x68, 0xcb );")
-
-// IID_ICLRActivationFactory : uuid{331F2F6C-385F-462c-9125-816712FB2BC6}
-cpp_quote("EXTERN_GUID(IID_ICLRActivationFactory, 0x331f2f6c, 0x385f, 0x462c, 0x91, 0x25, 0x81, 0x67, 0x12, 0xfb, 0x2b, 0xc6);")
-
-// IID_ICLRActivationFactory2 : uuid{035049E5-2658-40C0-9269-21C48D8F0748}
-cpp_quote("EXTERN_GUID(IID_ICLRActivationFactory2, 0x035049E5, 0x2658, 0x40C0, 0x92, 0x69, 0x21, 0xC4, 0x8D, 0x8F, 0x07, 0x48);")
-
-// IID IID_ICLRExecutionManager: uuid(1000A3E7-B420-4620-AE30-FB19B587AD1D)
-cpp_quote("EXTERN_GUID(IID_ICLRExecutionManager, 0x1000A3E7, 0xB420, 0x4620, 0xAE, 0x30, 0xFB, 0x19, 0xB5, 0x87, 0xAD, 0x1D);")
-#endif // !FEATURE_CORECLR
//*****************************************************************************
// Interface for exposing services from the EE to other DLLs of the CLR.
@@ -327,165 +293,4 @@ interface IPrivateManagedExceptionReporting : IUnknown
HRESULT GetBucketParametersForCurrentException([out]BucketParameters *pParams);
}
-#ifndef FEATURE_CORECLR
-/**************************************************************************************
- ** ICLRRuntimeHostInternal **
- ** This is the functionality used only by CLR internal tools that moved from being **
- ** flat APIs (loading the latest runtime) to something that is runtime-specific and **
- ** requires the runtime to be loaded. **
- **************************************************************************************/
-[
- uuid(07C4E752-3CBA-4A07-9943-B5F206382178),
- version(1.0),
- helpstring("CLR internal hosting interface for V4.0"),
- local
-]
-interface ICLRRuntimeHostInternal : IUnknown
-{
- HRESULT MetaDataGetDispenser(
- [in] REFCLSID rclsid,
- [in] REFIID riid,
- [out, iid_is(riid), retval] IUnknown **ppInterface);
-
- HRESULT GetAssemblyMDImport(
- [in] LPCWSTR wszFileName, // The scope (file name) to open.
- [in] REFIID riid, // Desired interface.
- [out, iid_is(riid), retval] IUnknown **ppIUnk); // Returned interface on success.
-
- HRESULT GetMetaDataInternalInterface(
- [in, size_is(cbData)] BYTE *pbData, // MetaData data.
- [in] ULONG cbData, // MetaData data size.
- [in] DWORD flags, // Flags.
- [in] REFIID riid, // Desired interface.
- [out, iid_is(riid), retval] LPVOID *ppInterface); // Returned interface.
-
- HRESULT GetMetaDataInternalInterfaceFromPublic(
- [in] IUnknown *pInterface, // Given interface.
- [in] REFIID riid, // Desired interface.
- [out, iid_is(riid), retval] LPVOID *ppInterface); // Returned interface.
-
- HRESULT GetMetaDataPublicInterfaceFromInternal(
- [in] IUnknown *pInterface, // Given interface.
- [in] REFIID riid, // Desired interface.
- [out, iid_is(riid), retval] LPVOID *ppInterface); // Returned interface.
-
- /**********************************************************************************
- ** Returns the version string that MD emitter should by default write to images.**
- ** Supersedes: GetCORRequiredVersion **
- **********************************************************************************/
- HRESULT GetImageVersionString(
- [out, size_is(*pcchBuffer), annotation("__out_ecount_opt(*pcchBuffer)")] LPWSTR pwzBuffer, // Returned version string.
- [in, out] DWORD *pcchBuffer); // Buffer size/version length.
-
- /**********************************************************************************
- ** Locks the given module for this runtime. The HRESULT is S_OK if it is the **
- ** runtime represented by this instance, S_FALSE if somebody beat us to it. **
- **********************************************************************************/
- HRESULT LockModuleForRuntime(
- [in] BYTE *pModuleBase, // Address where the module is mapped.
- [in] REFIID riid, // Desired interface.
- [out, iid_is(riid)] LPVOID *ppRuntime); // The owning runtime.
-
- /**********************************************************************************
- ** Asks the Shim to attempt a graceful shutdown of all other runtimes loaded **
- ** in this process, then to exit the process via ::ExitProcess(). V4+ runtimes **
- ** call this instead of ::ExitProcess(). **
- **********************************************************************************/
- HRESULT ShutdownAllRuntimesThenExit(
- [in] UINT exitCode); // Process exit code.
-
- /**********************************************************************************
- ** GetTrueOSVersion - Bypasses the OS compatibility shim **
- **********************************************************************************/
- HRESULT GetTrueOSVersion(
- [out, in] LPOSVERSIONINFO osvi); // OS Version.
-
- /**********************************************************************************
- ** Returns the runtime that a COM component with the given CLSID would be **
- ** activated in. Returns runtime represented by this instance for Fx types. **
- **********************************************************************************/
- HRESULT GetRuntimeForManagedCOMObject(
- [in] REFCLSID rclsid, // CLSID of the component.
- [in] REFIID riid, // Desired runtime interface.
- [out, iid_is(riid), retval] LPVOID *ppRuntime); // Returned runtime.
-}; // interface ICLRRuntimeHostInternal
-
-/**************************************************************************************
- ** ICLRShimControlInternal **
- ** This is the functionality used only by CLR internal tools that moved from being **
- ** flat APIs (loading the latest runtime) to controlshim behavior **
- **************************************************************************************/
-[
- uuid(826AAAD7-717B-44f8-9BB0-7DAC368B85A5),
- version(1.0),
- helpstring("CLR internal hosting interface for V4.0"),
- local
-]
-interface ICLRShimControlInternal : IUnknown
-{
- HRESULT SetShouldSkipSkuCheck(
- [in] BOOL bValue
- );
-}; // interface ICLRRuntimeHostInternal
-
-
-
-/**************************************************************************************
- ** ICLRActivationFactory **
- ** This is the functionality used only by CLR to provide in-proc **
- ** hosting **
- **************************************************************************************/
-[
- uuid(331F2F6C-385F-462c-9125-816712FB2BC6),
- version(1.0),
- helpstring("CLR internal activation factory for V4.5"),
- local
-]
-interface ICLRActivationFactory : IUnknown
-{
- HRESULT CreateFactory([in] LPCWSTR activatableClassId,
- [out, retval] IActivationFactory** factory);
-
-}; // interface ICLRActivationFactory
-
-/**************************************************************************************
- ** ICLRActivationFactory2 **
- ** This is functionality exposed by the CLR to enable hosting WinRT components in a **
- ** non-AppX process **
- **************************************************************************************/
-[
- uuid(035049E5-2658-40C0-9269-21C48D8F0748),
- version(1.0),
- helpstring("CLR internal activation factory for desktop WinRT activation"),
- local
-]
-interface ICLRActivationFactory2 : ICLRActivationFactory
-{
- HRESULT GetClassActivatorForApplication(HSTRING appPath, [out] IWinRTClassActivator** ppActivator);
-};
-
-typedef enum
-{
- PAUSE_APP_DOMAINS = 0x1
-
-} PauseFlags;
-
-[
- uuid(1000A3E7-B420-4620-AE30-FB19B587AD1D),
- version(1.0),
- helpstring("Pause and Resume Interface"),
- pointer_default(unique),
- local
-]
-interface ICLRExecutionManager : IUnknown
-{
- // Pause all managed threads
- // Parameters are ignored and reserved for future use.
- HRESULT Pause([in] DWORD dwAppDomainId, [in] DWORD dwFlags);
-
- // Resume managed threads
- // Parameters are ignored and reserved for future use.
- HRESULT Resume([in] DWORD dwAppDomainId);
-}
-#endif // !FEATURE_CORECLR
diff --git a/src/inc/clrnt.h b/src/inc/clrnt.h
index 08a93a4961..ebea066663 100644
--- a/src/inc/clrnt.h
+++ b/src/inc/clrnt.h
@@ -80,10 +80,8 @@
#define __field_ecount(EHCount)
#endif
-#ifdef FEATURE_CORECLR
#undef _Ret_bytecap_
#define _Ret_bytecap_(_Size)
-#endif
#ifndef NT_SUCCESS
#define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0)
diff --git a/src/inc/clrprivbinderutil.h b/src/inc/clrprivbinderutil.h
index 129e90388e..d42f2b8d66 100644
--- a/src/inc/clrprivbinderutil.h
+++ b/src/inc/clrprivbinderutil.h
@@ -11,9 +11,6 @@
#include "holder.h"
#include "internalunknownimpl.h"
-#ifdef FEATURE_FUSION
-#include "fusion.h"
-#endif
#include "clrprivbinding.h"
#include "slist.h"
#ifdef FEATURE_COMINTEROP
@@ -89,125 +86,6 @@ namespace CLRPrivBinderUtil
}
//=====================================================================================================================
-#ifdef FEATURE_FUSION
- class CLRPrivAssemblyBindResultWrapper :
- public IUnknownCommon<
- IBindResult,
- IAssemblyLocation>
- {
- public:
- //-----------------------------------------------------------------------------------------------------------------
- CLRPrivAssemblyBindResultWrapper(
- IAssemblyName *pIAssemblyName,
- PCWSTR wzAssemblyPath,
- IILFingerprintFactory *pILFingerprintFactory
- );
-
- //-----------------------------------------------------------------------------------------------------------------
- ~CLRPrivAssemblyBindResultWrapper();
-
- protected:
- //=================================================================================================================
- // IBindResult methods
-
- //-----------------------------------------------------------------------------------------------------------------
- STDMETHOD(GetAssemblyNameDef)(
- /*out*/ IAssemblyName **ppIAssemblyNameDef);
-
- //-----------------------------------------------------------------------------------------------------------------
- STDMETHOD(GetNextAssemblyModuleName)(
- /*in*/ DWORD dwNIndex,
- __inout_ecount(*pdwCCModuleName) LPWSTR pwzModuleName,
- /*in, out, annotation("__inout")*/ LPDWORD pdwCCModuleName);
-
- //-----------------------------------------------------------------------------------------------------------------
- STDMETHOD(GetAssemblyLocation)(
- /*out*/ IAssemblyLocation **ppIAssemblyLocation);
-
- //-----------------------------------------------------------------------------------------------------------------
- STDMETHOD(GetNativeImage)(
- /*out*/ IBindResult **ppIBindResultNI,
- /*out*/ BOOL *pfIBindResultNIProbed);
-
- //-----------------------------------------------------------------------------------------------------------------
- STDMETHOD(SetNativeImage)(
- /*in*/ IBindResult *pIBindResultNI,
- /*out*/ IBindResult **ppIBindResultNIFinal);
-
- //-----------------------------------------------------------------------------------------------------------------
- STDMETHOD(IsEqual)(
- /*in*/ IUnknown *pIUnk);
-
- //-----------------------------------------------------------------------------------------------------------------
- STDMETHOD(GetNextAssemblyNameRef)(
- /*in*/ DWORD dwNIndex,
- /*out*/ IAssemblyName **ppIAssemblyNameRef);
-
- //-----------------------------------------------------------------------------------------------------------------
- STDMETHOD(GetNextDependentAssembly)(
- /*in*/ DWORD dwNIndex,
- /*out*/ IUnknown **ppIUnknownAssembly);
-
- //-----------------------------------------------------------------------------------------------------------------
- STDMETHOD(GetAssemblyLocationOfILImage)(
- /*out*/ IAssemblyLocation **ppAssemblyLocation);
-
- //-----------------------------------------------------------------------------------------------------------------
- STDMETHOD(GetILFingerprint)(
- /*out*/ IILFingerprint **ppFingerprint);
-
- //-----------------------------------------------------------------------------------------------------------------
- STDMETHOD(GetSourceILTimestamp)(
- /*out*/ FILETIME* pFileTime);
-
- //-----------------------------------------------------------------------------------------------------------------
- STDMETHOD(GetSourceILSize)(
- /*out*/ DWORD* pSize);
-
- //-----------------------------------------------------------------------------------------------------------------
- STDMETHOD(GetNIInfo)(
- /*out*/ INativeImageInstallInfo** pInfo);
-
- //-----------------------------------------------------------------------------------------------------------------
- STDMETHOD(GetFlags)(
- /*out*/ DWORD * pdwFlags);
-
- //=================================================================================================================
- // IAssemblyLocation methods
-
- //-----------------------------------------------------------------------------------------------------------------
- STDMETHOD(GetLocationType)(
- /*out*/DWORD *pdwLocationType);
-
- //-----------------------------------------------------------------------------------------------------------------
- STDMETHOD(GetPath)(
- __inout_ecount(*pdwccAssemblyPath) LPWSTR pwzAssemblyPath,
- /*in, annotation("__inout")*/ LPDWORD pdwccAssemblyPath);
-
- //-----------------------------------------------------------------------------------------------------------------
- STDMETHOD(GetHostID)(
- /*out*/ UINT64 *puiHostID);
-
- private:
- inline PCWSTR GetILAssemblyPath()
- { LIMITED_METHOD_CONTRACT; return m_wzAssemblyPath; }
-
- NewArrayHolder<WCHAR> m_wzAssemblyPath;
- IAssemblyName * m_pIAssemblyName;
-
- // Since m_bIBindResultNISet and m_pIBindResultNI are separate data, they both need
- // to be treated as volatile, making sure to always fetch m_bIBindResultNISet first
- // and only read m_pIBindResultNI if m_bIBindResultNISet is true.
- Volatile<bool> m_bIBindResultNISet;
- VolatilePtr<IBindResult> m_pIBindResultNI;
-
- IILFingerprint * m_pIILFingerprint;
- ReleaseHolder<IILFingerprintFactory> m_pILFingerprintFactory;
-
- // Used as a leaf lock for publishing, such as m_pIBindResultNI.
- Crst m_lock;
- }; // class CLRPrivAssemblyBindResultWrapper
-#endif // FEATURE_FUSION
//=================================================================================================================
// Used to create an identity-only ICLRPrivAssembly from an ICLRPrivBinder. This is currently used when
@@ -859,9 +737,6 @@ namespace CLRPrivBinderUtil
/** probably should be exposed on an instance (of something) method rather that magically calling GetAppDomain() **/
ICLRPrivAssembly* RaiseAssemblyResolveEvent(IAssemblyName *pAssemblyName, ICLRPrivAssembly* pRequestingAssembly);
- /** PLACEHOLDER - CLRPRivBinderFusion::BindAssemblyByName throws, despite being an HRESULT function,
- most presumably because returning HRESULT is too lossy **/
-
/** Ultimately, only the binder can do ref-def matching, and it should be opaque to CLR.
This is not trivial to do, however, since we cannot do data conversion as the function is nofault **/
BOOL CompareHostBinderSpecs(AssemblySpec* a1, AssemblySpec* a2);
diff --git a/src/inc/clrtypes.h b/src/inc/clrtypes.h
index 5f9de0cbf1..b0b1fc23f4 100644
--- a/src/inc/clrtypes.h
+++ b/src/inc/clrtypes.h
@@ -12,7 +12,7 @@
#ifndef CLRTYPES_H_
#define CLRTYPES_H_
-#if defined(_MSC_VER) && !defined(SOURCE_FORMATTING) && (!defined(FEATURE_CORECLR) || defined(FEATURE_CORESYSTEM))
+#if defined(_MSC_VER) && !defined(SOURCE_FORMATTING) && defined(FEATURE_CORESYSTEM)
// Prefer intsafe.h when available, which defines many of the MAX/MIN
// values below (which is why they are in #ifndef blocks).
#include <intsafe.h>
diff --git a/src/inc/cor.h b/src/inc/cor.h
index 9fd279e74b..a050eb42aa 100644
--- a/src/inc/cor.h
+++ b/src/inc/cor.h
@@ -171,7 +171,6 @@ DEPRECATED_CLR_STDAPI_(void) CoUninitializeEE(BOOL fFlags);
DEPRECATED_CLR_STDAPI_(void) CoEEShutDownCOM(void);
-#ifdef FEATURE_MAIN_CLR_MODULE_USES_CORE_NAME
#define MAIN_CLR_MODULE_NAME_W W("coreclr")
#define MAIN_CLR_MODULE_NAME_A "coreclr"
@@ -179,24 +178,10 @@ DEPRECATED_CLR_STDAPI_(void) CoEEShutDownCOM(void);
#define MAIN_CLR_DLL_NAME_W MAKEDLLNAME_W(MAIN_CLR_MODULE_NAME_W)
#define MAIN_CLR_DLL_NAME_A MAKEDLLNAME_A(MAIN_CLR_MODULE_NAME_A)
-#else //FEATURE_MAIN_CLR_MODULE_USES_CORE_NAME
-#define MAIN_CLR_MODULE_NAME_W L"clr"
-#define MAIN_CLR_MODULE_NAME_A "clr"
-#define MAIN_CLR_DLL_NAME_W MAKEDLLNAME_W(MAIN_CLR_MODULE_NAME_W)
-#define MAIN_CLR_DLL_NAME_A MAKEDLLNAME_A(MAIN_CLR_MODULE_NAME_A)
-
-#endif //FEATURE_MAIN_CLR_MODULE_USES_CORE_NAME
-
-
-#ifdef FEATURE_CORECLR
#define MSCOREE_SHIM_W MAIN_CLR_DLL_NAME_W
#define MSCOREE_SHIM_A MAIN_CLR_DLL_NAME_A
-#else
-#define MSCOREE_SHIM_W L"mscoree.dll"
-#define MSCOREE_SHIM_A "mscoree.dll"
-#endif // FEATURE_CORECLR
#define SWITCHOUT_HANDLE_VALUE ((HANDLE)(LONG_PTR)-2)
diff --git a/src/inc/corbbtprof.h b/src/inc/corbbtprof.h
index 2f69dcccc8..5aa7782544 100644
--- a/src/inc/corbbtprof.h
+++ b/src/inc/corbbtprof.h
@@ -140,7 +140,7 @@ enum TypeProfilingDataFlags
ReadMethodTable = 0, // 0x00001
ReadEEClass = 1, // 0x00002
WriteEEClass = 2, // 0x00004
-// ReadStoredEnumData = 3, // 0x00008
+// ReadStoredEnumData = 3, // 0x00008 // obsolete
ReadFieldDescs = 4, // 0x00010
ReadCCtorInfo = 5, // 0x00020
ReadClassHashTable = 6, // 0x00040
@@ -148,34 +148,37 @@ enum TypeProfilingDataFlags
ReadDispatchTable = 8, // 0x00100
ReadMethodTableWriteableData = 9, // 0x00200
ReadFieldMarshalers = 10, // 0x00400
-// Unused = 11, // 0x00800 ... Was WriteDispatchTable in the past
-// WriteMethodTable = 12, // 0x01000
+// WriteDispatchTable = 11, // 0x00800 // obsolete
+// WriteMethodTable = 12, // 0x01000 // obsolete
WriteMethodTableWriteableData = 13, // 0x02000
ReadTypeDesc = 14, // 0x04000
WriteTypeDesc = 15, // 0x08000
ReadTypeHashTable = 16, // 0x10000
-// WriteTypeHashTable = 17, // 0x20000
-// ReadDictionary = 18, // 0x40000
-// WriteDictionary = 19, // 0x80000
+// WriteTypeHashTable = 17, // 0x20000 // obsolete
+// ReadDictionary = 18, // 0x40000 // obsolete
+// WriteDictionary = 19, // 0x80000 // obsolete
ReadNonVirtualSlots = 20, // 0x100000
};
enum MethodProfilingDataFlags
{
// Important: update toolbox\ibcmerge\ibcmerge.cs if you change these
- ReadMethodCode = 0, // 0x00001
+ ReadMethodCode = 0, // 0x00001 // Also means the method was executed
ReadMethodDesc = 1, // 0x00002
- RunOnceMethod = 2, // 0x00004 // was CommonMethod
- RunNeverMethod = 3, // 0x00008 // was MethodMetadataAccess
-// MethodStoredDataAccess = 4, // 0x00010
+ RunOnceMethod = 2, // 0x00004
+ RunNeverMethod = 3, // 0x00008
+// MethodStoredDataAccess = 4, // 0x00010 // obsolete
WriteMethodDesc = 5, // 0x00020
-// ReadFCallHash = 6, // 0x00040
+// ReadFCallHash = 6, // 0x00040 // obsolete
ReadGCInfo = 7, // 0x00080
CommonReadGCInfo = 8, // 0x00100
-// ReadMethodDefRidMap = 9, // 0x00200
+// ReadMethodDefRidMap = 9, // 0x00200 // obsolete
ReadCerMethodList = 10, // 0x00400
ReadMethodPrecode = 11, // 0x00800
WriteMethodPrecode = 12, // 0x01000
+ ExcludeHotMethodCode = 13, // 0x02000 // Hot method should be excluded from the ReadyToRun image
+ ExcludeColdMethodCode = 14, // 0x04000 // Cold method should be excluded from the ReadyToRun image
+ DisableInlining = 15, // 0x08000 // Disable inlining of this method in optimized AOT native code
};
enum GeneralProfilingDataFlags
diff --git a/src/inc/corcompile.h b/src/inc/corcompile.h
index 9cd072008a..f99e27eec0 100644
--- a/src/inc/corcompile.h
+++ b/src/inc/corcompile.h
@@ -32,11 +32,6 @@
#include <corhdr.h>
#include <corinfo.h>
#include <corjit.h>
-#ifdef FEATURE_FUSION
-#include <fusion.h>
-#include <fusionpriv.h>
-#include <binderngen.h>
-#endif //FEATURE_FUSION
#include <sstring.h>
#include <shash.h>
#include <daccess.h>
@@ -190,14 +185,8 @@ enum CorCompileCodegen
CORCOMPILE_CODEGEN_PROFILING = 0x0004, // supports profiling
CORCOMPILE_CODEGEN_PROF_INSTRUMENTING = 0x0008, // code is instrumented to collect profile count info
-#if defined(_TARGET_AMD64_) && !defined(FEATURE_CORECLR)
- CORCOMPILE_CODEGEN_USE_RYUJIT = 0x0100, // code is generated by Ryu JIT
-#endif
};
-#if defined(_TARGET_AMD64_) && !defined(FEATURE_CORECLR)
-bool UseRyuJit();
-#endif
// Used for INativeImageInstallInfo::GetConfigMask()
// A bind will ask for the particular bits it needs set; if all bits are set, it is a match. Additional
@@ -833,13 +822,8 @@ struct CORCOMPILE_ASSEMBLY_SIGNATURE
typedef enum
{
-#ifdef FEATURE_CORECLR
CORECLR_INFO,
CROSSGEN_COMPILER_INFO,
-#else
- CLR_INFO,
- NGEN_COMPILER_INFO,
-#endif
NUM_RUNTIME_DLLS
} CorCompileRuntimeDlls;
@@ -894,18 +878,6 @@ struct CORCOMPILE_VERSION_INFO
};
-#ifndef FEATURE_CORECLR
-enum CorCompileDependencyInfo
-{
-#ifdef FEATURE_APTCA
- CORCOMPILE_DEPENDENCY_IS_APTCA = 0x1,
- CORCOMPILE_DEPENDENCY_IS_CAPTCA = 0x2,
-#endif //FEATURE_APTCA
-
- CORCOMPILE_DEPENDENCY_PEKIND_MASK = 0xff00,
- CORCOMPILE_DEPENDENCY_PEKIND_SHIFT = 8,
-};
-#endif //!FEATURE_CORECLR
struct CORCOMPILE_DEPENDENCY
@@ -919,14 +891,7 @@ struct CORCOMPILE_DEPENDENCY
CORCOMPILE_NGEN_SIGNATURE signNativeImage; // INVALID_NGEN_SIGNATURE if this a soft-bound dependency
-#ifdef FEATURE_APTCA
- // Win32 version info for tracking dependency references to strong-named assemblies with APTCA
- ULARGE_INTEGER uliFileVersion; // OS file version ~ NOT assembly version
-#endif //FEATURE_APTCA
-#ifndef FEATURE_CORECLR
- CorCompileDependencyInfo dependencyInfo; //Flags about the dependency
-#endif //!FEATURE_CORECLR
};
/*********************************************************************************/
@@ -1339,6 +1304,12 @@ class ICorCompilePreloader
CORINFO_METHOD_HANDLE method,
CORINFO_METHOD_HANDLE duplicateMethod) = 0;
+ // Returns a compressed encoding of the inline tracking map
+ // for this compilation
+ virtual void GetSerializedInlineTrackingMap(
+ IN OUT SBuffer * pSerializedInlineTrackingMap
+ ) = 0;
+
//
// Release frees the preloader
//
@@ -1438,13 +1409,6 @@ class ICorCompilationDomain
DWORD *cDependencies
) = 0;
-#ifdef FEATURE_FUSION
- // Use to retrieve the IBindContext to be used by the native binder.
- // This is typically passed into InstallNativeAssembly.
- virtual HRESULT GetIBindContext(
- IBindContext **ppBindCtx
- ) = 0;
-#endif
#ifdef CROSSGEN_COMPILE
virtual HRESULT SetPlatformWinmdPaths(
@@ -1523,34 +1487,6 @@ class ICorCompileInfo
CORINFO_ASSEMBLY_HANDLE *pHandle
) = 0;
-#ifdef FEATURE_FUSION
- // Loads an assembly via fusion into the EE
- // and returns a handle to it.
- virtual HRESULT LoadAssemblyByName(
- LPCWSTR wzName,
- CORINFO_ASSEMBLY_HANDLE *pHandle
- ) = 0;
-
- // Loads an assembly via ref into the EE
- // and returns a handle to it. The last parameter
- // optionally allows an IAssemblyName for the ref
- // (pre-policy) to be returned
- virtual HRESULT LoadAssemblyRef(
- IMDInternalImport *pAssemblyImport,
- mdAssemblyRef ref,
- CORINFO_ASSEMBLY_HANDLE *pHandle,
- IAssemblyName **refAssemblyName = NULL
- ) = 0;
-
- // Loads an assembly via its IAssemblyName. This is
- // used by NGEN createpdb when generating PDBs for AutoNGENd images (it reads the
- // IAssemblyName from the AUX file).
- virtual HRESULT LoadAssemblyByIAssemblyName(
- IAssemblyName *pAssemblyName,
- CORINFO_ASSEMBLY_HANDLE *pHandle
- ) = 0;
-
-#endif //FEATURE_FUSION
#ifdef FEATURE_COMINTEROP
// Loads a WinRT typeref into the EE and returns
@@ -1574,19 +1510,6 @@ class ICorCompileInfo
CORINFO_MODULE_HANDLE *pHandle
) = 0;
-#ifndef FEATURE_CORECLR
- // Check if the assembly supports automatic NGen
- virtual BOOL SupportsAutoNGen(
- CORINFO_ASSEMBLY_HANDLE assembly
- ) = 0;
-
- // Tell OS to set cached signing level of the native image based on input assemblies
- virtual HRESULT SetCachedSigningLevel(
- HANDLE hNI,
- HANDLE *pModules,
- COUNT_T nModules
- ) = 0;
-#endif
// Checks to see if an up to date zap exists for the
// assembly
@@ -1603,22 +1526,6 @@ class ICorCompileInfo
CORINFO_MODULE_HANDLE module
) = 0;
-#ifdef FEATURE_FUSION
- enum GetAssemblyNameFlags
- {
- GANF_Default = 0,
- GANF_Simple = 1,
- };
-
- // Returns the fusion name of an assembly
- virtual HRESULT GetAssemblyName(
- CORINFO_ASSEMBLY_HANDLE hAssembly,
- DWORD dwFlags,
- __out_ecount(*cchAssemblyName)
- __out_z LPWSTR wzAssemblyName,
- LPDWORD cchAssemblyName
- ) = 0;
-#endif //FEATURE_FUSION
// Returns the dependency load setting for an assembly ref
virtual HRESULT GetLoadHint(
@@ -1908,9 +1815,7 @@ extern "C" unsigned __stdcall PartialNGenStressPercentage();
// create a PDB dumping all functions in hAssembly into pdbPath
extern "C" HRESULT __stdcall CreatePdb(CORINFO_ASSEMBLY_HANDLE hAssembly, BSTR pNativeImagePath, BSTR pPdbPath, BOOL pdbLines, BSTR pManagedPdbSearchPath, LPCWSTR pDiasymreaderPath);
-#if defined(FEATURE_CORECLR) || defined(CROSSGEN_COMPILE)
extern bool g_fNGenMissingDependenciesOk;
-#endif
extern bool g_fNGenWinMDResilient;
diff --git a/src/inc/coregen.h b/src/inc/coregen.h
index 5ca7334e92..5864bbbaef 100644
--- a/src/inc/coregen.h
+++ b/src/inc/coregen.h
@@ -18,5 +18,6 @@
#define NGENWORKER_FLAGS_WINMD_RESILIENT 0x1000
#define NGENWORKER_FLAGS_READYTORUN 0x2000
#define NGENWORKER_FLAGS_NO_METADATA 0x4000
+#define NGENWORKER_FLAGS_SILENT 0x8000
#endif // _NGENCOMMON_H_
diff --git a/src/inc/corhdr.h b/src/inc/corhdr.h
index c194def07f..4b757421cb 100644
--- a/src/inc/corhdr.h
+++ b/src/inc/corhdr.h
@@ -751,6 +751,7 @@ typedef enum CorAssemblyFlags
afEnableJITcompileTracking = 0x8000, // From "DebuggableAttribute".
afDisableJITcompileOptimizer = 0x4000, // From "DebuggableAttribute".
+ afDebuggableAttributeMask = 0xc000,
afRetargetable = 0x0100, // The assembly can be retargeted (at runtime) to an
// assembly from a different publisher.
diff --git a/src/inc/corhost.h b/src/inc/corhost.h
index 579088ca61..3aabe9ed5d 100644
--- a/src/inc/corhost.h
+++ b/src/inc/corhost.h
@@ -28,9 +28,6 @@
#include "ivehandler.h"
#include "ivalidator.h"
-#ifdef FEATURE_FUSION
-#include "fusion.h"
-#endif
#include "holder.h"
#include "clrprivhosting.h"
@@ -46,210 +43,6 @@ class DangerousNonHostedSpinLock;
class AppDomain;
class Assembly;
-#if !defined(FEATURE_CORECLR)
-class CorThreadpool : public ICorThreadpool
-{
-public:
- HRESULT STDMETHODCALLTYPE CorRegisterWaitForSingleObject(PHANDLE phNewWaitObject,
- HANDLE hWaitObject,
- WAITORTIMERCALLBACK Callback,
- PVOID Context,
- ULONG timeout,
- BOOL executeOnlyOnce,
- BOOL* pResult);
-
- HRESULT STDMETHODCALLTYPE CorBindIoCompletionCallback(HANDLE fileHandle, LPOVERLAPPED_COMPLETION_ROUTINE callback);
-
- HRESULT STDMETHODCALLTYPE CorUnregisterWait(HANDLE hWaitObject,HANDLE CompletionEvent, BOOL* pResult);
-
- HRESULT STDMETHODCALLTYPE CorQueueUserWorkItem(LPTHREAD_START_ROUTINE Function,PVOID Context,BOOL executeOnlyOnce, BOOL* pResult );
-
- HRESULT STDMETHODCALLTYPE CorCallOrQueueUserWorkItem(LPTHREAD_START_ROUTINE Function,PVOID Context,BOOL* pResult );
-
- HRESULT STDMETHODCALLTYPE CorCreateTimer(PHANDLE phNewTimer,
- WAITORTIMERCALLBACK Callback,
- PVOID Parameter,
- DWORD DueTime,
- DWORD Period,
- BOOL* pResult);
-
- HRESULT STDMETHODCALLTYPE CorDeleteTimer(HANDLE Timer, HANDLE CompletionEvent, BOOL* pResult);
-
- HRESULT STDMETHODCALLTYPE CorChangeTimer(HANDLE Timer,ULONG DueTime,ULONG Period, BOOL* pResult);
-
- HRESULT STDMETHODCALLTYPE CorSetMaxThreads(DWORD MaxWorkerThreads,
- DWORD MaxIOCompletionThreads);
-
- HRESULT STDMETHODCALLTYPE CorGetMaxThreads(DWORD *MaxWorkerThreads,
- DWORD *MaxIOCompletionThreads);
-
- HRESULT STDMETHODCALLTYPE CorGetAvailableThreads(DWORD *AvailableWorkerThreads,
- DWORD *AvailableIOCompletionThreads);
-};
-
-class CorGCHost : public IGCHost2
-{
-public:
- // IGCHost
- STDMETHODIMP STDMETHODCALLTYPE SetGCStartupLimits(
- DWORD SegmentSize,
- DWORD MaxGen0Size);
-
- STDMETHODIMP STDMETHODCALLTYPE Collect(
- LONG Generation);
-
- STDMETHODIMP STDMETHODCALLTYPE GetStats(
- COR_GC_STATS *pStats);
-
- STDMETHODIMP STDMETHODCALLTYPE GetThreadStats(
- DWORD *pFiberCookie,
- COR_GC_THREAD_STATS *pStats);
-
- STDMETHODIMP STDMETHODCALLTYPE SetVirtualMemLimit(
- SIZE_T sztMaxVirtualMemMB);
-
- // IGCHost2
- STDMETHODIMP STDMETHODCALLTYPE SetGCStartupLimitsEx(
- SIZE_T SegmentSize,
- SIZE_T MaxGen0Size);
-
-private:
-
- HRESULT _SetGCSegmentSize(SIZE_T SegmentSize);
- HRESULT _SetGCMaxGen0Size(SIZE_T MaxGen0Size);
-};
-
-class CorConfiguration : public ICorConfiguration
-{
-public:
- virtual HRESULT STDMETHODCALLTYPE SetGCThreadControl(
- /* [in] */ IGCThreadControl __RPC_FAR *pGCThreadControl);
-
- virtual HRESULT STDMETHODCALLTYPE SetGCHostControl(
- /* [in] */ IGCHostControl __RPC_FAR *pGCHostControl);
-
- virtual HRESULT STDMETHODCALLTYPE SetDebuggerThreadControl(
- /* [in] */ IDebuggerThreadControl __RPC_FAR *pDebuggerThreadControl);
-
- virtual HRESULT STDMETHODCALLTYPE AddDebuggerSpecialThread(
- /* [in] */ DWORD dwSpecialThreadId);
-
- // This mechanism isn't thread-safe with respect to reference counting, because
- // the runtime will use the cached pointer without adding extra refcounts to protect
- // itself. So if one thread calls GetGCThreadControl & another thread calls
- // ICorHost::SetGCThreadControl, we have a race.
- static IGCThreadControl *GetGCThreadControl()
- {
- LIMITED_METHOD_CONTRACT;
-
- return m_CachedGCThreadControl;
- }
-
- static IGCHostControl *GetGCHostControl()
- {
- LIMITED_METHOD_CONTRACT;
-
- return m_CachedGCHostControl;
- }
-
- static IDebuggerThreadControl *GetDebuggerThreadControl()
- {
- LIMITED_METHOD_CONTRACT;
-
- return m_CachedDebuggerThreadControl;
- }
-
- static DWORD GetDebuggerSpecialThreadCount()
- {
- LIMITED_METHOD_CONTRACT;
-
- return m_DSTCount;
- }
-
- static DWORD *GetDebuggerSpecialThreadArray()
- {
- LIMITED_METHOD_CONTRACT;
-
- return m_DSTArray;
- }
-
- // Helper function that returns true if the thread is in the debugger special thread list
- static BOOL IsDebuggerSpecialThread(DWORD dwThreadId);
-
- // Helper function to update the thread list in the debugger control block
- static HRESULT RefreshDebuggerSpecialThreadList();
-
- // Clean up debugger thread control object, called at shutdown
- static void CleanupDebuggerThreadControl();
-
-private:
- // Cache the IGCThreadControl interface until the EE is started, at which point
- // we pass it through.
- static IGCThreadControl *m_CachedGCThreadControl;
- static IGCHostControl *m_CachedGCHostControl;
- static IDebuggerThreadControl *m_CachedDebuggerThreadControl;
-
- // Array of ID's of threads that should be considered "special" to
- // the debugging services.
- static DWORD *m_DSTArray;
- static DWORD m_DSTArraySize;
- static DWORD m_DSTCount;
-};
-
-class CorValidator : public IValidator
-{
-protected:
- CorValidator() {LIMITED_METHOD_CONTRACT;}
-
-public:
- STDMETHODIMP STDMETHODCALLTYPE Validate(
- IVEHandler *veh,
- IUnknown *pAppDomain,
- unsigned long ulFlags,
- unsigned long ulMaxError,
- unsigned long token,
- __in_z LPWSTR fileName,
- BYTE *pe,
- unsigned long ulSize);
-
- STDMETHODIMP STDMETHODCALLTYPE FormatEventInfo(
- HRESULT hVECode,
- VEContext Context,
- __out_ecount(ulMaxLength) LPWSTR msg,
- unsigned long ulMaxLength,
- SAFEARRAY *psa);
-};
-
-class CLRValidator : public ICLRValidator
-{
-protected:
- CLRValidator() {LIMITED_METHOD_CONTRACT;}
-
-public:
- STDMETHODIMP STDMETHODCALLTYPE Validate(
- IVEHandler *veh,
- unsigned long ulAppDomainId,
- unsigned long ulFlags,
- unsigned long ulMaxError,
- unsigned long token,
- __in_z LPWSTR fileName,
- BYTE *pe,
- unsigned long ulSize);
-
- STDMETHODIMP STDMETHODCALLTYPE FormatEventInfo(
- HRESULT hVECode,
- VEContext Context,
- __out_ecount(ulMaxLength) LPWSTR msg,
- unsigned long ulMaxLength,
- SAFEARRAY *psa);
-};
-
-class CorDebuggerInfo : public IDebuggerInfo
-{
-public:
- STDMETHODIMP IsDebuggerAttached(BOOL *pbAttached);
-};
-#endif // !defined(FEATURE_CORECLR)
class CorExecutionManager
: public ICLRExecutionManager
@@ -271,9 +64,7 @@ protected:
CorRuntimeHostBase()
:m_Started(FALSE),
m_cRef(0)
-#ifdef FEATURE_CORECLR
, m_fStarted(FALSE)
-#endif // FEATURE_CORECLR
{LIMITED_METHOD_CONTRACT;}
STDMETHODIMP_(ULONG) AddRef(void);
@@ -336,11 +127,9 @@ protected:
LONG m_cRef; // Ref count.
-#ifdef FEATURE_CORECLR
// This flag will be used to ensure that a CoreCLR host can invoke Start/Stop in pairs only.
BOOL m_fStarted;
BOOL m_fAppDomainCreated; // this flag is used when an appdomain can only create a single appdomain
-#endif // FEATURE_CORECLR
static ULONG m_Version; // Version of ICorRuntimeHost.
// Some functions are only available in ICLRRuntimeHost.
@@ -358,162 +147,6 @@ public:
};
-#if !defined(FEATURE_CORECLR) // simple hosting
-class CorHost :
- public CorRuntimeHostBase, public ICorRuntimeHost, public CorThreadpool
- , public CorGCHost, public CorConfiguration
- , public CorValidator, public CorDebuggerInfo
- , public CorExecutionManager
-{
-public:
- CorHost() {WRAPPER_NO_CONTRACT;}
-
- // *** IUnknown methods ***
- STDMETHODIMP QueryInterface(REFIID riid, void** ppv);
- STDMETHODIMP_(ULONG) AddRef(void)
- {
- WRAPPER_NO_CONTRACT;
- STATIC_CONTRACT_SO_TOLERANT;
- return CorRuntimeHostBase::AddRef();
- }
- STDMETHODIMP_(ULONG) Release(void);
-
-
- // *** ICorRuntimeHost methods ***
- // Returns an object for configuring the runtime prior to
- // it starting. If the runtime has been initialized this
- // routine returns an error. See ICorConfiguration.
- STDMETHODIMP GetConfiguration(ICorConfiguration** pConfiguration);
-
-
- // Starts the runtime. This is equivalent to CoInitializeCor();
- STDMETHODIMP Start(void);
-
- STDMETHODIMP Stop();
-
- // Creates a domain in the runtime. The identity array is
- // a pointer to an array TYPE containing IIdentity objects defining
- // the security identity.
- STDMETHODIMP CreateDomain(LPCWSTR pwzFriendlyName, // Optional
- IUnknown* pIdentityArray, // Optional
- IUnknown ** pAppDomain)
- {
- WRAPPER_NO_CONTRACT;
- STATIC_CONTRACT_SO_TOLERANT;
- return CorRuntimeHostBase::CreateDomain(pwzFriendlyName,pIdentityArray,pAppDomain);
- }
-
- // Returns the default domain.
- STDMETHODIMP GetDefaultDomain(IUnknown ** pAppDomain)
- {
- WRAPPER_NO_CONTRACT;
- STATIC_CONTRACT_SO_TOLERANT;
- return CorRuntimeHostBase::GetDefaultDomain(pAppDomain);
- }
-
- // Enumerate currently existing domains.
- STDMETHODIMP EnumDomains(HDOMAINENUM *hEnum)
- {
- WRAPPER_NO_CONTRACT;
- STATIC_CONTRACT_SO_TOLERANT;
- return CorRuntimeHostBase::EnumDomains(hEnum);
- }
-
- // Returns S_FALSE when there are no more domains. A domain
- // is passed out only when S_OK is returned.
- STDMETHODIMP NextDomain(HDOMAINENUM hEnum,
- IUnknown** pAppDomain)
- {
- WRAPPER_NO_CONTRACT;
- STATIC_CONTRACT_SO_TOLERANT;
- return CorRuntimeHostBase::NextDomain(hEnum,pAppDomain);
- }
-
- // Close the enumeration releasing resources
- STDMETHODIMP CloseEnum(HDOMAINENUM hEnum)
- {
- WRAPPER_NO_CONTRACT;
- STATIC_CONTRACT_SO_TOLERANT;
- return CorRuntimeHostBase::CloseEnum(hEnum);
- }
-
- STDMETHODIMP CreateDomainEx(LPCWSTR pwzFriendlyName,
- IUnknown* pSetup, // Optional
- IUnknown* pEvidence, // Optional
- IUnknown ** pAppDomain)
- {
- WRAPPER_NO_CONTRACT;
- STATIC_CONTRACT_SO_TOLERANT;
- return CorRuntimeHostBase::CreateDomainEx(pwzFriendlyName,pSetup,pEvidence,pAppDomain);
- }
-
- // Create appdomain setup object that can be passed into CreateDomainEx
- STDMETHODIMP CreateDomainSetup(IUnknown** pAppDomainSetup)
- {
- WRAPPER_NO_CONTRACT;
- STATIC_CONTRACT_SO_TOLERANT;
- return CorRuntimeHostBase::CreateDomainSetup(pAppDomainSetup);
- }
-
- // Create Evidence object that can be passed into CreateDomainEx
- STDMETHODIMP CreateEvidence(IUnknown** pEvidence)
- {
- WRAPPER_NO_CONTRACT;
- STATIC_CONTRACT_SO_TOLERANT;
- return CorRuntimeHostBase::CreateEvidence(pEvidence);
- }
-
- // Unload a domain, releasing the reference will only release the
- // the wrapper to the domain not unload the domain.
- STDMETHODIMP UnloadDomain(IUnknown* pAppDomain)
- {
- WRAPPER_NO_CONTRACT;
- STATIC_CONTRACT_SO_TOLERANT;
- return CorRuntimeHostBase::UnloadDomain(pAppDomain);
- }
-
- // Returns the threads domain if there is one.
- STDMETHODIMP CurrentDomain(IUnknown ** pAppDomain)
- {
- WRAPPER_NO_CONTRACT;
- STATIC_CONTRACT_SO_TOLERANT;
- return CorRuntimeHostBase::CurrentDomain(pAppDomain);
- }
-
- // TODO: Following 4 APIs should be move to CorHost for V1.
- STDMETHODIMP CreateLogicalThreadState(); // Return code.
- STDMETHODIMP DeleteLogicalThreadState(); // Return code.
- STDMETHODIMP SwitchInLogicalThreadState( // Return code.
- DWORD *pFiberCookie // [in] Cookie that indicates the fiber to use.
- );
-
- STDMETHODIMP SwitchOutLogicalThreadState( // Return code.
- DWORD **pFiberCookie // [out] Cookie that indicates the fiber being switched out.
- );
-
- STDMETHODIMP LocksHeldByLogicalThread( // Return code.
- DWORD *pCount // [out] Number of locks that the current thread holds.
- )
- {
- WRAPPER_NO_CONTRACT;
- STATIC_CONTRACT_SO_TOLERANT;
- return CorRuntimeHostBase::LocksHeldByLogicalThread(pCount);
- }
-
- // Class factory hook-up.
- static HRESULT CreateObject(REFIID riid, void **ppUnk);
-
- STDMETHODIMP MapFile( // Return code.
- HANDLE hFile, // [in] Handle for file
- HMODULE *hMapAddress // [out] HINSTANCE for mapped file
- )
- {
- WRAPPER_NO_CONTRACT;
- STATIC_CONTRACT_SO_TOLERANT;
- return CorRuntimeHostBase::MapFile(hFile,hMapAddress);
- }
-};
-#endif // !defined(FEATURE_CORECLR)
class ConnectionNameTable;
typedef DPTR(class ConnectionNameTable) PTR_ConnectionNameTable;
@@ -529,91 +162,8 @@ enum ESymbolReadingSetBy
eSymbolReadingSetBy_COUNT
};
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
-// Hash table entry to keep track <connection, name> for SQL fiber support
-typedef DPTR(struct ConnectionNameHashEntry) PTR_ConnectionNameHashEntry;
-struct ConnectionNameHashEntry
-{
- FREEHASHENTRY entry;
- CONNID m_dwConnectionId;
- PTR_WSTR m_pwzName;
- ICLRTask **m_ppCLRTaskArray;
- UINT m_CLRTaskCount;
-};
-
-
-class CCLRDebugManager : public ICLRDebugManager
-{
-public:
- CCLRDebugManager() {LIMITED_METHOD_CONTRACT;};
-
- STDMETHODIMP QueryInterface(REFIID riid, void** ppv);
- STDMETHODIMP_(ULONG) AddRef(void)
- {
- LIMITED_METHOD_CONTRACT;
- return 1;
- }
- STDMETHODIMP_(ULONG) Release(void);
-
- // ICLRTDebugManager's interface
- STDMETHODIMP BeginConnection(
- CONNID dwConnectionId,
- __in_z wchar_t *szConnectionName);
- STDMETHODIMP SetConnectionTasks(
- DWORD id,
- DWORD dwCount,
- ICLRTask **ppCLRTask);
- STDMETHODIMP EndConnection(
- CONNID dwConnectionId);
-
- // Set ACL on shared section, events, and process
- STDMETHODIMP SetDacl(PACL pacl);
-
- // Returning the current ACL that CLR is using
- STDMETHODIMP GetDacl(PACL *pacl);
-
- STDMETHODIMP IsDebuggerAttached(BOOL *pbAttached);
-
- // symbol reading policy - include file line info when getting a call stack etc.
- STDMETHODIMP SetSymbolReadingPolicy(ESymbolReadingPolicy policy);
-
-#ifdef DACCESS_COMPILE
- // Expose iterators for DAC. Debugger can use this on attach to find existing Connections.
- //
- // Example usage:
- // HASHFIND h;
- // ConnectionNameHashEntry * pConnection = FindFirst(&h);
- // while(pConnection != NULL) {
- // DoSomething(pConnection);
- // pConnection = FindNext(&h);
- // }
- static ConnectionNameHashEntry * FindFirst(HASHFIND * pHashfind);
- static ConnectionNameHashEntry * FindNext(HASHFIND * pHashfind);
-#endif
-
- static void ProcessInit();
- static void ProcessCleanup();
- // Get the current symbol reading policy setting
- static ESymbolReadingPolicy GetSymbolReadingPolicy()
- {
- return m_symbolReadingPolicy;
- }
-
- // Set the symbol reading policy if the setter has higher precendence than the current setting
- static void SetSymbolReadingPolicy( ESymbolReadingPolicy policy, ESymbolReadingSetBy setBy );
-
-private:
- static CrstStatic m_lockConnectionNameTable;
- SPTR_DECL(ConnectionNameTable, m_pConnectionNameHash);
-
- static ESymbolReadingPolicy m_symbolReadingPolicy;
- static ESymbolReadingSetBy m_symbolReadingSetBy;
-};
-
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
-
-#if defined(FEATURE_INCLUDE_ALL_INTERFACES) || defined(FEATURE_WINDOWSPHONE)
+#if defined(FEATURE_WINDOWSPHONE)
class CCLRErrorReportingManager :
#ifdef FEATURE_WINDOWSPHONE
public ICLRErrorReportingManager2
@@ -683,7 +233,7 @@ public:
};
extern CCLRErrorReportingManager g_CLRErrorReportingManager;
-#endif // defined(FEATURE_INCLUDE_ALL_INTERFACES) || defined(FEATURE_WINDOWSPHONE)
+#endif // defined(FEATURE_WINDOWSPHONE)
#ifdef FEATURE_IPCMAN
// @TODO:: a-meicht
@@ -725,17 +275,7 @@ class CorHost2 :
#ifndef FEATURE_PAL
, public IPrivateManagedExceptionReporting /* This interface is for internal Watson testing only*/
#endif // FEATURE_PAL
-#ifdef FEATURE_CORECLR
, public ICLRRuntimeHost2
-#else
- , public CorThreadpool
- , public CorGCHost
- , public CorConfiguration
- , public CLRValidator
- , public CorDebuggerInfo
- , public ICLRRuntimeHost
- , public ICLRPrivRuntime
-#endif // FEATURE_CORECLR
, public CorExecutionManager
{
friend struct _DacGlobals;
@@ -755,12 +295,6 @@ public:
// *** ICorRuntimeHost methods ***
-#ifndef FEATURE_CORECLR
- // Returns an object for configuring the runtime prior to
- // it starting. If the runtime has been initialized this
- // routine returns an error. See ICorConfiguration.
- STDMETHODIMP GetConfiguration(ICorConfiguration** pConfiguration);
-#endif // FEATURE_CORECLR
#ifndef FEATURE_PAL
// defined in IPrivateManagedExceptionReporting interface for internal Watson testing only
@@ -818,7 +352,6 @@ public:
LPCWSTR pwzArgument,
DWORD *pReturnValue);
-#ifdef FEATURE_CORECLR
// *** ICLRRuntimeHost2 methods ***
STDMETHODIMP CreateAppDomainWithManager(
LPCWSTR wszFriendlyName,
@@ -853,202 +386,8 @@ public:
LPCWSTR* argv,
DWORD* pReturnValue);
-#endif // !FEATURE_CORECLR
-
-#if !defined(FEATURE_CORECLR)
- /**********************************************************************************
- ** ICLRPrivRuntime Methods
- **********************************************************************************/
- STDMETHODIMP GetInterface(
- REFCLSID rclsid,
- REFIID riid,
- LPVOID * ppUnk);
-
- STDMETHODIMP CreateAppDomain(
- LPCWSTR pwzFriendlyName,
- ICLRPrivBinder * pBinder,
- LPDWORD pdwAppDomainId);
-
- STDMETHODIMP CreateDelegate(
- DWORD appDomainID,
- LPCWSTR wszAssemblyName,
- LPCWSTR wszClassName,
- LPCWSTR wszMethodName,
- LPVOID * ppvDelegate);
-
- STDMETHODIMP ExecuteMain(
- ICLRPrivBinder * pBinder,
- int * pRetVal);
-
-#endif // !FEATURE_CORECLR
-
- static IHostControl *GetHostControl ()
- {
- LIMITED_METHOD_CONTRACT;
-
-#ifdef FEATURE_CORECLR
- return NULL;
-#else // FEATURE_CORECLR
- return m_HostControl;
-#endif // FEATURE_CORECLR
- }
-
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
- static IHostMemoryManager *GetHostMemoryManager ()
- {
- LIMITED_METHOD_CONTRACT;
-
-#ifdef FEATURE_CORECLR
- return NULL;
-#else // FEATURE_CORECLR
- return m_HostMemoryManager;
-#endif // FEATURE_CORECLR
- }
-
- static IHostMalloc *GetHostMalloc ()
- {
- LIMITED_METHOD_CONTRACT;
-
-#ifdef FEATURE_CORECLR
- return NULL;
-#else // FEATURE_CORECLR
- return m_HostMalloc;
-#endif // FEATURE_CORECLR
- }
-
- static IHostTaskManager *GetHostTaskManager ()
- {
- LIMITED_METHOD_CONTRACT;
-
-#ifdef FEATURE_CORECLR
- return NULL;
-#else // FEATURE_CORECLR
- return m_HostTaskManager;
-#endif // FEATURE_CORECLR
- }
-
- static IHostThreadpoolManager *GetHostThreadpoolManager ()
- {
- LIMITED_METHOD_CONTRACT;
-
-#ifdef FEATURE_CORECLR
- return NULL;
-#else // FEATURE_CORECLR
- return m_HostThreadpoolManager;
-#endif // FEATURE_CORECLR
- }
-
- static IHostIoCompletionManager *GetHostIoCompletionManager ()
- {
- LIMITED_METHOD_CONTRACT;
-
-#ifdef FEATURE_CORECLR
- return NULL;
-#else // FEATURE_CORECLR
- return m_HostIoCompletionManager;
-#endif // FEATURE_CORECLR
- }
-
- static IHostSyncManager *GetHostSyncManager ()
- {
- LIMITED_METHOD_CONTRACT;
-
-#ifdef FEATURE_CORECLR
- return NULL;
-#else // FEATURE_CORECLR
- return m_HostSyncManager;
-#endif // FEATURE_CORECLR
- }
-
- static IHostAssemblyManager *GetHostAssemblyManager()
- {
- LIMITED_METHOD_CONTRACT;
-
-#ifdef FEATURE_CORECLR
- return NULL;
-#else // FEATURE_CORECLR
- return m_HostAssemblyManager;
-#endif // FEATURE_CORECLR
- }
-
- static IHostGCManager *GetHostGCManager()
- {
- LIMITED_METHOD_CONTRACT;
-
-#ifdef FEATURE_CORECLR
- return NULL;
-#else // FEATURE_CORECLR
- return m_HostGCManager;
-#endif // FEATURE_CORECLR
- }
-
- static IHostSecurityManager *GetHostSecurityManager()
- {
- LIMITED_METHOD_CONTRACT;
-
-#ifdef FEATURE_CORECLR
- return NULL;
-#else // FEATURE_CORECLR
- return m_HostSecurityManager;
-#endif // FEATURE_CORECLR
- }
-
- static IHostPolicyManager *GetHostPolicyManager ()
- {
- LIMITED_METHOD_CONTRACT;
-
-#ifdef FEATURE_CORECLR
- return NULL;
-#else // FEATURE_CORECLR
- return m_HostPolicyManager;
-#endif // FEATURE_CORECLR
- }
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
-
- static int GetHostOverlappedExtensionSize()
- {
- LIMITED_METHOD_CONTRACT;
-
-#ifdef FEATURE_CORECLR
- return 0;
-#else // FEATURE_CORECLR
- _ASSERTE (m_HostOverlappedExtensionSize != -1);
- return m_HostOverlappedExtensionSize;
-#endif // FEATURE_CORECLR
- }
-
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
- static ICLRAssemblyReferenceList *GetHostDomainNeutralAsms()
- {
- LIMITED_METHOD_CONTRACT;
-
-#ifdef FEATURE_CORECLR
- return NULL;
-#else // FEATURE_CORECLR
- return m_pHostDomainNeutralAsms;
-#endif // FEATURE_CORECLR
- }
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
-
-#ifndef FEATURE_CORECLR
- static HRESULT SetFlagsAndHostConfig(STARTUP_FLAGS dwStartupFlags, LPCWSTR pwzHostConfigFile, BOOL fFinalize);
- static LPCWSTR GetHostConfigFile();
-
- static void GetDefaultAppDomainProperties(StringArrayList **ppPropertyNames, StringArrayList **ppPropertyValues);
-#endif // !FEATURE_CORECLR
-
static STARTUP_FLAGS GetStartupFlags();
-#ifndef FEATURE_CORECLR
- static HRESULT SetPropertiesForDefaultAppDomain(DWORD nProperties,
- __in_ecount(nProperties) LPCWSTR *pwszPropertyNames,
- __in_ecount(nProperties) LPCWSTR *pwszPropertyValues);
-
- static HRESULT SetAppDomainManagerType(LPCWSTR wszAppDomainManagerAssembly,
- LPCWSTR wszAppDomainManagerType,
- EInitializeNewDomainFlags dwInitializeDomainFlags);
-#endif // FEATURE_CORECLR
-
static LPCWSTR GetAppDomainManagerAsm();
static LPCWSTR GetAppDomainManagerType();
@@ -1069,14 +408,12 @@ public:
static BOOL IsLoadFromBlocked(); // LoadFrom, LoadFile and Load(byte[]) are blocked in certain hosting scenarios
private:
-#ifdef FEATURE_CORECLR
// This flag indicates if this instance was the first to load and start CoreCLR
BOOL m_fFirstToLoadCLR;
// This flag indicates if the host has authenticated with us or not
BOOL m_fIsHostAuthenticated;
-#endif // FEATURE_CORECLR
// Helpers for both ICLRRuntimeHost2 and ICLRPrivRuntime
HRESULT _CreateAppDomain(
@@ -1087,9 +424,6 @@ private:
int nProperties,
LPCWSTR* pPropertyNames,
LPCWSTR* pPropertyValues,
-#if !defined(FEATURE_CORECLR)
- ICLRPrivBinder* pBinder,
-#endif
DWORD* pAppDomainID);
HRESULT _CreateDelegate(
@@ -1110,38 +444,11 @@ private:
static LPCWSTR s_wszAppDomainManagerType;
static EInitializeNewDomainFlags s_dwDomainManagerInitFlags;
-#if !defined(FEATURE_CORECLR)
- static StringArrayList s_defaultDomainPropertyNames;
- static StringArrayList s_defaultDomainPropertyValues;
-
-protected:
- static IHostMemoryManager *m_HostMemoryManager;
- static IHostMalloc *m_HostMalloc;
- static IHostTaskManager *m_HostTaskManager;
- static IHostThreadpoolManager *m_HostThreadpoolManager;
- static IHostIoCompletionManager *m_HostIoCompletionManager;
- static IHostSyncManager *m_HostSyncManager;
- static IHostAssemblyManager *m_HostAssemblyManager;
- static IHostGCManager *m_HostGCManager;
- static IHostSecurityManager *m_HostSecurityManager;
- static IHostPolicyManager *m_HostPolicyManager;
- static int m_HostOverlappedExtensionSize;
- static ICLRAssemblyReferenceList *m_pHostDomainNeutralAsms;
-
- static WCHAR m_wzHostConfigFile[_MAX_PATH];
-
- static BOOL m_dwFlagsFinalized;
- static DangerousNonHostedSpinLock m_FlagsLock; // protects the flags and host config
-#endif // !defined(FEATURE_CORECLR)
SVAL_DECL(STARTUP_FLAGS, m_dwStartupFlags);
};
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
-class CorHostProtectionManager : public ICLRHostProtectionManager
-#else // !FEATURE_INCLUDE_ALL_INTERFACES
class CorHostProtectionManager
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
{
private:
EApiCategories m_eProtectedCategories;
diff --git a/src/inc/corinfo.h b/src/inc/corinfo.h
index f515fcbd6d..cbc4464e1d 100644
--- a/src/inc/corinfo.h
+++ b/src/inc/corinfo.h
@@ -149,7 +149,7 @@ The first 4 options are mutially exclusive
This last field can modify any of the cases above except CORINFO_FLG_HELPER
CORINFO_FLG_STATIC_IN_HEAP This is currently only used for static fields of value classes. If the field has
-this set then after computing what would normally be the field, what you actually get is a object poitner
+this set then after computing what would normally be the field, what you actually get is a object pointer
(that must be reported to the GC) to a boxed version of the value. Thus the actual field address is computed
by addr = (*addr+sizeof(OBJECTREF))
@@ -213,52 +213,20 @@ TODO: Talk about initializing strutures before use
#define SELECTANY extern __declspec(selectany)
#endif
-// COR_JIT_EE_VERSION is a #define that specifies a JIT-EE version, but on a less granular basis than the GUID.
-// The #define is intended to be used on a per-product basis. That is, for each release that we support a JIT
-// CTP build, we'll update the COR_JIT_EE_VERSION. The GUID must change any time any part of the interface changes.
-//
-// COR_JIT_EE_VERSION is set, by convention, to a number related to the the product number. So, 460 is .NET 4.60.
-// 461 would indicate .NET 4.6.1. Etc.
-//
-// Note that the EE should always build with the most current (highest numbered) version. Only the JIT will
-// potentially build with a lower version number. In that case, the COR_JIT_EE_VERSION will be specified in the
-// CTP JIT build project, such as ctpjit.nativeproj.
-
-#if !defined(COR_JIT_EE_VERSION)
-#define COR_JIT_EE_VERSION 999999999 // This means we'll take everything in the interface
-#endif
-
-#if COR_JIT_EE_VERSION > 460
-
// Update this one
-SELECTANY const GUID JITEEVersionIdentifier = { /* 4bd06266-8ef7-4172-bec6-d3149fde7859 */
- 0x4bd06266,
- 0x8ef7,
- 0x4172,
- {0xbe, 0xc6, 0xd3, 0x14, 0x9f, 0xde, 0x78, 0x59}
-};
-
-#else
-
-// ************ Leave this one alone ***************
-// We need it to build a .NET 4.6 compatible JIT for the RyuJIT CTP releases
-SELECTANY const GUID JITEEVersionIdentifier = { /* 9110edd8-8fc3-4e3d-8ac9-12555ff9be9c */
- 0x9110edd8,
- 0x8fc3,
- 0x4e3d,
- { 0x8a, 0xc9, 0x12, 0x55, 0x5f, 0xf9, 0xbe, 0x9c }
+SELECTANY const GUID JITEEVersionIdentifier = { /* f00b3f49-ddd2-49be-ba43-6e49ffa66959 */
+ 0xf00b3f49,
+ 0xddd2,
+ 0x49be,
+ { 0xba, 0x43, 0x6e, 0x49, 0xff, 0xa6, 0x69, 0x59 }
};
-#endif
-
//////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// END JITEEVersionIdentifier
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////
-#if COR_JIT_EE_VERSION > 460
-
// For System V on the CLR type system number of registers to pass in and return a struct is the same.
// The CLR type system allows only up to 2 eightbytes to be passed in registers. There is no SSEUP classification types.
#define CLR_SYSTEMV_MAX_EIGHTBYTES_COUNT_TO_PASS_IN_REGISTERS 2
@@ -381,8 +349,6 @@ private:
}
};
-#endif // COR_JIT_EE_VERSION
-
// CorInfoHelpFunc defines the set of helpers (accessed via the ICorDynamicInfo::getHelperFtn())
// These helpers can be called by native code which executes in the runtime.
// Compilers can emit calls to these helpers.
@@ -433,9 +399,7 @@ enum CorInfoHelpFunc
CORINFO_HELP_NEWSFAST, // allocator for small, non-finalizer, non-array object
CORINFO_HELP_NEWSFAST_ALIGN8, // allocator for small, non-finalizer, non-array object, 8 byte aligned
CORINFO_HELP_NEW_MDARR, // multi-dim array helper (with or without lower bounds - dimensions passed in as vararg)
-#if COR_JIT_EE_VERSION > 460
CORINFO_HELP_NEW_MDARR_NONVARARG,// multi-dim array helper (with or without lower bounds - dimensions passed in as unmanaged array)
-#endif
CORINFO_HELP_NEWARR_1_DIRECT, // helper for any one dimensional array creation
CORINFO_HELP_NEWARR_1_OBJ, // optimized 1-D object arrays
CORINFO_HELP_NEWARR_1_VC, // optimized 1-D value class arrays
@@ -481,9 +445,7 @@ enum CorInfoHelpFunc
CORINFO_HELP_RNGCHKFAIL, // array bounds check failed
CORINFO_HELP_OVERFLOW, // throw an overflow exception
CORINFO_HELP_THROWDIVZERO, // throw a divide by zero exception
-#if COR_JIT_EE_VERSION > 460
CORINFO_HELP_THROWNULLREF, // throw a null reference exception
-#endif // COR_JIT_EE_VERSION
CORINFO_HELP_INTERNALTHROW, // Support for really fast jit
CORINFO_HELP_VERIFICATION, // Throw a VerificationException
@@ -639,13 +601,9 @@ enum CorInfoHelpFunc
CORINFO_HELP_READYTORUN_CHKCAST,
CORINFO_HELP_READYTORUN_STATIC_BASE,
CORINFO_HELP_READYTORUN_VIRTUAL_FUNC_PTR,
-#if COR_JIT_EE_VERSION > 460
CORINFO_HELP_READYTORUN_GENERIC_HANDLE,
CORINFO_HELP_READYTORUN_DELEGATE_CTOR,
CORINFO_HELP_READYTORUN_GENERIC_STATIC_BASE,
-#else
- #define CORINFO_HELP_READYTORUN_DELEGATE_CTOR CORINFO_HELP_EE_PRESTUB
-#endif // COR_JIT_EE_VERSION
CORINFO_HELP_EE_PRESTUB, // Not real JIT helper. Used in native images.
@@ -682,7 +640,6 @@ enum CorInfoHelpFunc
CORINFO_HELP_LOOP_CLONE_CHOICE_ADDR, // Return the reference to a counter to decide to take cloned path in debug stress.
CORINFO_HELP_DEBUG_LOG_LOOP_CLONING, // Print a message that a loop cloning optimization has occurred in debug mode.
-#if COR_JIT_EE_VERSION > 460
CORINFO_HELP_THROW_ARGUMENTEXCEPTION, // throw ArgumentException
CORINFO_HELP_THROW_ARGUMENTOUTOFRANGEEXCEPTION, // throw ArgumentOutOfRangeException
@@ -691,7 +648,8 @@ enum CorInfoHelpFunc
CORINFO_HELP_JIT_REVERSE_PINVOKE_ENTER, // Transition to cooperative mode in reverse P/Invoke prolog, frame is the first argument
CORINFO_HELP_JIT_REVERSE_PINVOKE_EXIT, // Transition to preemptive mode in reverse P/Invoke epilog, frame is the first argument
-#endif
+
+ CORINFO_HELP_GVMLOOKUP_FOR_SLOT, // Resolve a generic virtual method target from this pointer and runtime method handle
CORINFO_HELP_COUNT,
};
@@ -789,6 +747,17 @@ enum CorInfoCallConv
CORINFO_CALLCONV_PARAMTYPE = 0x80, // Passed last. Same as CORINFO_GENERICS_CTXT_FROM_PARAMTYPEARG
};
+#ifdef UNIX_X86_ABI
+inline bool IsCallerPop(CorInfoCallConv callConv)
+{
+ unsigned int umask = CORINFO_CALLCONV_STDCALL
+ | CORINFO_CALLCONV_THISCALL
+ | CORINFO_CALLCONV_FASTCALL;
+
+ return !(callConv & umask);
+}
+#endif // UNIX_X86_ABI
+
enum CorInfoUnmanagedCallConv
{
// These correspond to CorUnmanagedCallingConvention
@@ -1309,8 +1278,6 @@ enum CORINFO_RUNTIME_LOOKUP_KIND
CORINFO_LOOKUP_CLASSPARAM,
};
-#if COR_JIT_EE_VERSION > 460
-
struct CORINFO_LOOKUP_KIND
{
bool needsRuntimeLookup;
@@ -1322,16 +1289,6 @@ struct CORINFO_LOOKUP_KIND
void * runtimeLookupArgs;
} ;
-#else
-
-struct CORINFO_LOOKUP_KIND
-{
- bool needsRuntimeLookup;
- CORINFO_RUNTIME_LOOKUP_KIND runtimeLookupKind;
-} ;
-
-#endif
-
// CORINFO_RUNTIME_LOOKUP indicates the details of the runtime lookup
// operation to be performed.
@@ -1609,10 +1566,11 @@ enum CorInfoTokenKind
// token comes from CEE_CONSTRAINED
CORINFO_TOKENKIND_Constrained = 0x100 | CORINFO_TOKENKIND_Class,
-#if COR_JIT_EE_VERSION > 460
// token comes from CEE_NEWOBJ
CORINFO_TOKENKIND_NewObj = 0x200 | CORINFO_TOKENKIND_Method,
-#endif
+
+ // token comes from CEE_LDVIRTFTN
+ CORINFO_TOKENKIND_Ldvirtftn = 0x400 | CORINFO_TOKENKIND_Method,
};
struct CORINFO_RESOLVED_TOKEN
@@ -1711,12 +1669,11 @@ enum CORINFO_FIELD_ACCESSOR
CORINFO_FIELD_STATIC_GENERICS_STATIC_HELPER, // static field access using the "generic static" helper (argument is MethodTable *)
CORINFO_FIELD_STATIC_ADDR_HELPER, // static field accessed using address-of helper (argument is FieldDesc *)
CORINFO_FIELD_STATIC_TLS, // unmanaged TLS access
-#if COR_JIT_EE_VERSION > 460
CORINFO_FIELD_STATIC_READYTORUN_HELPER, // static field access using a runtime lookup helper
-#endif
CORINFO_FIELD_INTRINSIC_ZERO, // intrinsic zero (IntPtr.Zero, UIntPtr.Zero)
CORINFO_FIELD_INTRINSIC_EMPTY_STRING, // intrinsic emptry string (String.Empty)
+ CORINFO_FIELD_INTRINSIC_ISLITTLEENDIAN, // intrinsic BitConverter.IsLittleEndian
};
// Set of flags returned in CORINFO_FIELD_INFO::fieldFlags
@@ -1828,7 +1785,6 @@ struct CORINFO_EE_INFO
// Array offsets
unsigned offsetOfObjArrayData;
-#if COR_JIT_EE_VERSION > 460
// Reverse PInvoke offsets
unsigned sizeOfReversePInvokeFrame;
@@ -1841,7 +1797,6 @@ struct CORINFO_EE_INFO
// Target ABI. Combined with target architecture and OS to determine
// GC, EH, and unwind styles.
CORINFO_RUNTIME_ABI targetAbi;
-#endif
CORINFO_OS osType;
unsigned osMajor;
@@ -1858,18 +1813,6 @@ enum { LCL_FINALLY_MARK = 0xFC }; // FC = "Finally Call"
* when it generates code
**********************************************************************************/
-#if COR_JIT_EE_VERSION <= 460
-
-#define CORINFO_PAGE_SIZE 0x1000 // the page size on the machine
-
-#ifndef FEATURE_PAL
-#define MAX_UNCHECKED_OFFSET_FOR_NULL_OBJECT ((32*1024)-1) // when generating JIT code
-#else // !FEATURE_PAL
-#define MAX_UNCHECKED_OFFSET_FOR_NULL_OBJECT ((OS_PAGE_SIZE / 2) - 1)
-#endif // !FEATURE_PAL
-
-#endif // COR_JIT_EE_VERISION <= 460
-
#include <pshpack4.h>
typedef void* CORINFO_MethodPtr; // a generic method pointer
@@ -2111,19 +2054,25 @@ public:
unsigned* offsetAfterIndirection /* OUT */
) = 0;
+ // Find the virtual method in implementingClass that overrides virtualMethod,
+ // or the method in implementingClass that implements the interface method
+ // represented by virtualMethod.
+ //
+ // Return null if devirtualization is not possible. Owner type is optional
+ // and provides additional context for shared interface devirtualization.
+ virtual CORINFO_METHOD_HANDLE resolveVirtualMethod(
+ CORINFO_METHOD_HANDLE virtualMethod, /* IN */
+ CORINFO_CLASS_HANDLE implementingClass, /* IN */
+ CORINFO_CONTEXT_HANDLE ownerType = NULL /* IN */
+ ) = 0;
+
// If a method's attributes have (getMethodAttribs) CORINFO_FLG_INTRINSIC set,
// getIntrinsicID() returns the intrinsic ID.
// *pMustExpand tells whether or not JIT must expand the intrinsic.
-#if COR_JIT_EE_VERSION > 460
virtual CorInfoIntrinsics getIntrinsicID(
CORINFO_METHOD_HANDLE method,
bool* pMustExpand = NULL /* OUT */
) = 0;
-#else
- virtual CorInfoIntrinsics getIntrinsicID(
- CORINFO_METHOD_HANDLE method
- ) = 0;
-#endif
// Is the given module the System.Numerics.Vectors module?
// This defaults to false.
@@ -2215,13 +2164,11 @@ public:
// failures during token resolution.
virtual void resolveToken(/* IN, OUT */ CORINFO_RESOLVED_TOKEN * pResolvedToken) = 0;
-#if COR_JIT_EE_VERSION > 460
// Attempt to resolve a metadata token into a runtime method handle. Returns true
// if resolution succeeded and false otherwise (e.g. if it encounters invalid metadata
// during token reoslution). This method should be used instead of `resolveToken` in
// situations that need to be resilient to invalid metadata.
virtual bool tryResolveToken(/* IN, OUT */ CORINFO_RESOLVED_TOKEN * pResolvedToken) = 0;
-#endif
// Signature information about the call sig
virtual void findSig (
@@ -2368,7 +2315,7 @@ public:
// in representing of 'cls' from a GC perspective. The class is
// assumed to be an array of machine words
// (of length // getClassSize(cls) / sizeof(void*)),
- // 'gcPtrs' is a poitner to an array of BYTEs of this length.
+ // 'gcPtrs' is a pointer to an array of BYTEs of this length.
// getClassGClayout fills in this array so that gcPtrs[i] is set
// to one of the CorInfoGCType values which is the GC type of
// the i-th machine word of an object of type 'cls'
@@ -2440,7 +2387,7 @@ public:
// value into a particular location and thus has the signature
// void unboxHelper(void* dest, CORINFO_CLASS_HANDLE cls, Object* obj)
// Otherwise (it is null or points at a FALSE value) it is requesting
- // a helper that returns a poitner to the unboxed data
+ // a helper that returns a pointer to the unboxed data
// void* unboxHelper(CORINFO_CLASS_HANDLE cls, Object* obj)
// The EE has the option of NOT returning the copy style helper
// (But must be able to always honor the non-copy style helper)
@@ -2451,7 +2398,6 @@ public:
CORINFO_CLASS_HANDLE cls
) = 0;
-#if COR_JIT_EE_VERSION > 460
virtual bool getReadyToRunHelper(
CORINFO_RESOLVED_TOKEN * pResolvedToken,
CORINFO_LOOKUP_KIND * pGenericLookupKind,
@@ -2462,16 +2408,8 @@ public:
virtual void getReadyToRunDelegateCtorHelper(
CORINFO_RESOLVED_TOKEN * pTargetMethod,
CORINFO_CLASS_HANDLE delegateType,
- CORINFO_CONST_LOOKUP * pLookup
- ) = 0;
-#else
- virtual void getReadyToRunHelper(
- CORINFO_RESOLVED_TOKEN * pResolvedToken,
- CorInfoHelpFunc id,
- CORINFO_CONST_LOOKUP * pLookup
+ CORINFO_LOOKUP * pLookup
) = 0;
-#endif
-
virtual const char* getHelperName(
CorInfoHelpFunc
@@ -2788,7 +2726,6 @@ public:
virtual void ThrowExceptionForHelper(
const CORINFO_HELPER_DESC * throwHelper) = 0;
-#if COR_JIT_EE_VERSION > 460
// Runs the given function under an error trap. This allows the JIT to make calls
// to interface functions that may throw exceptions without needing to be aware of
// the EH ABI, exception types, etc. Returns true if the given function completed
@@ -2797,7 +2734,6 @@ public:
void (*function)(void*), // The function to run
void* parameter // The context parameter that will be passed to the function and the handler
) = 0;
-#endif
/*****************************************************************************
* ICorStaticInfo contains EE interface methods which return values that are
@@ -2849,16 +2785,12 @@ public:
size_t FQNameCapacity /* IN */
) = 0;
-#if COR_JIT_EE_VERSION > 460
-
// returns whether the struct is enregisterable. Only valid on a System V VM. Returns true on success, false on failure.
virtual bool getSystemVAmd64PassStructInRegisterDescriptor(
/* IN */ CORINFO_CLASS_HANDLE structHnd,
/* OUT */ SYSTEMV_AMD64_CORINFO_STRUCT_REG_PASSING_DESCRIPTOR* structPassInRegDescPtr
) = 0;
-#endif // COR_JIT_EE_VERSION
-
};
/*****************************************************************************
@@ -2984,8 +2916,7 @@ public:
) = 0;
// NOTE: the two methods below--getPInvokeUnmanagedTarget and getAddressOfPInvokeFixup--are
- // deprecated. New code (i.e. anything that can depend on COR_JIT_EE_VERSION being
- // greater than 460) should instead use getAddressOfPInvokeTarget, which subsumes the
+ // deprecated. New code should instead use getAddressOfPInvokeTarget, which subsumes the
// functionality of these methods.
// return the unmanaged target *if method has already been prelinked.*
@@ -3000,14 +2931,12 @@ public:
void **ppIndirection = NULL
) = 0;
-#if COR_JIT_EE_VERSION > 460
// return the address of the PInvoke target. May be a fixup area in the
// case of late-bound PInvoke calls.
virtual void getAddressOfPInvokeTarget(
CORINFO_METHOD_HANDLE method,
CORINFO_CONST_LOOKUP *pLookup
) = 0;
-#endif
// Generate a cookie based on the signature that would needs to be passed
// to CORINFO_HELP_PINVOKE_CALLI
diff --git a/src/inc/corjit.h b/src/inc/corjit.h
index 6d01b9f9d9..e6d067c0fe 100644
--- a/src/inc/corjit.h
+++ b/src/inc/corjit.h
@@ -72,86 +72,6 @@ enum CorJitResult
CORJIT_RECOVERABLEERROR = MAKE_HRESULT(SEVERITY_ERROR,FACILITY_NULL, 5),
};
-
-#if COR_JIT_EE_VERSION <= 460
-
-/* values for flags in compileMethod */
-
-enum CorJitFlag
-{
- CORJIT_FLG_SPEED_OPT = 0x00000001,
- CORJIT_FLG_SIZE_OPT = 0x00000002,
- CORJIT_FLG_DEBUG_CODE = 0x00000004, // generate "debuggable" code (no code-mangling optimizations)
- CORJIT_FLG_DEBUG_EnC = 0x00000008, // We are in Edit-n-Continue mode
- CORJIT_FLG_DEBUG_INFO = 0x00000010, // generate line and local-var info
- CORJIT_FLG_MIN_OPT = 0x00000020, // disable all jit optimizations (not necesarily debuggable code)
- CORJIT_FLG_GCPOLL_CALLS = 0x00000040, // Emit calls to JIT_POLLGC for thread suspension.
- CORJIT_FLG_MCJIT_BACKGROUND = 0x00000080, // Calling from multicore JIT background thread, do not call JitComplete
-
- CORJIT_FLG_UNUSED1 = 0x00000100,
-
-#if defined(_TARGET_X86_)
-
- CORJIT_FLG_PINVOKE_RESTORE_ESP = 0x00000200, // Restore ESP after returning from inlined PInvoke
- CORJIT_FLG_TARGET_P4 = 0x00000400,
- CORJIT_FLG_USE_FCOMI = 0x00000800, // Generated code may use fcomi(p) instruction
- CORJIT_FLG_USE_CMOV = 0x00001000, // Generated code may use cmov instruction
- CORJIT_FLG_USE_SSE2 = 0x00002000, // Generated code may use SSE-2 instructions
-
-#elif defined(_TARGET_AMD64_)
-
- CORJIT_FLG_USE_SSE3_4 = 0x00000200,
- CORJIT_FLG_USE_AVX = 0x00000400,
- CORJIT_FLG_USE_AVX2 = 0x00000800,
- CORJIT_FLG_USE_AVX_512 = 0x00001000,
- CORJIT_FLG_FEATURE_SIMD = 0x00002000,
-
-#else // !defined(_TARGET_X86_) && !defined(_TARGET_AMD64_)
-
- CORJIT_FLG_UNUSED2 = 0x00000200,
- CORJIT_FLG_UNUSED3 = 0x00000400,
- CORJIT_FLG_UNUSED4 = 0x00000800,
- CORJIT_FLG_UNUSED5 = 0x00001000,
- CORJIT_FLG_UNUSED6 = 0x00002000,
-
-#endif // !defined(_TARGET_X86_) && !defined(_TARGET_AMD64_)
-
- CORJIT_FLG_MAKEFINALCODE = 0x00008000, // Use the final code generator, i.e., not the interpreter.
- CORJIT_FLG_READYTORUN = 0x00010000, // Use version-resilient code generation
-
- CORJIT_FLG_PROF_ENTERLEAVE = 0x00020000, // Instrument prologues/epilogues
- CORJIT_FLG_PROF_REJIT_NOPS = 0x00040000, // Insert NOPs to ensure code is re-jitable
- CORJIT_FLG_PROF_NO_PINVOKE_INLINE
- = 0x00080000, // Disables PInvoke inlining
- CORJIT_FLG_SKIP_VERIFICATION = 0x00100000, // (lazy) skip verification - determined without doing a full resolve. See comment below
- CORJIT_FLG_PREJIT = 0x00200000, // jit or prejit is the execution engine.
- CORJIT_FLG_RELOC = 0x00400000, // Generate relocatable code
- CORJIT_FLG_IMPORT_ONLY = 0x00800000, // Only import the function
- CORJIT_FLG_IL_STUB = 0x01000000, // method is an IL stub
- CORJIT_FLG_PROCSPLIT = 0x02000000, // JIT should separate code into hot and cold sections
- CORJIT_FLG_BBINSTR = 0x04000000, // Collect basic block profile information
- CORJIT_FLG_BBOPT = 0x08000000, // Optimize method based on profile information
- CORJIT_FLG_FRAMED = 0x10000000, // All methods have an EBP frame
- CORJIT_FLG_ALIGN_LOOPS = 0x20000000, // add NOPs before loops to align them at 16 byte boundaries
- CORJIT_FLG_PUBLISH_SECRET_PARAM= 0x40000000, // JIT must place stub secret param into local 0. (used by IL stubs)
- CORJIT_FLG_GCPOLL_INLINE = 0x80000000, // JIT must inline calls to GCPoll when possible
-};
-
-enum CorJitFlag2
-{
- CORJIT_FLG2_SAMPLING_JIT_BACKGROUND = 0x00000001, // JIT is being invoked as a result of stack sampling for hot methods in the background
-};
-
-struct CORJIT_FLAGS
-{
- unsigned corJitFlags; // Values are from CorJitFlag
- unsigned corJitFlags2; // Values are from CorJitFlag2
-};
-
-#endif // COR_JIT_EE_VERSION <= 460
-
-#if COR_JIT_EE_VERSION > 460
-
class CORJIT_FLAGS
{
public:
@@ -226,6 +146,8 @@ public:
CORJIT_FLAG_USE_PINVOKE_HELPERS = 36, // The JIT should use the PINVOKE_{BEGIN,END} helpers instead of emitting inline transitions
CORJIT_FLAG_REVERSE_PINVOKE = 37, // The JIT should insert REVERSE_PINVOKE_{ENTER,EXIT} helpers into method prolog/epilog
CORJIT_FLAG_DESKTOP_QUIRKS = 38, // The JIT should generate desktop-quirk-compatible code
+ CORJIT_FLAG_TIER0 = 39, // This is the initial tier for tiered compilation which should generate code as quickly as possible
+ CORJIT_FLAG_TIER1 = 40, // This is the final tier (for now) for tiered compilation which should generate high quality code
};
CORJIT_FLAGS()
@@ -292,7 +214,6 @@ private:
unsigned __int64 corJitFlags;
};
-#endif // COR_JIT_EE_VERSION > 460
/*****************************************************************************
Here is how CORJIT_FLAG_SKIP_VERIFICATION should be interepreted.
@@ -450,14 +371,10 @@ enum CheckedWriteBarrierKinds {
CWBKind_AddrOfLocal, // Store through the address of a local (arguably a bug that this happens at all).
};
-#if COR_JIT_EE_VERSION > 460
-
#include "corjithost.h"
extern "C" void __stdcall jitStartup(ICorJitHost* host);
-#endif
-
class ICorJitCompiler;
class ICorJitInfo;
struct IEEMemoryManager;
@@ -515,11 +432,7 @@ public:
// When the EE loads the System.Numerics.Vectors assembly, it asks the JIT what length (in bytes) of
// SIMD vector it supports as an intrinsic type. Zero means that the JIT does not support SIMD
// intrinsics, so the EE should use the default size (i.e. the size of the IL implementation).
-#if COR_JIT_EE_VERSION > 460
virtual unsigned getMaxIntrinsicSIMDVectorLength(CORJIT_FLAGS cpuCompileFlags) { return 0; }
-#else
- virtual unsigned getMaxIntrinsicSIMDVectorLength(DWORD cpuCompileFlags) { return 0; }
-#endif
// IL obfuscators sometimes interpose on the EE-JIT interface. This function allows the VM to
// tell the JIT to use a particular ICorJitCompiler to implement the methods of this interface,
@@ -702,7 +615,6 @@ public:
//
virtual DWORD getExpectedTargetArchitecture() = 0;
-#if COR_JIT_EE_VERSION > 460
// Fetches extended flags for a particular compilation instance. Returns
// the number of bytes written to the provided buffer.
virtual DWORD getJitFlags(
@@ -710,7 +622,6 @@ public:
DWORD sizeInBytes /* IN: The size of the buffer. Note that this is effectively a
version number for the CORJIT_FLAGS value. */
) = 0;
-#endif
};
/**********************************************************************************/
diff --git a/src/inc/corpolicy.h b/src/inc/corpolicy.h
index ce37db463e..21d615bc82 100644
--- a/src/inc/corpolicy.h
+++ b/src/inc/corpolicy.h
@@ -28,46 +28,6 @@ extern "C" {
{ 0xd41e4f1f, 0xa407, 0x11d1, {0x8b, 0xc9, 0x0, 0xc0, 0x4f, 0xa3, 0xa, 0x41 } }
-#ifndef FEATURE_CORECLR
-// See if we're set up to do a version check
-#if (VER_MAJORVERSION < 4)
-#error "Looks like major version isn't set correctly. Are you including product_version.h?"
-#endif
-
-// The following check has been added to ensure the right thing is done
-// for SxS compatibility of mscorsecimpl.dll when moving to a new framework
-// version.
-//
-// The library is registered using a full path and a GUID in the following location:
-// HKLM\SOFTWARE\Microsoft\Cryptography\Providers\Trust\*
-// With a new SxS version of the framework, we need to move to a new
-// GUID so older versions continue to work unimpacted.
-//
-// The check will fail when the runtime version changes; when it does,
-// please do the following:
-//
-// If the new version is NOT a SxS release with the version number in the #if,
-// update the version number in the #if below to the new version and you're done.
-//
-// If the new release is a SxS release, then there's a bit more work involved:
-// 1. Change COREE_POLICY_PROVIDER in CorPolicy.h to a new GUID.
-// 2. Update batchSetup to use the new GUID. To do so, update
-// all occurrences of the GUID in
-// ndp\clr\src\dlls\mscorsecimpl\mscorsecimpl.vrg
-// 3. Update "real" setup to use the new GUID. To do so, update
-// all occurrences of the GUID in
-// setupauthoring\netfx\clr\Components\mscorsec.dll.ddc
-// 4. Update the version number in the #if below.
-
-#if !(VER_MAJORVERSION == 4 && VER_MINORVERSION == 0)
-#error "The guid for mscorsecimpl needs to change when the runtime version changes"
-#endif
-
-// {A7F4C378-21BE-494e-BA0F-BB12C5D208C5}
-#define COREE_POLICY_PROVIDER \
-{ 0xa7f4c378, 0x21be, 0x494e, {0xba, 0x0f, 0xbb, 0x12, 0xc5, 0xd2, 0x08, 0xc5 } }
-
-#endif //#ifndef FEATURE_CORECLR
// This structure is returned from the winverify trust call, free up the structure
// using CoTaskMemAlloc except for COREE_POLICY_PROVIDER which uses LocalALLoc.
diff --git a/src/inc/corpriv.h b/src/inc/corpriv.h
index 8c737c7607..c422351402 100644
--- a/src/inc/corpriv.h
+++ b/src/inc/corpriv.h
@@ -23,10 +23,6 @@
#include "peinformation.h"
//
-#ifndef FEATURE_CORECLR
-interface IILFingerprint;
-interface IILFingerprintFactory;
-#endif
interface IAssemblyName;
// PE images loaded through the runtime.
@@ -44,9 +40,7 @@ STDAPI MetaDataGetDispenser( // Return HRESULT
STDAPI RuntimeCheckLocationAccess(LPCWSTR wszLocation);
STDAPI RuntimeIsNativeImageOptedOut(IAssemblyName* pAssemblyDef);
-#ifdef FEATURE_VERSIONING
LocaleID RuntimeGetFileSystemLocale();
-#endif // FEATURE_VERSIONING
BOOL RuntimeFileNotFound(HRESULT hr);
@@ -331,11 +325,6 @@ STDAPI RuntimeOpenImageInternal(LPCWSTR pszFileName, HCORMODULE* hHandle,
STDAPI RuntimeOpenImageByStream(IStream* pIStream, UINT64 AssemblyId, DWORD dwModuleId,
HCORMODULE* hHandle, DWORD *pdwLength, MDInternalImportFlags flags);
-#ifndef FEATURE_CORECLR
-// NOTE: Performance critical codepaths should cache the result of this function.
-STDAPI RuntimeGetILFingerprintForPath(LPCWSTR path, IILFingerprint **ppFingerprint);
-STDAPI RuntimeCreateCachingILFingerprintFactory(IILFingerprintFactory **ppILFingerprintFactory);
-#endif //!FEATURE_CORECLR
void RuntimeAddRefHandle(HCORMODULE hHandle);
STDAPI RuntimeReleaseHandle(HCORMODULE hHandle);
STDAPI RuntimeGetImageBase(HCORMODULE hHandle, LPVOID* base, BOOL bMapped, COUNT_T* dwSize);
@@ -480,153 +469,6 @@ struct CORCOMPILE_VERSION_INFO;
struct CORCOMPILE_DEPENDENCY;
typedef GUID CORCOMPILE_NGEN_SIGNATURE;
-#ifdef FEATURE_FUSION
-//**********************************************************************
-// Gets the dependancies of a native image. If these change, then
-// the native image cannot be used.
-//
-// IMetaDataImport::GetAssemblyRefProps() can be used to obtain information about
-// the mdAssemblyRefs.
-//*****************************************************************************
-
-// {814C9E35-3F3F-4975-977A-371F0A878AC7}
-EXTERN_GUID(IID_INativeImageDependency, 0x814c9e35, 0x3f3f, 0x4975, 0x97, 0x7a, 0x37, 0x1f, 0xa, 0x87, 0x8a, 0xc7);
-
-DECLARE_INTERFACE_(INativeImageDependency, IUnknown)
-{
- // Get the referenced assembly
- STDMETHOD (GetILAssemblyRef) (
- mdAssemblyRef * pAssemblyRef // [OUT]
- ) PURE;
-
- // Get the post-policy assembly actually used
- STDMETHOD (GetILAssemblyDef) (
- mdAssemblyRef * ppAssemblyDef, // [OUT]
- CORCOMPILE_ASSEMBLY_SIGNATURE * pSign // [OUT]
- ) PURE;
-
- // Get the native image corresponding to GetILAssemblyDef() IF
- // there is a hard-bound (directly-referenced) native dependancy
- //
- // We do not need the configStrig because configStrings have to
- // be an exact part. Any partial matches are factored out into GetConfigMask()
- STDMETHOD (GetNativeAssemblyDef) (
- CORCOMPILE_NGEN_SIGNATURE * pNativeSign // [OUT] INVALID_NGEN_SIGNATURE if there is no hard-bound dependancy
- ) PURE;
-
- // Get PEKIND of the referenced assembly
- STDMETHOD (GetPEKind) (
- PEKIND * CorPEKind // [OUT]
- ) PURE;
-
-}; // INativeImageDependency
-
-//*****************************************************************************
-//
-// Fusion uses IFusionNativeImageInfo to obtain (and cache) informaton
-// about a native image being installed into the native image cache.
-// This allows Fusion to bind directly to native images
-// without requiring (expensively) binding to the IL assembly first.
-//
-// IMetaDataAssemblyImport can be queried for this interface
-//
-//*****************************************************************************
-// {0EA273D0-B4DA-4008-A60D-8D6EFFDD6E91}
-EXTERN_GUID(IID_INativeImageInstallInfo, 0xea273d0, 0xb4da, 0x4008, 0xa6, 0xd, 0x8d, 0x6e, 0xff, 0xdd, 0x6e, 0x91);
-
-DECLARE_INTERFACE_(INativeImageInstallInfo, IUnknown)
-{
- // Signature of the ngen image
- // This matches the argument type of INativeImageDependency::GetNativeAssemblyDef
-
- STDMETHOD (GetSignature) (
- CORCOMPILE_NGEN_SIGNATURE * pNgenSign // [OUT]
- ) PURE;
-
-
- // CLR timestamp, CPU, compile options, OS type and other attributes of the
- // NI image. This can be used to verify that the NI image was built
- // with the running CLR.
-
- STDMETHOD (GetVersionInfo) (
- CORCOMPILE_VERSION_INFO * pVersionInfo // [OUT]
- ) PURE;
-
-
- // Signature of the source IL assembly. This can be used to
- // verify that the IL image matches a candidate ngen image.
- // This matches the argument type of IAssemblyRuntimeSignature::CheckSignature
- //
-
- STDMETHOD (GetILSignature) (
- CORCOMPILE_ASSEMBLY_SIGNATURE * pILSign // [OUT]
- ) PURE;
-
- // A partial match is allowed for the current NativeImage to be valid
-
- STDMETHOD (GetConfigMask) (
- DWORD * pConfigMask // [OUT]
- ) PURE;
-
- //
- // Dependancy assemblies. The native image is only valid
- // if the dependancies have not changed.
- //
-
- STDMETHOD (EnumDependencies) (
- HCORENUM * phEnum, // [IN/OUT] - Pointer to the enum
- INativeImageDependency *rDeps[], // [OUT]
- ULONG cMax, // [IN] Max dependancies to enumerate in this iteration
- DWORD * pdwCount // [OUT] - Number of dependancies actually enumerated
- ) PURE;
-
-
- // Retrieve a specific dependency by the ngen signature.
-
- STDMETHOD (GetDependency) (
- const CORCOMPILE_NGEN_SIGNATURE *pcngenSign, // [IN] ngenSig of dependency you want
- CORCOMPILE_DEPENDENCY *pDep // [OUT] matching dependency
- ) PURE;
-
-}; // INativeImageInstallInfo
-
-//*****************************************************************************
-//
-// Runtime callback made by Fusion into the CLR to determine if the NativeAssembly
-// can be used. The pUnkBindSink argument of CAssemblyName::BindToObject() can
-// be queried for this interface
-//
-//*****************************************************************************
-// {065AA013-9BDC-447c-922F-FEE929908447}
-EXTERN_GUID(IID_INativeImageEvaluate, 0x65aa013, 0x9bdc, 0x447c, 0x92, 0x2f, 0xfe, 0xe9, 0x29, 0x90, 0x84, 0x47);
-
-#ifdef _PREFAST_
-#pragma warning(push)
-#pragma warning(disable:28718)
-#endif //_PREFAST_
-
-interface IAssembly;
-
-#ifdef _PREFAST_
-#pragma warning(pop)
-#endif //_PREFAST_
-
-
-DECLARE_INTERFACE_(INativeImageEvaluate, IUnknown)
-{
- // This will be called before the assemblies are actually loaded.
- //
- // Returns S_FALSE if the native-image cannot be used.
-
- STDMETHOD (Evaluate) (
- IAssembly *pILAssembly, // [IN] IL assembly in question
- IAssembly *pNativeAssembly, // [IN] NGen image we are trying to use for pILAssembly
- BYTE * pbCachedData, // [IN] Data cached when the native-image was generated
- DWORD dwDataSize // [IN] Size of the pbCachedData buffer
- ) PURE;
-}; // INativeImageEvaluate
-
-#endif // FEATURE_FUSION
//**********************************************************************
// Internal versions of shim functions for use by the CLR.
@@ -676,10 +518,6 @@ STDAPI GetRequestedRuntimeInfoInternal(LPCWSTR pExe,
// and is shared by the desktop and coreclr's which have separate native binders.
// Hence, this interface inherits a lot of "baggage."
-#ifdef FEATURE_FUSION
-interface IFusionBindLog;
-interface IAssemblyName;
-#endif // FEATURE_FUSION
// A small shim around PEAssemblies/IBindResult that allow us to write Fusion/CLR-agnostic code
@@ -694,10 +532,6 @@ class LoggableAssembly
{
public:
virtual SString DisplayString() = 0; // Returns an unspecified representation suitable for injecting into log messages.
-#ifdef FEATURE_FUSION
- virtual IAssemblyName* FusionAssemblyName() = 0; // Can return NULL. Caller must NOT release result.
- virtual IFusionBindLog* FusionBindLog() = 0; // Can return NULL. Caller must NOT release result.
-#endif // FEATURE_FUSION
};
@@ -720,11 +554,6 @@ BOOL RuntimeVerifyNativeImageDependency(const CORCOMPILE_DEPENDENCY *pExpected
-#ifndef FEATURE_CORECLR
-
-#include "iilfingerprint.h"
-
-#endif //!FEATURE_CORECLR
#endif // _CORPRIV_H_
// EOF =======================================================================
diff --git a/src/inc/corprof.idl b/src/inc/corprof.idl
index 9af1cd97a8..3378431317 100644
--- a/src/inc/corprof.idl
+++ b/src/inc/corprof.idl
@@ -3740,15 +3740,20 @@ interface ICorProfilerInfo6 : ICorProfilerInfo5
{
/*
* Returns an enumerator for all methods that
- * - belong to a given NGen module (inlinersModuleId) and
+ * - belong to a given NGen or R2R module (inlinersModuleId) and
* - inlined a body of a given method (inlineeModuleId / inlineeMethodId).
*
* If incompleteData is set to TRUE after function is called, it means that the methods enumerator
* doesn't contain all methods inlining a given method.
* It can happen when one or more direct or indirect dependencies of inliners module haven't been loaded yet.
- * If profiler needs accurate data it should retry later when more modules are loaded (preferable on each module load).
+ * If profiler needs accurate data it should retry later when more modules are loaded (preferably on each module load).
*
* It can be used to lift limitation on inlining for ReJIT.
+ *
+ * NOTE: If the inlinee method is decorated with the System.Runtime.Versioning.NonVersionable attribute then
+ * then some inliners may not ever be reported. If you need to get a full accounting you can avoid the issue
+ * by disabling the use of all native images.
+ *
*/
HRESULT EnumNgenModuleMethodsInliningThisMethod(
[in] ModuleID inlinersModuleId,
diff --git a/src/inc/crosscomp.h b/src/inc/crosscomp.h
index 494ca7c007..200c343a45 100644
--- a/src/inc/crosscomp.h
+++ b/src/inc/crosscomp.h
@@ -195,7 +195,7 @@ typedef union _NEON128 {
struct {
ULONGLONG Low;
LONGLONG High;
- } DUMMYSTRUCTNAME;
+ };
double D[2];
float S[4];
WORD H[8];
@@ -288,7 +288,7 @@ typedef struct _T_RUNTIME_FUNCTION {
DWORD CR : 2;
DWORD FrameSize : 9;
} PackedUnwindData;
- } DUMMYUNIONNAME;
+ };
} T_RUNTIME_FUNCTION, *PT_RUNTIME_FUNCTION;
diff --git a/src/inc/crsttypes.h b/src/inc/crsttypes.h
index 8c702fa553..b4f6f49e64 100644
--- a/src/inc/crsttypes.h
+++ b/src/inc/crsttypes.h
@@ -56,134 +56,135 @@ enum CrstType
CrstDynamicMT = 39,
CrstDynLinkZapItems = 40,
CrstEtwTypeLogHash = 41,
- CrstEventStore = 42,
- CrstException = 43,
- CrstExecuteManLock = 44,
- CrstExecuteManRangeLock = 45,
- CrstFCall = 46,
- CrstFriendAccessCache = 47,
- CrstFuncPtrStubs = 48,
- CrstFusionAppCtx = 49,
- CrstFusionAssemblyDownload = 50,
- CrstFusionBindContext = 51,
- CrstFusionBindResult = 52,
- CrstFusionClb = 53,
- CrstFusionClosure = 54,
- CrstFusionClosureGraph = 55,
- CrstFusionConfigSettings = 56,
- CrstFusionDownload = 57,
- CrstFusionIsoLibInit = 58,
- CrstFusionLoadContext = 59,
- CrstFusionLog = 60,
- CrstFusionNgenIndex = 61,
- CrstFusionNgenIndexPool = 62,
- CrstFusionPcyCache = 63,
- CrstFusionPolicyConfigPool = 64,
- CrstFusionSingleUse = 65,
- CrstFusionWarningLog = 66,
- CrstGCMemoryPressure = 67,
- CrstGlobalStrLiteralMap = 68,
- CrstHandleTable = 69,
- CrstHostAssemblyMap = 70,
- CrstHostAssemblyMapAdd = 71,
- CrstIbcProfile = 72,
- CrstIJWFixupData = 73,
- CrstIJWHash = 74,
- CrstILFingerprintCache = 75,
- CrstILStubGen = 76,
- CrstInlineTrackingMap = 77,
- CrstInstMethodHashTable = 78,
- CrstInterfaceVTableMap = 79,
- CrstInterop = 80,
- CrstInteropData = 81,
- CrstIOThreadpoolWorker = 82,
- CrstIsJMCMethod = 83,
- CrstISymUnmanagedReader = 84,
- CrstJit = 85,
- CrstJitGenericHandleCache = 86,
- CrstJitPerf = 87,
- CrstJumpStubCache = 88,
- CrstLeafLock = 89,
- CrstListLock = 90,
- CrstLoaderAllocator = 91,
- CrstLoaderAllocatorReferences = 92,
- CrstLoaderHeap = 93,
- CrstMda = 94,
- CrstMetadataTracker = 95,
- CrstModIntPairList = 96,
- CrstModule = 97,
- CrstModuleFixup = 98,
- CrstModuleLookupTable = 99,
- CrstMulticoreJitHash = 100,
- CrstMulticoreJitManager = 101,
- CrstMUThunkHash = 102,
- CrstNativeBinderInit = 103,
- CrstNativeImageCache = 104,
- CrstNls = 105,
- CrstObjectList = 106,
- CrstOnEventManager = 107,
- CrstPatchEntryPoint = 108,
- CrstPEFileSecurityManager = 109,
- CrstPEImage = 110,
- CrstPEImagePDBStream = 111,
- CrstPendingTypeLoadEntry = 112,
- CrstPinHandle = 113,
- CrstPinnedByrefValidation = 114,
- CrstProfilerGCRefDataFreeList = 115,
- CrstProfilingAPIStatus = 116,
- CrstPublisherCertificate = 117,
- CrstRCWCache = 118,
- CrstRCWCleanupList = 119,
- CrstRCWRefCache = 120,
- CrstReDacl = 121,
- CrstReflection = 122,
- CrstReJITDomainTable = 123,
- CrstReJITGlobalRequest = 124,
- CrstReJITSharedDomainTable = 125,
- CrstRemoting = 126,
- CrstRetThunkCache = 127,
- CrstRWLock = 128,
- CrstSavedExceptionInfo = 129,
- CrstSaveModuleProfileData = 130,
- CrstSecurityPolicyCache = 131,
- CrstSecurityPolicyInit = 132,
- CrstSecurityStackwalkCache = 133,
- CrstSharedAssemblyCreate = 134,
- CrstSharedBaseDomain = 135,
- CrstSigConvert = 136,
- CrstSingleUseLock = 137,
- CrstSpecialStatics = 138,
- CrstSqmManager = 139,
- CrstStackSampler = 140,
- CrstStressLog = 141,
- CrstStrongName = 142,
- CrstStubCache = 143,
- CrstStubDispatchCache = 144,
- CrstStubUnwindInfoHeapSegments = 145,
- CrstSyncBlockCache = 146,
- CrstSyncHashLock = 147,
- CrstSystemBaseDomain = 148,
- CrstSystemDomain = 149,
- CrstSystemDomainDelayedUnloadList = 150,
- CrstThreadIdDispenser = 151,
- CrstThreadpoolEventCache = 152,
- CrstThreadpoolTimerQueue = 153,
- CrstThreadpoolWaitThreads = 154,
- CrstThreadpoolWorker = 155,
- CrstThreadStaticDataHashTable = 156,
- CrstThreadStore = 157,
- CrstTPMethodTable = 158,
- CrstTypeEquivalenceMap = 159,
- CrstTypeIDMap = 160,
- CrstUMEntryThunkCache = 161,
- CrstUMThunkHash = 162,
- CrstUniqueStack = 163,
- CrstUnresolvedClassLock = 164,
- CrstUnwindInfoTableLock = 165,
- CrstVSDIndirectionCellLock = 166,
- CrstWinRTFactoryCache = 167,
- CrstWrapperTemplate = 168,
- kNumberOfCrstTypes = 169
+ CrstEventPipe = 42,
+ CrstEventStore = 43,
+ CrstException = 44,
+ CrstExecuteManLock = 45,
+ CrstExecuteManRangeLock = 46,
+ CrstFCall = 47,
+ CrstFriendAccessCache = 48,
+ CrstFuncPtrStubs = 49,
+ CrstFusionAppCtx = 50,
+ CrstFusionAssemblyDownload = 51,
+ CrstFusionBindContext = 52,
+ CrstFusionBindResult = 53,
+ CrstFusionClb = 54,
+ CrstFusionClosure = 55,
+ CrstFusionClosureGraph = 56,
+ CrstFusionConfigSettings = 57,
+ CrstFusionDownload = 58,
+ CrstFusionIsoLibInit = 59,
+ CrstFusionLoadContext = 60,
+ CrstFusionLog = 61,
+ CrstFusionNgenIndex = 62,
+ CrstFusionNgenIndexPool = 63,
+ CrstFusionPcyCache = 64,
+ CrstFusionPolicyConfigPool = 65,
+ CrstFusionSingleUse = 66,
+ CrstFusionWarningLog = 67,
+ CrstGCMemoryPressure = 68,
+ CrstGlobalStrLiteralMap = 69,
+ CrstHandleTable = 70,
+ CrstHostAssemblyMap = 71,
+ CrstHostAssemblyMapAdd = 72,
+ CrstIbcProfile = 73,
+ CrstIJWFixupData = 74,
+ CrstIJWHash = 75,
+ CrstILFingerprintCache = 76,
+ CrstILStubGen = 77,
+ CrstInlineTrackingMap = 78,
+ CrstInstMethodHashTable = 79,
+ CrstInterfaceVTableMap = 80,
+ CrstInterop = 81,
+ CrstInteropData = 82,
+ CrstIOThreadpoolWorker = 83,
+ CrstIsJMCMethod = 84,
+ CrstISymUnmanagedReader = 85,
+ CrstJit = 86,
+ CrstJitGenericHandleCache = 87,
+ CrstJitPerf = 88,
+ CrstJumpStubCache = 89,
+ CrstLeafLock = 90,
+ CrstListLock = 91,
+ CrstLoaderAllocator = 92,
+ CrstLoaderAllocatorReferences = 93,
+ CrstLoaderHeap = 94,
+ CrstMda = 95,
+ CrstMetadataTracker = 96,
+ CrstModIntPairList = 97,
+ CrstModule = 98,
+ CrstModuleFixup = 99,
+ CrstModuleLookupTable = 100,
+ CrstMulticoreJitHash = 101,
+ CrstMulticoreJitManager = 102,
+ CrstMUThunkHash = 103,
+ CrstNativeBinderInit = 104,
+ CrstNativeImageCache = 105,
+ CrstNls = 106,
+ CrstObjectList = 107,
+ CrstOnEventManager = 108,
+ CrstPatchEntryPoint = 109,
+ CrstPEFileSecurityManager = 110,
+ CrstPEImage = 111,
+ CrstPEImagePDBStream = 112,
+ CrstPendingTypeLoadEntry = 113,
+ CrstPinHandle = 114,
+ CrstPinnedByrefValidation = 115,
+ CrstProfilerGCRefDataFreeList = 116,
+ CrstProfilingAPIStatus = 117,
+ CrstPublisherCertificate = 118,
+ CrstRCWCache = 119,
+ CrstRCWCleanupList = 120,
+ CrstRCWRefCache = 121,
+ CrstReDacl = 122,
+ CrstReflection = 123,
+ CrstReJITDomainTable = 124,
+ CrstReJITGlobalRequest = 125,
+ CrstReJITSharedDomainTable = 126,
+ CrstRemoting = 127,
+ CrstRetThunkCache = 128,
+ CrstRWLock = 129,
+ CrstSavedExceptionInfo = 130,
+ CrstSaveModuleProfileData = 131,
+ CrstSecurityPolicyCache = 132,
+ CrstSecurityPolicyInit = 133,
+ CrstSecurityStackwalkCache = 134,
+ CrstSharedAssemblyCreate = 135,
+ CrstSharedBaseDomain = 136,
+ CrstSigConvert = 137,
+ CrstSingleUseLock = 138,
+ CrstSpecialStatics = 139,
+ CrstSqmManager = 140,
+ CrstStackSampler = 141,
+ CrstStressLog = 142,
+ CrstStrongName = 143,
+ CrstStubCache = 144,
+ CrstStubDispatchCache = 145,
+ CrstStubUnwindInfoHeapSegments = 146,
+ CrstSyncBlockCache = 147,
+ CrstSyncHashLock = 148,
+ CrstSystemBaseDomain = 149,
+ CrstSystemDomain = 150,
+ CrstSystemDomainDelayedUnloadList = 151,
+ CrstThreadIdDispenser = 152,
+ CrstThreadpoolEventCache = 153,
+ CrstThreadpoolTimerQueue = 154,
+ CrstThreadpoolWaitThreads = 155,
+ CrstThreadpoolWorker = 156,
+ CrstThreadStaticDataHashTable = 157,
+ CrstThreadStore = 158,
+ CrstTPMethodTable = 159,
+ CrstTypeEquivalenceMap = 160,
+ CrstTypeIDMap = 161,
+ CrstUMEntryThunkCache = 162,
+ CrstUMThunkHash = 163,
+ CrstUniqueStack = 164,
+ CrstUnresolvedClassLock = 165,
+ CrstUnwindInfoTableLock = 166,
+ CrstVSDIndirectionCellLock = 167,
+ CrstWinRTFactoryCache = 168,
+ CrstWrapperTemplate = 169,
+ kNumberOfCrstTypes = 170
};
#endif // __CRST_TYPES_INCLUDED
@@ -236,6 +237,7 @@ int g_rgCrstLevelMap[] =
3, // CrstDynamicMT
3, // CrstDynLinkZapItems
7, // CrstEtwTypeLogHash
+ 11, // CrstEventPipe
0, // CrstEventStore
0, // CrstException
7, // CrstExecuteManLock
@@ -410,6 +412,7 @@ LPCSTR g_rgCrstNameMap[] =
"CrstDynamicMT",
"CrstDynLinkZapItems",
"CrstEtwTypeLogHash",
+ "CrstEventPipe",
"CrstEventStore",
"CrstException",
"CrstExecuteManLock",
@@ -557,3 +560,4 @@ inline static LPCSTR GetCrstName(CrstType crstType)
}
#endif // defined(__IN_CRST_CPP) && defined(_DEBUG)
+
diff --git a/src/inc/daccess.h b/src/inc/daccess.h
index 3e3a62c746..7d82e86cb9 100644
--- a/src/inc/daccess.h
+++ b/src/inc/daccess.h
@@ -2393,6 +2393,10 @@ typedef DPTR(IMAGE_TLS_DIRECTORY) PTR_IMAGE_TLS_DIRECTORY;
#include <xclrdata.h>
#endif
+#if defined(_TARGET_X86_) && defined(FEATURE_PAL)
+typedef DPTR(struct _UNWIND_INFO) PTR_UNWIND_INFO;
+#endif
+
#ifdef _WIN64
typedef DPTR(T_RUNTIME_FUNCTION) PTR_RUNTIME_FUNCTION;
typedef DPTR(struct _UNWIND_INFO) PTR_UNWIND_INFO;
@@ -2445,13 +2449,8 @@ typedef DPTR(PTR_PCODE) PTR_PTR_PCODE;
#endif
// Macros like MAIN_CLR_MODULE_NAME* for the DAC module
-#ifdef FEATURE_MAIN_CLR_MODULE_USES_CORE_NAME
#define MAIN_DAC_MODULE_NAME_W W("mscordaccore")
#define MAIN_DAC_MODULE_DLL_NAME_W W("mscordaccore.dll")
-#else
-#define MAIN_DAC_MODULE_NAME_W W("mscordacwks")
-#define MAIN_DAC_MODULE_DLL_NAME_W W("mscordacwks.dll")
-#endif
// TARGET_CONSISTENCY_CHECK represents a condition that should not fail unless the DAC target is corrupt.
// This is in contrast to ASSERTs in DAC infrastructure code which shouldn't fail regardless of the memory
diff --git a/src/inc/dacprivate.h b/src/inc/dacprivate.h
index 0db4affcfc..a419c47fef 100644
--- a/src/inc/dacprivate.h
+++ b/src/inc/dacprivate.h
@@ -776,21 +776,18 @@ struct MSLAYOUT DacpOomData : ZeroInit<DacpOomData>
}
};
-// This is the value of max_idp_count in ndp\clr\src\vm\gcpriv.h
-#define NUM_GC_DATA_POINTS 9
-// These are from ndp\clr\src\vm\gcrecord.h
-#define MAX_COMPACT_REASONS_COUNT 11
-#define MAX_EXPAND_MECHANISMS_COUNT 6
-#define MAX_GC_MECHANISM_BITS_COUNT 2
-// This is from ndp\clr\src\vm\common.h
-#define MAX_GLOBAL_GC_MECHANISMS_COUNT 6
+#define DAC_NUM_GC_DATA_POINTS 9
+#define DAC_MAX_COMPACT_REASONS_COUNT 11
+#define DAC_MAX_EXPAND_MECHANISMS_COUNT 6
+#define DAC_MAX_GC_MECHANISM_BITS_COUNT 2
+#define DAC_MAX_GLOBAL_GC_MECHANISMS_COUNT 6
struct MSLAYOUT DacpGCInterestingInfoData : ZeroInit<DacpGCInterestingInfoData>
{
- size_t interestingDataPoints[NUM_GC_DATA_POINTS];
- size_t compactReasons[MAX_COMPACT_REASONS_COUNT];
- size_t expandMechanisms[MAX_EXPAND_MECHANISMS_COUNT];
- size_t bitMechanisms[MAX_GC_MECHANISM_BITS_COUNT];
- size_t globalMechanisms[MAX_GLOBAL_GC_MECHANISMS_COUNT];
+ size_t interestingDataPoints[DAC_NUM_GC_DATA_POINTS];
+ size_t compactReasons[DAC_MAX_COMPACT_REASONS_COUNT];
+ size_t expandMechanisms[DAC_MAX_EXPAND_MECHANISMS_COUNT];
+ size_t bitMechanisms[DAC_MAX_GC_MECHANISM_BITS_COUNT];
+ size_t globalMechanisms[DAC_MAX_GLOBAL_GC_MECHANISMS_COUNT];
HRESULT RequestGlobal(ISOSDacInterface *sos)
{
diff --git a/src/inc/dacvars.h b/src/inc/dacvars.h
index 0a60684ad1..4b7b7b1783 100644
--- a/src/inc/dacvars.h
+++ b/src/inc/dacvars.h
@@ -92,9 +92,6 @@ DEFINE_DACVAR(ULONG, PTR_ReadyToRunJitManager, ExecutionManager__m_pReadyToRunJi
DEFINE_DACVAR_NO_DUMP(ULONG, VMHELPDEF *, dac__hlpFuncTable, ::hlpFuncTable)
DEFINE_DACVAR(ULONG, VMHELPDEF *, dac__hlpDynamicFuncTable, ::hlpDynamicFuncTable)
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
-DEFINE_DACVAR(ULONG, PTR_ConnectionNameTable, CCLRDebugManager__m_pConnectionNameHash, CCLRDebugManager::m_pConnectionNameHash)
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
DEFINE_DACVAR(ULONG, PTR_StubManager, StubManager__g_pFirstManager, StubManager::g_pFirstManager)
DEFINE_DACVAR(ULONG, PTR_PrecodeStubManager, PrecodeStubManager__g_pManager, PrecodeStubManager::g_pManager)
DEFINE_DACVAR(ULONG, PTR_StubLinkStubManager, StubLinkStubManager__g_pManager, StubLinkStubManager::g_pManager)
@@ -124,22 +121,8 @@ DEFINE_DACVAR(ULONG, int, dac__HillClimbingLogSize, ::HillClimbingLogSize)
DEFINE_DACVAR(ULONG, PTR_Thread, dac__g_pFinalizerThread, ::g_pFinalizerThread)
DEFINE_DACVAR(ULONG, PTR_Thread, dac__g_pSuspensionThread, ::g_pSuspensionThread)
-#ifdef FEATURE_SVR_GC
-DEFINE_DACVAR(ULONG, DWORD, IGCHeap__gcHeapType, IGCHeap::gcHeapType)
-#endif // FEATURE_SVR_GC
-
-DEFINE_DACVAR(ULONG, DWORD, IGCHeap__maxGeneration, IGCHeap::maxGeneration)
-DEFINE_DACVAR(ULONG, PTR_BYTE, WKS__gc_heap__alloc_allocated, WKS::gc_heap::alloc_allocated)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE /*PTR_heap_segment*/, WKS__gc_heap__ephemeral_heap_segment, WKS::gc_heap::ephemeral_heap_segment)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE /*PTR_CFinalize*/, WKS__gc_heap__finalize_queue, WKS::gc_heap::finalize_queue)
-
-// Can not use MULTIPLE_HEAPS here because desktop build contains it is not defined for workstation GC
-// but we include workstation GC in mscorwks.dll.
-#ifdef FEATURE_SVR_GC
-DEFINE_DACVAR_SVR(ULONG, int, SVR__gc_heap__n_heaps, SVR::gc_heap::n_heaps)
-DEFINE_DACVAR_SVR(ULONG, UNKNOWN_POINTER_TYPE /*(PTR_gc_heap*)*/, SVR__gc_heap__g_heaps, SVR::gc_heap::g_heaps)
-#endif // FEATURE_SVR_GC
-DEFINE_DACVAR(ULONG, oom_history, WKS__gc_heap__oom_info, WKS::gc_heap::oom_info)
+DEFINE_DACVAR(ULONG, DWORD, dac__g_heap_type, g_heap_type)
+DEFINE_DACVAR(ULONG, PTR_GcDacVars, dac__g_gcDacGlobals, g_gcDacGlobals)
DEFINE_DACVAR(ULONG, PTR_SystemDomain, SystemDomain__m_pSystemDomain, SystemDomain::m_pSystemDomain)
DEFINE_DACVAR(ULONG, ArrayListStatic, SystemDomain__m_appDomainIndexList, SystemDomain::m_appDomainIndexList)
@@ -151,27 +134,18 @@ DEFINE_DACVAR(ULONG, PTR_SharedDomain, SharedDomain__m_pSharedDomain, SharedDoma
DEFINE_DACVAR(ULONG, DWORD, CExecutionEngine__TlsIndex, CExecutionEngine::TlsIndex)
-DEFINE_DACVAR(ULONG, LONG, GCScan__m_GcStructuresInvalidCnt, GCScan::m_GcStructuresInvalidCnt)
-
-#if defined(FEATURE_INCLUDE_ALL_INTERFACES) || defined(FEATURE_WINDOWSPHONE)
+#if defined(FEATURE_WINDOWSPHONE)
DEFINE_DACVAR(ULONG, int, CCLRErrorReportingManager__g_ECustomDumpFlavor, CCLRErrorReportingManager::g_ECustomDumpFlavor)
#endif
DEFINE_DACVAR(ULONG, PTR_SString, SString__s_Empty, SString::s_Empty)
#ifdef FEATURE_APPX
-#if defined(FEATURE_CORECLR)
DEFINE_DACVAR(ULONG, BOOL, dac__g_fAppX, ::g_fAppX)
-#else
-DEFINE_DACVAR(ULONG, PTR_AppXRTInfo, dac__g_pAppXRTInfo, ::g_pAppXRTInfo)
-#endif
#endif // FEATURE_APPX
DEFINE_DACVAR(ULONG, BOOL, SString__s_IsANSIMultibyte, SString::s_IsANSIMultibyte)
-#ifdef FEATURE_REMOTING
-DEFINE_DACVAR_NO_DUMP(ULONG, MethodTable, CTPMethodTable__s_pThunkTable, CTPMethodTable::s_pThunkTable)
-#endif // FEATURE_REMOTING
DEFINE_DACVAR(ULONG, INT32, ArrayBase__s_arrayBoundsZero, ArrayBase::s_arrayBoundsZero)
@@ -194,21 +168,12 @@ DEFINE_DACVAR(ULONG, MscorlibBinder, dac__g_Mscorlib, ::g_Mscorlib)
DEFINE_DACVAR(ULONG, ProfControlBlock, dac__g_profControlBlock, ::g_profControlBlock)
#endif // defined(PROFILING_SUPPORTED) || defined(PROFILING_SUPPORTED_DATA)
-DEFINE_DACVAR_NO_DUMP(ULONG, SIZE_T, dac__generation_table, WKS::generation_table)
DEFINE_DACVAR(ULONG, PTR_DWORD, dac__g_card_table, ::g_card_table)
DEFINE_DACVAR(ULONG, PTR_BYTE, dac__g_lowest_address, ::g_lowest_address)
DEFINE_DACVAR(ULONG, PTR_BYTE, dac__g_highest_address, ::g_highest_address)
DEFINE_DACVAR(ULONG, IGCHeap, dac__g_pGCHeap, ::g_pGCHeap)
-#ifdef GC_CONFIG_DRIVEN
-DEFINE_DACVAR_NO_DUMP(ULONG, SIZE_T, dac__interesting_data_per_heap, WKS::interesting_data_per_heap)
-DEFINE_DACVAR_NO_DUMP(ULONG, SIZE_T, dac__compact_reasons_per_heap, WKS::compact_reasons_per_heap)
-DEFINE_DACVAR_NO_DUMP(ULONG, SIZE_T, dac__expand_mechanisms_per_heap, WKS::expand_mechanisms_per_heap)
-DEFINE_DACVAR_NO_DUMP(ULONG, SIZE_T, dac__interesting_mechanism_bits_per_heap, WKS::interesting_mechanism_bits_per_heap)
-DEFINE_DACVAR_NO_DUMP(ULONG, SIZE_T, dac__gc_global_mechanisms, ::gc_global_mechanisms)
-#endif //GC_CONFIG_DRIVEN
-
DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pThinLockThreadIdDispenser, ::g_pThinLockThreadIdDispenser)
DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pModuleIndexDispenser, ::g_pModuleIndexDispenser)
DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pObjectClass, ::g_pObjectClass)
@@ -218,9 +183,7 @@ DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pStringClass, ::g_pStringClass
DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pArrayClass, ::g_pArrayClass)
DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pSZArrayHelperClass, ::g_pSZArrayHelperClass)
DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pNullableClass, ::g_pNullableClass)
-#ifdef FEATURE_SPAN_OF_T
DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pByReferenceClass, ::g_pByReferenceClass)
-#endif
DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pExceptionClass, ::g_pExceptionClass)
DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pThreadAbortExceptionClass, ::g_pThreadAbortExceptionClass)
DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pOutOfMemoryExceptionClass, ::g_pOutOfMemoryExceptionClass)
@@ -233,12 +196,6 @@ DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pOverlappedDataClass, ::g_pOve
DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pValueTypeClass, ::g_pValueTypeClass)
DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pEnumClass, ::g_pEnumClass)
DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pThreadClass, ::g_pThreadClass)
-#ifdef FEATURE_CER
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pCriticalFinalizerObjectClass, ::g_pCriticalFinalizerObjectClass)
-#endif
-#ifndef FEATURE_CORECLR
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pAsyncFileStream_AsyncResultClass, ::g_pAsyncFileStream_AsyncResultClass)
-#endif // !FEATURE_CORECLR
DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pPredefinedArrayTypes, ::g_pPredefinedArrayTypes)
DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_TypedReferenceMT, ::g_TypedReferenceMT)
DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pByteArrayMT, ::g_pByteArrayMT)
@@ -252,9 +209,6 @@ DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pBaseRuntimeClass, ::g_pBaseRu
DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pICastableInterface, ::g_pICastableInterface)
#endif // FEATURE_ICASTABLE
-#ifdef FEATURE_CER
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pPrepareConstrainedRegionsMethod, ::g_pPrepareConstrainedRegionsMethod)
-#endif
DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pExecuteBackoutCodeHelperMethod, ::g_pExecuteBackoutCodeHelperMethod)
DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pObjectCtorMD, ::g_pObjectCtorMD)
@@ -304,24 +258,10 @@ DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE, dac__g_pIPCManagerInterface, ::g_pIPC
DEFINE_DACVAR_NO_DUMP(ULONG, SIZE_T, dac__g_FCDynamicallyAssignedImplementations, ::g_FCDynamicallyAssignedImplementations)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE /*BYTE**/, WKS__gc_heap__internal_root_array, WKS::gc_heap::internal_root_array)
-DEFINE_DACVAR(ULONG, size_t, WKS__gc_heap__internal_root_array_index, WKS::gc_heap::internal_root_array_index)
-DEFINE_DACVAR(ULONG, ULONG, WKS__gc_heap__heap_analyze_success, WKS::gc_heap::heap_analyze_success)
-
-DEFINE_DACVAR(ULONG, SIZE_T, WKS__gc_heap__mark_array, WKS::gc_heap::mark_array)
-DEFINE_DACVAR(ULONG, SIZE_T, WKS__gc_heap__current_c_gc_state, WKS::gc_heap::current_c_gc_state)
-DEFINE_DACVAR(ULONG, PTR_BYTE, WKS__gc_heap__next_sweep_obj, WKS::gc_heap::next_sweep_obj)
-DEFINE_DACVAR(ULONG, UNKNOWN_POINTER_TYPE /* PTR_heap_segment */, WKS__gc_heap__saved_sweep_ephemeral_seg, WKS::gc_heap::saved_sweep_ephemeral_seg)
-DEFINE_DACVAR(ULONG, PTR_BYTE, WKS__gc_heap__saved_sweep_ephemeral_start, WKS::gc_heap::saved_sweep_ephemeral_start)
-DEFINE_DACVAR(ULONG, PTR_BYTE, WKS__gc_heap__background_saved_lowest_address, WKS::gc_heap::background_saved_lowest_address)
-DEFINE_DACVAR(ULONG, PTR_BYTE, WKS__gc_heap__background_saved_highest_address, WKS::gc_heap::background_saved_highest_address)
-
-#ifdef FEATURE_CORECLR
#ifndef FEATURE_PAL
DEFINE_DACVAR(ULONG, HANDLE, dac__g_hContinueStartupEvent, ::g_hContinueStartupEvent)
#endif // !FEATURE_PAL
DEFINE_DACVAR(ULONG, DWORD, CorHost2__m_dwStartupFlags, CorHost2::m_dwStartupFlags)
-#endif // FEATURE_CORECLR
DEFINE_DACVAR(ULONG, HRESULT, dac__g_hrFatalError, ::g_hrFatalError)
@@ -329,13 +269,7 @@ DEFINE_DACVAR(ULONG, HRESULT, dac__g_hrFatalError, ::g_hrFatalError)
DEFINE_DACVAR(ULONG, DWORD, PEFile__s_NGENDebugFlags, PEFile::s_NGENDebugFlags)
#endif //defined(DEBUGGING_SUPPORTED) && defined (FEATURE_PREJIT)
-#ifndef FEATURE_CORECLR
-DEFINE_DACVAR(ULONG, DWORD, AssemblyUsageLogManager__s_UsageLogFlags, AssemblyUsageLogManager::s_UsageLogFlags)
-#endif // FEATURE_CORECLR
-#if defined(FEATURE_APPX_BINDER)
-DEFINE_DACVAR(ULONG, PTR_CLRPrivBinderAppX, CLRPrivBinderAppX__s_pSingleton, CLRPrivBinderAppX::s_pSingleton)
-#endif //defined(FEATURE_APPX)
#ifdef FEATURE_MINIMETADATA_IN_TRIAGEDUMPS
DEFINE_DACVAR(ULONG, DWORD, dac__g_MiniMetaDataBuffMaxSize, ::g_MiniMetaDataBuffMaxSize)
diff --git a/src/inc/eetwain.h b/src/inc/eetwain.h
index 54e9a34464..497e0b0e6b 100644
--- a/src/inc/eetwain.h
+++ b/src/inc/eetwain.h
@@ -652,7 +652,10 @@ HRESULT FixContextForEnC(PCONTEXT pCtx,
#ifdef WIN64EXCEPTIONS
static void EnsureCallerContextIsValid( PREGDISPLAY pRD, StackwalkCacheEntry* pCacheEntry, EECodeInfo * pCodeInfo = NULL );
static size_t GetCallerSp( PREGDISPLAY pRD );
-#endif
+#ifdef _TARGET_X86_
+ static size_t GetResumeSp( PCONTEXT pContext );
+#endif // _TARGET_X86_
+#endif // WIN64EXCEPTIONS
#ifdef DACCESS_COMPILE
virtual void EnumMemoryRegions(CLRDataEnumMemoryFlags flags);
diff --git a/src/inc/eventtracebase.h b/src/inc/eventtracebase.h
index f773a7c375..bd5ad1a2d0 100644
--- a/src/inc/eventtracebase.h
+++ b/src/inc/eventtracebase.h
@@ -154,11 +154,6 @@ public:
class Object;
#if !defined(FEATURE_PAL)
-/******************************/
-/* CLR ETW supported versions */
-/******************************/
-#define ETW_SUPPORTED_MAJORVER 5 // ETW is supported on win2k and above
-#define ETW_ENABLED_MAJORVER 6 // OS versions >= to this we enable ETW registration by default, since on XP and Windows 2003, registration is too slow.
/***************************************/
/* Tracing levels supported by CLR ETW */
@@ -201,11 +196,6 @@ struct ProfilingScanContext;
#include <wmistr.h>
#include <evntrace.h>
#include <evntprov.h>
-#if !defined(DONOT_DEFINE_ETW_CALLBACK) && !defined(DACCESS_COMPILE)
-#define GetVersionEx(Version) (GetOSVersion((LPOSVERSIONINFOW)Version))
-#else
-#define GetVersionEx(Version) (WszGetVersionEx((LPOSVERSIONINFOW)Version))
-#endif // !DONOT_DEFINE_ETW_CALLBACK && !DACCESS_COMPILE
#endif //!FEATURE_REDHAWK
#endif //!defined(FEATURE_PAL)
diff --git a/src/inc/formattype.cpp b/src/inc/formattype.cpp
index 76aa506bf1..8a7965cb4f 100644
--- a/src/inc/formattype.cpp
+++ b/src/inc/formattype.cpp
@@ -412,7 +412,7 @@ const PCCOR_SIGNATURE PrettyPrintSignature(
/******************************************************************************/
-// pretty prints 'type' or its 'typedef' to the buffer 'out' returns a poitner to the next type,
+// pretty prints 'type' or its 'typedef' to the buffer 'out' returns a pointer to the next type,
// or 0 on a format failure; outside ILDASM -- simple wrapper for PrettyPrintType
PCCOR_SIGNATURE PrettyPrintTypeOrDef(
diff --git a/src/inc/fusion.idl b/src/inc/fusion.idl
index e64909e845..4056d168ba 100644
--- a/src/inc/fusion.idl
+++ b/src/inc/fusion.idl
@@ -31,27 +31,12 @@ cpp_quote("#ifdef _MSC_VER")
cpp_quote("#pragma once")
cpp_quote("#endif")
-#if !defined(FEATURE_FUSION) && !defined(FEATURE_VERSIONING)
-cpp_quote("#if defined(_CLR_BLD) && !defined(FEATURE_FUSION)")
-cpp_quote("#error FEATURE_FUSION is not enabled, please do not include fusion.h")
-cpp_quote("#endif")
-#endif // !defined(FEATURE_FUSION) && !defined(FEATURE_VERSIONING)
interface IAssemblyCache;
interface IAssemblyCacheItem;
interface IAssemblyName;
interface IAssemblyEnum;
-#ifdef FEATURE_FUSION
-typedef enum
-{
- ASM_CACHE_ZAP = 0x1,
- ASM_CACHE_GAC = 0x2,
- ASM_CACHE_DOWNLOAD = 0x4,
- ASM_CACHE_ROOT = 0x8, //This is only meaningful on GetCachePath.
- ASM_CACHE_ROOT_EX = 0x80 // Only valid when used with GetCachePath.
-} ASM_CACHE_FLAGS;
-#endif
cpp_quote("#ifndef PEKIND_ENUM_DEFINED")
cpp_quote("#define PEKIND_ENUM_DEFINED")
@@ -76,160 +61,6 @@ typedef enum _tagAssemblyContentType
AssemblyContentType_Invalid = 0xffffffff
} AssemblyContentType;
-#ifdef FEATURE_FUSION
-///////////////////////////////////////////////////////////////////////////////
-//
-// IAssemblyCache
-//
-///////////////////////////////////////////////////////////////////////////////
-
-cpp_quote("// {E707DCDE-D1CD-11D2-BAB9-00C04F8ECEAE}")
-cpp_quote("EXTERN_GUID(IID_IAssemblyCache, 0xE707DCDE, 0xD1CD, 0x11D2, 0xBA, 0xB9, 0x00, 0xC0, 0x4F, 0x8E, 0xCE, 0xAE);")
-
-[
- local,
- object,
- uuid(e707dcde-d1cd-11d2-bab9-00c04f8eceae),
- pointer_default(unique)
-]
-interface IAssemblyCache : IUnknown
-{
- cpp_quote("// {8cedc215-ac4b-488b-93c0-a50a49cb2fb8}")
- cpp_quote("EXTERN_GUID(FUSION_REFCOUNT_UNINSTALL_SUBKEY_GUID, 0x8cedc215, 0xac4b, 0x488b, 0x93, 0xc0, 0xa5, 0x0a, 0x49, 0xcb, 0x2f, 0xb8);")
- cpp_quote("")
- cpp_quote("// {b02f9d65-fb77-4f7a-afa5-b391309f11c9}")
- cpp_quote("EXTERN_GUID(FUSION_REFCOUNT_FILEPATH_GUID, 0xb02f9d65, 0xfb77, 0x4f7a, 0xaf, 0xa5, 0xb3, 0x91, 0x30, 0x9f, 0x11, 0xc9);")
- cpp_quote("")
- cpp_quote("// {2ec93463-b0c3-45e1-8364-327e96aea856}")
- cpp_quote("EXTERN_GUID(FUSION_REFCOUNT_OPAQUE_STRING_GUID, 0x2ec93463, 0xb0c3, 0x45e1, 0x83, 0x64, 0x32, 0x7e, 0x96, 0xae, 0xa8, 0x56);")
-
- cpp_quote(" // {25df0fc1-7f97-4070-add7-4b13bbfd7cb8} // this GUID cannot be used for installing into GAC.")
- cpp_quote("EXTERN_GUID(FUSION_REFCOUNT_MSI_GUID, 0x25df0fc1, 0x7f97, 0x4070, 0xad, 0xd7, 0x4b, 0x13, 0xbb, 0xfd, 0x7c, 0xb8); ")
-
- cpp_quote(" // {d16d444c-56d8-11d5-882d-0080c847b195}")
- cpp_quote("EXTERN_GUID(FUSION_REFCOUNT_OSINSTALL_GUID, 0xd16d444c, 0x56d8, 0x11d5, 0x88, 0x2d, 0x00, 0x80, 0xc8, 0x47, 0xb1, 0x95); ")
-
- typedef struct _FUSION_INSTALL_REFERENCE_
- {
- DWORD cbSize;
- DWORD dwFlags;
- GUID guidScheme; // contains one of the pre-defined guids.
- LPCWSTR szIdentifier; // unique identifier for app installing this assembly.
- LPCWSTR szNonCannonicalData; // data is description; relevent to the guid above
- } FUSION_INSTALL_REFERENCE, *LPFUSION_INSTALL_REFERENCE;
-
- typedef const FUSION_INSTALL_REFERENCE *LPCFUSION_INSTALL_REFERENCE;
-
-
- typedef struct _ASSEMBLY_INFO
- {
- ULONG cbAssemblyInfo; // size of this structure for future expansion
- DWORD dwAssemblyFlags;
- ULARGE_INTEGER uliAssemblySizeInKB;
- LPWSTR pszCurrentAssemblyPathBuf;
- ULONG cchBuf; // size of path buf.
- } ASSEMBLY_INFO;
-
- cpp_quote("#define IASSEMBLYCACHE_INSTALL_FLAG_REFRESH (0x00000001)")
- cpp_quote("#define IASSEMBLYCACHE_INSTALL_FLAG_FORCE_REFRESH (0x00000002)")
-
- cpp_quote("#define IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED (1)")
- cpp_quote("#define IASSEMBLYCACHE_UNINSTALL_DISPOSITION_STILL_IN_USE (2)")
- cpp_quote("#define IASSEMBLYCACHE_UNINSTALL_DISPOSITION_ALREADY_UNINSTALLED (3)")
- cpp_quote("#define IASSEMBLYCACHE_UNINSTALL_DISPOSITION_DELETE_PENDING (4)")
- cpp_quote("#define IASSEMBLYCACHE_UNINSTALL_DISPOSITION_HAS_INSTALL_REFERENCES (5)")
- cpp_quote("#define IASSEMBLYCACHE_UNINSTALL_DISPOSITION_REFERENCE_NOT_FOUND (6)")
-
- cpp_quote("#define QUERYASMINFO_FLAG_VALIDATE (0x00000001)")
- cpp_quote("#define QUERYASMINFO_FLAG_GETSIZE (0x00000002)")
-
- // these flags are for dwAssemblyFlags field in struct _ASSEMBLY_INFO
- cpp_quote("#define ASSEMBLYINFO_FLAG_INSTALLED (0x00000001)")
- cpp_quote("#define ASSEMBLYINFO_FLAG_PAYLOADRESIDENT (0x00000002)")
-
- HRESULT UninstallAssembly(
- [in] DWORD dwFlags,
- [in] LPCWSTR pszAssemblyName,
- [in] LPCFUSION_INSTALL_REFERENCE pRefData,
- [out, optional] ULONG *pulDisposition
- );
-
- HRESULT QueryAssemblyInfo(
- [in] DWORD dwFlags,
- [in] LPCWSTR pszAssemblyName,
- [in, out] ASSEMBLY_INFO *pAsmInfo
- );
-
- HRESULT CreateAssemblyCacheItem(
- [in] DWORD dwFlags,
- [in] PVOID pvReserved,
- [out] IAssemblyCacheItem **ppAsmItem,
- [in, optional] LPCWSTR pszAssemblyName // uncanonicalized, comma separted name=value pairs.
- );
-
- HRESULT CreateAssemblyScavenger
- (
- [out] IUnknown **ppUnkReserved
- );
-
- HRESULT InstallAssembly( // if you use this, fusion will do the streaming & commit.
- [in] DWORD dwFlags,
- [in] LPCWSTR pszManifestFilePath,
- [in] LPCFUSION_INSTALL_REFERENCE pRefData
- );
-
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// IAssemblyCacheItem
-//
-///////////////////////////////////////////////////////////////////////////////
-
-cpp_quote("// {9e3aaeb4-d1cd-11d2-bab9-00c04f8eceae}")
-cpp_quote("EXTERN_GUID(IID_IAssemblyCacheItem, 0x9e3aaeb4,0xd1cd,0x11d2,0xba,0xb9,0x00,0xc0,0x4f,0x8e,0xce,0xae);")
-
-[
- local,
- object,
- uuid(9e3aaeb4-d1cd-11d2-bab9-00c04f8eceae),
- pointer_default(unique)
-]
-interface IAssemblyCacheItem : IUnknown
-{
- cpp_quote("#define STREAM_FORMAT_COMPLIB_MODULE 0")
- cpp_quote("#define STREAM_FORMAT_COMPLIB_MANIFEST 1")
- cpp_quote("#define STREAM_FORMAT_WIN32_MODULE 2")
- cpp_quote("#define STREAM_FORMAT_WIN32_MANIFEST 4")
-
- cpp_quote("#define IASSEMBLYCACHEITEM_COMMIT_FLAG_REFRESH (0x00000001)")
- cpp_quote("#define IASSEMBLYCACHEITEM_COMMIT_FLAG_FORCE_REFRESH (0x00000002)")
-
- cpp_quote("#define IASSEMBLYCACHEITEM_COMMIT_DISPOSITION_INSTALLED (1)") // first time install
- cpp_quote("#define IASSEMBLYCACHEITEM_COMMIT_DISPOSITION_REFRESHED (2)") // overwrite, if existing
- cpp_quote("#define IASSEMBLYCACHEITEM_COMMIT_DISPOSITION_ALREADY_INSTALLED (3)") // existing,
-
-
- HRESULT CreateStream(
- [in] DWORD dwFlags, // For general API flags
- [in] LPCWSTR pszStreamName, // Name of the stream to be passed in
- [in] DWORD dwFormat, // format of the file to be streamed in.
- [in] DWORD dwFormatFlags, // format-specific flags
- [out] IStream **ppIStream,
- [in, optional] ULARGE_INTEGER *puliMaxSize // Max size of the Stream.
- );
-
- HRESULT Commit
- (
- [in] DWORD dwFlags, // For general API flags like IASSEMBLYCACHEITEM _COMMIT_FLAG_REFRESH
- [out, optional] ULONG *pulDisposition
- );
-
- HRESULT AbortItem(); // If you have created IAssemblyCacheItem and don't plan to use it, its good idea to call AbortItem before releasing it.
-
-}
-#endif // FEATURE_FUSION
///////////////////////////////////////////////////////////////////////////////
//
@@ -406,125 +237,6 @@ interface IAssemblyName: IUnknown
}
-#ifdef FEATURE_FUSION
-///////////////////////////////////////////////////////////////////////////////
-//
-// IAssemblyEnum
-//
-///////////////////////////////////////////////////////////////////////////////
-cpp_quote("// {21B8916C-F28E-11D2-A473-00C04F8EF448}")
-cpp_quote("EXTERN_GUID(IID_IAssemblyEnum, 0x21B8916C,0xF28E,0x11D2,0xA4,0x73,0x00,0xC0,0x4F,0x8E,0xF4,0x48);")
-
-[
- local,
- object,
- uuid(21b8916c-f28e-11d2-a473-00c04f8ef448),
- pointer_default(unique)
-]
-interface IAssemblyEnum : IUnknown
-{
-
- HRESULT GetNextAssembly
- (
- [in] LPVOID pvReserved,
- [out] IAssemblyName **ppName,
- [in] DWORD dwFlags
- );
-
- HRESULT Reset(void);
-
- HRESULT Clone
- (
- [out] IAssemblyEnum **ppEnum
- );
-
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// IInstallReferenceItem
-//
-///////////////////////////////////////////////////////////////////////////////
-
-cpp_quote("// {582dac66-e678-449f-aba6-6faaec8a9394}")
-cpp_quote("EXTERN_GUID(IID_IInstallReferenceItem, 0x582dac66,0xe678,0x449f,0xab,0xa6,0x6f,0xaa,0xec,0x8a,0x93,0x94);")
-
-[
- local,
- object,
- uuid(582dac66-e678-449f-aba6-6faaec8a9394),
- pointer_default(unique)
-]
-interface IInstallReferenceItem : IUnknown
-{
- HRESULT GetReference
- (
- [out] LPFUSION_INSTALL_REFERENCE *ppRefData,
- [in] DWORD dwFlags,
- [in] LPVOID pvReserved
- );
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// IInstallReferenceEnum
-//
-///////////////////////////////////////////////////////////////////////////////
-
-cpp_quote("// {56b1a988-7c0c-4aa2-8639-c3eb5a90226f}")
-cpp_quote("EXTERN_GUID(IID_IInstallReferenceEnum, 0x56b1a988,0x7c0c,0x4aa2,0x86,0x39,0xc3,0xeb,0x5a,0x90,0x22,0x6f);")
-
-[
- local,
- object,
- uuid(56b1a988-7c0c-4aa2-8639-c3eb5a90226f),
- pointer_default(unique)
-]
-interface IInstallReferenceEnum : IUnknown
-{
- HRESULT GetNextInstallReferenceItem
- (
- [out] IInstallReferenceItem **ppRefItem,
- [in] DWORD dwFlags,
- [in] LPVOID pvReserved
- );
-}
-
-typedef enum _tagAssemblyComparisonResult
-{
- ACR_Unknown, // Unknown
- ACR_EquivalentFullMatch, // all fields match
- ACR_EquivalentWeakNamed, // match based on weak-name, version numbers ignored
- ACR_EquivalentFXUnified, // match based on FX-unification of version numbers
- ACR_EquivalentUnified, // match based on legacy-unification of version numbers
- ACR_NonEquivalentVersion, // all fields match except version field
- ACR_NonEquivalent, // no match
-
- ACR_EquivalentPartialMatch,
- ACR_EquivalentPartialWeakNamed,
- ACR_EquivalentPartialUnified,
- ACR_EquivalentPartialFXUnified,
- ACR_NonEquivalentPartialVersion
-} AssemblyComparisonResult;
-
-
-#pragma midl_echo("STDAPI CreateAssemblyConfigCookie(LPCWSTR wzConfigFilePath, struct AssemblyConfig **ppAssemblyConfigOut);")
-#pragma midl_echo("STDAPI DestroyAssemblyConfigCookie(struct AssemblyConfig *pAssemblyConfig);")
-
-#pragma midl_echo("STDAPI CompareAssemblyIdentity(LPCWSTR pwzAssemblyIdentity1, BOOL fUnified1, LPCWSTR pwzAssemblyIdentity2, BOOL fUnified2, BOOL *pfEquivalent, AssemblyComparisonResult *pResult); ")
-#pragma midl_echo("STDAPI CompareAssemblyIdentityWithConfig(LPCWSTR pwzAssemblyIdentity1, BOOL fUnified1, LPCWSTR pwzAssemblyIdentity2, BOOL fUnified2, struct AssemblyConfig *pAssemblyConfig, BOOL *pfEquivalent, AssemblyComparisonResult *pResult); ")
-#pragma midl_echo("STDAPI CreateInstallReferenceEnum(IInstallReferenceEnum **ppRefEnum, IAssemblyName *pName, DWORD dwFlags, LPVOID pvReserved); ")
-#pragma midl_echo("STDAPI CreateAssemblyEnum(IAssemblyEnum **pEnum, IUnknown *pUnkReserved, IAssemblyName *pName, DWORD dwFlags, LPVOID pvReserved); ")
-#endif // FEATURE_FUSION
#pragma midl_echo("STDAPI CreateAssemblyNameObject(LPASSEMBLYNAME *ppAssemblyNameObj, LPCWSTR szAssemblyName, DWORD dwFlags, LPVOID pvReserved); ")
-#ifdef FEATURE_FUSION
-#pragma midl_echo("STDAPI CreateAssemblyCache(IAssemblyCache **ppAsmCache, DWORD dwReserved); ")
-#pragma midl_echo("STDAPI GetCachePath(ASM_CACHE_FLAGS dwCacheFlags, _Out_writes_to_(*pcchPath,*pcchPath) LPWSTR pwzCachePath, PDWORD pcchPath); ")
-#pragma midl_echo("STDAPI GetAssemblyIdentityFromFile(LPCWSTR pwzFilePAth, REFIID riid, IUnknown **ppIdentity); ")
-#pragma midl_echo("STDAPI ClearDownloadCache();")
-#pragma midl_echo("typedef unsigned long MSIHANDLE;")
-#pragma midl_echo("STDAPI SetMSIHandleForLogging(MSIHANDLE hMSIHandle);")
-#endif // FEATURE_FUSION
diff --git a/src/inc/fusionbind.h b/src/inc/fusionbind.h
deleted file mode 100644
index 8628d3f9ce..0000000000
--- a/src/inc/fusionbind.h
+++ /dev/null
@@ -1,316 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-
-
-/*============================================================
-**
-** Header: FusionBind.hpp
-**
-** Purpose: Implements FusionBind (loader domain) architecture
-**
-**
-===========================================================*/
-#ifndef _FUSIONBIND_H
-#define _FUSIONBIND_H
-
-#ifndef FEATURE_FUSION
-#error FEATURE_FUSION is not enabled, please do not include fusionbind.h
-#endif
-
-#include <fusion.h>
-#include <fusionpriv.h>
-#include "metadata.h"
-#include "fusionsink.h"
-#include "utilcode.h"
-#include "loaderheap.h"
-#include "fusionsetup.h"
-#include "sstring.h"
-#include "ex.h"
-#ifdef PAL_STDCPP_COMPAT
-#include <type_traits>
-#else
-#include "clr_std/type_traits"
-#endif
-
-#include "binderngen.h"
-#include "clrprivbinding.h"
-
-class FusionBind
-{
-public:
-
- //****************************************************************************************
- //
-
- static HRESULT GetVersion(__out_ecount(*pdwVersion) LPWSTR pVersion, __inout DWORD* pdwVersion);
-
-
- //****************************************************************************************
- //
- // Creates a fusion context for the application domain. All ApplicationContext properties
- // must be set in the AppDomain store prior to this call. Any changes or additions to the
- // AppDomain store are ignored.
- static HRESULT CreateFusionContext(LPCWSTR pzName, IApplicationContext** ppFusionContext);
-
-
- //****************************************************************************************
- //
- // Loads an environmental value into the fusion context
- static HRESULT AddEnvironmentProperty(__in LPCWSTR variable,
- __in LPCWSTR pProperty,
- IApplicationContext* pFusionContext);
-
- //****************************************************************************************
- //
- static HRESULT SetupFusionContext(LPCWSTR szAppBase,
- LPCWSTR szPrivateBin,
- IApplicationContext** ppFusionContext);
-
- // Starts remote load of an assembly. The thread is parked on
- // an event waiting for fusion to report success or failure.
- static HRESULT RemoteLoad(IApplicationContext * pFusionContext,
- FusionSink* pSink,
- IAssemblyName *pName,
- IAssembly *pParentAssembly,
- LPCWSTR pCodeBase,
- IAssembly** ppIAssembly,
- IHostAssembly** ppIHostAssembly,
- IBindResult** ppNativeFusionAssembly,
- BOOL fForIntrospectionOnly,
- BOOL fSuppressSecurityChecks);
-
- static HRESULT RemoteLoadModule(IApplicationContext * pFusionContext,
- IAssemblyModuleImport* pModule,
- FusionSink *pSink,
- IAssemblyModuleImport** pResult);
-
- static BOOL VerifyBindingStringW(LPCWSTR pwStr) {
- WRAPPER_NO_CONTRACT;
- if (wcschr(pwStr, '\\') ||
- wcschr(pwStr, '/') ||
- wcschr(pwStr, ':'))
- return FALSE;
-
- return TRUE;
- }
-
- static HRESULT VerifyBindingString(LPCSTR pName) {
- CONTRACTL
- {
- NOTHROW;
- GC_NOTRIGGER;
- INJECT_FAULT(return E_OUTOFMEMORY;);
- }
- CONTRACTL_END;
-
- DWORD dwStrLen = WszMultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, pName, -1, NULL, NULL);
- CQuickBytes qb;
- LPWSTR pwStr = (LPWSTR) qb.AllocNoThrow(dwStrLen*sizeof(WCHAR));
- if (!pwStr)
- return E_OUTOFMEMORY;
-
- if(!WszMultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, pName, -1, pwStr, dwStrLen))
- return HRESULT_FROM_GetLastError();
-
- if (VerifyBindingStringW(pwStr))
- return S_OK;
- else
- return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
- }
-
- static void GetAssemblyManifestModulePath(IAssembly *pFusionAssembly, SString &result)
- {
- CONTRACTL
- {
- THROWS;
- INJECT_FAULT(ThrowOutOfMemory());
- }
- CONTRACTL_END;
-
- DWORD dwSize = 0;
- LPWSTR buffer = NULL;
- COUNT_T allocation = result.GetUnicodeAllocation();
- if (allocation > 0) {
- // pass in the buffer if we got one
- dwSize = allocation + 1;
- buffer = result.OpenUnicodeBuffer(allocation);
- }
- HRESULT hr = pFusionAssembly->GetManifestModulePath(buffer, &dwSize);
- if (hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER))
- {
- if (buffer != NULL)
- result.CloseBuffer(0);
- buffer = result.OpenUnicodeBuffer(dwSize-1);
- hr = pFusionAssembly->GetManifestModulePath(buffer, &dwSize);
- }
- if (buffer != NULL)
- result.CloseBuffer((SUCCEEDED(hr) && dwSize >= 1) ? (dwSize-1) : 0);
- IfFailThrow(hr);
- }
-
- static SString& GetAssemblyNameDisplayName(
- IAssemblyName *pName,
- SString &result,
- DWORD flags = 0 /* default */)
- {
- CONTRACTL
- {
- GC_NOTRIGGER;
- THROWS;
- INJECT_FAULT(ThrowOutOfMemory());
- }
- CONTRACTL_END;
-
- DWORD dwSize = 0;
- LPWSTR buffer = NULL;
- COUNT_T allocation = result.GetUnicodeAllocation();
- if (allocation > 0)
- {
- // pass in the buffer if we got one
- dwSize = allocation + 1;
- buffer = result.OpenUnicodeBuffer(allocation);
- }
-
- HRESULT hr = pName->GetDisplayName(buffer, &dwSize, flags);
- if (hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER))
- {
- if (buffer != NULL)
- result.CloseBuffer(0);
- buffer = result.OpenUnicodeBuffer(dwSize-1);
- hr = pName->GetDisplayName(buffer, &dwSize, flags);
- }
-
- if (buffer != NULL)
- {
- result.CloseBuffer((SUCCEEDED(hr) && dwSize >= 1) ? (dwSize-1) : 0);
- }
-
- IfFailThrow(hr);
- return result;
- }
-
- static BOOL GetAssemblyNameStringProperty(IAssemblyName *pName, DWORD property, SString &result)
- {
- CONTRACTL
- {
- THROWS;
- INJECT_FAULT(ThrowOutOfMemory());
- }
- CONTRACTL_END;
-
- DWORD dwSize = 0;
- LPWSTR buffer = NULL;
- COUNT_T allocation = result.GetUnicodeAllocation();
- if (allocation > 0) {
- // pass in the buffer if we got one
- dwSize = (allocation + 1) * sizeof(WCHAR);
- buffer = result.OpenUnicodeBuffer(allocation);
- }
- HRESULT hr = pName->GetProperty(property, (LPVOID)buffer, &dwSize);
- if (hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER))
- {
- if (buffer != NULL)
- result.CloseBuffer(0);
- buffer = result.OpenUnicodeBuffer(dwSize/sizeof(WCHAR) - 1);
- hr = pName->GetProperty(property, (LPVOID)buffer, &dwSize);
- }
- if (buffer != NULL)
- result.CloseBuffer((SUCCEEDED(hr) && dwSize >= sizeof(WCHAR)) ? (dwSize/sizeof(WCHAR)-1) : 0);
- if (hr == HRESULT_FROM_WIN32(ERROR_NOT_FOUND))
- {
- return FALSE;
- }
- IfFailThrow(hr);
-
- return TRUE;
- }
-
- static BOOL GetApplicationContextStringProperty(IApplicationContext *pContext,
- LPCWSTR property, SString &result)
- {
- CONTRACTL
- {
- THROWS;
- INJECT_FAULT(ThrowOutOfMemory());
- }
- CONTRACTL_END;
-
- DWORD dwSize = 0;
- LPWSTR buffer = NULL;
- COUNT_T allocation = result.GetUnicodeAllocation();
- if (allocation > 0) {
- // pass in the buffer if we got one
- dwSize = (allocation + 1) * sizeof(WCHAR);
- buffer = result.OpenUnicodeBuffer(allocation);
- }
- HRESULT hr = pContext->Get(property, (LPVOID)buffer, &dwSize, 0);
- if (hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER))
- {
- if (buffer != NULL)
- result.CloseBuffer(0);
- buffer = result.OpenUnicodeBuffer(dwSize/sizeof(WCHAR) - 1);
- hr = pContext->Get(property, (LPVOID)buffer, &dwSize, 0);
- }
- if (buffer != NULL)
- result.CloseBuffer((SUCCEEDED(hr) && dwSize >= sizeof(WCHAR)) ? (dwSize/sizeof(WCHAR)-1) : 0);
- if (hr == HRESULT_FROM_WIN32(ERROR_NOT_FOUND))
- {
- return FALSE;
- }
- IfFailThrow(hr);
-
- return TRUE;
- }
-
- static BOOL GetApplicationContextDWORDProperty(IApplicationContext *pContext,
- LPCWSTR property, DWORD *result)
- {
- CONTRACTL
- {
- THROWS;
- INJECT_FAULT(return E_OUTOFMEMORY;);
- }
- CONTRACTL_END;
-
- DWORD dwSize = sizeof(DWORD);
- HRESULT hr = pContext->Get(property, result, &dwSize, 0);
- if (hr == HRESULT_FROM_WIN32(ERROR_NOT_FOUND))
- return FALSE;
-
- IfFailThrow(hr);
-
- return TRUE;
- }
-
- static void SetApplicationContextStringProperty(IApplicationContext *pContext, LPCWSTR property,
- SString &value)
- {
- CONTRACTL
- {
- THROWS;
- INJECT_FAULT(ThrowOutOfMemory());
- }
- CONTRACTL_END;
-
- IfFailThrow(pContext->Set(property, (void *) value.GetUnicode(),
- (value.GetCount()+1)*sizeof(WCHAR), 0));
- }
-
- static void SetApplicationContextDWORDProperty(IApplicationContext *pContext, LPCWSTR property,
- DWORD value)
- {
- CONTRACTL
- {
- THROWS;
- INJECT_FAULT(ThrowOutOfMemory());
- }
- CONTRACTL_END;
-
- IfFailThrow(pContext->Set(property, &value, sizeof(value), 0));
- }
-};
-
-#endif
-
diff --git a/src/inc/fusionpriv.idl b/src/inc/fusionpriv.idl
deleted file mode 100644
index f9aaefcd9c..0000000000
--- a/src/inc/fusionpriv.idl
+++ /dev/null
@@ -1,970 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-//+---------------------------------------------------------------------------
-//
-// Microsoft Windows
-// File: fusionpriv.idl
-//
-// Contents: Fusion Interfaces
-//
-// Classes:
-//
-// Functions:
-//
-//
-//----------------------------------------------------------------------------
-cpp_quote("//=--------------------------------------------------------------------------=")
-cpp_quote("// fusionpriv.h")
-cpp_quote("//=--------------------------------------------------------------------------=")
-cpp_quote("// Licensed to the .NET Foundation under one or more agreements.")
-cpp_quote("// The .NET Foundation licenses this file to you under the MIT license.")
-cpp_quote("// See the LICENSE file in the project root for more information.")
-cpp_quote("//=--------------------------------------------------------------------------=")
-cpp_quote("")
-cpp_quote("#ifdef _MSC_VER")
-cpp_quote("#pragma comment(lib,\"uuid.lib\")")
-cpp_quote("#endif")
-cpp_quote("")
-cpp_quote("//---------------------------------------------------------------------------=")
-cpp_quote("// Fusion Interfaces.")
-cpp_quote("")
-
-cpp_quote("#if defined(_CLR_BLD) && !defined(FEATURE_FUSION)")
-cpp_quote("#error FEATURE_FUSION is not enabled, please do not include fusionpriv.h")
-cpp_quote("#endif")
-
-
-import "objidl.idl";
-import "oleidl.idl";
-import "fusion.idl";
-
-#ifndef FEATURE_CORECLR
-import "binderngen.idl";
-#endif
-
-cpp_quote("#ifdef _MSC_VER")
-cpp_quote("#pragma once")
-cpp_quote("#endif")
-
-interface IAssembly;
-interface IAssemblyBindSink;
-interface IAssemblyBinding;
-interface IAssemblyManifestImport;
-interface IAssemblyModuleImport;
-interface IAssemblyBindingClosure;
-
-interface IAssemblyNameBinder;
-interface IHistoryAssembly;
-interface IHistoryReader;
-interface IFusionBindLog;
-
-interface IAssemblyScavenger;
-
-interface IHostAssembly;
-interface IHostAssemblyModuleImport;
-
-interface IMetaDataAssemblyImport;
-#pragma midl_echo("struct IMetaDataAssemblyImport;")
-
-struct AssemblyReferenceClosureWalkContextForProfAPI;
-
-cpp_quote("EXTERN_C const IID IID_IApplicationContext; ")
-cpp_quote("EXTERN_C const IID IID_IAssembly; ")
-cpp_quote("EXTERN_C const IID IID_IAssemblyBindSink; ")
-cpp_quote("EXTERN_C const IID IID_IAssemblyBinding; ")
-cpp_quote("EXTERN_C const IID IID_IAssemblyManifestImport;")
-cpp_quote("EXTERN_C const IID IID_IAssemblyModuleImport; ")
-
-cpp_quote("EXTERN_C const IID IID_IHistoryAssembly; ")
-cpp_quote("EXTERN_C const IID IID_IHistoryReader; ")
-cpp_quote("EXTERN_C const IID IID_IMetaDataAssemblyImportControl; ")
-
-cpp_quote("EXTERN_C const IID IID_IAssemblyScavenger; ")
-
-cpp_quote("EXTERN_C const IID IID_IHostAssembly; ")
-cpp_quote("EXTERN_C const IID IID_IHostAssemblyModuleImport; ")
-//
-// Bind flags for IAssemblyName::BindToObject
-//
-// External caller of IAssemblyName::BindToObject should only use ASM_BINDF_PARENT_ASM_HINT/ASM_BINDF_NONE/ASM_BINDF_INSPECTION_ONLY.
-// The rest is used internally by fusion. They can(and should) be set via IApplicationContext::Set.
-//
-typedef enum
-{
- ASM_BINDF_NONE = 0x0,
- ASM_BINDF_FORCE_CACHE_INSTALL = 0x1,
- ASM_BINDF_RFS_INTEGRITY_CHECK = 0x2,
- ASM_BINDF_RFS_MODULE_CHECK = 0x4,
- ASM_BINDF_BINPATH_PROBE_ONLY = 0x8,
- //ASM_BINDF_SHARED_BINPATH_HINT = 0x10,
- ASM_BINDF_PARENT_ASM_HINT = 0x20,
- ASM_BINDF_DISALLOW_APPLYPUBLISHERPOLICY = 0x40,
- ASM_BINDF_DISALLOW_APPBINDINGREDIRECTS = 0x80,
- ASM_BINDF_DISABLE_FX_UNIFICATION = 0x100,
- ASM_BINDF_DO_NOT_PROBE_NATIVE_IMAGE = 0x200,
- ASM_BINDF_DISABLE_DOWNLOAD = 0x400,
- ASM_BINDF_INSPECTION_ONLY = 0x800,
- ASM_BINDF_DISALLOW_APP_BASE_PROBING = 0x1000,
- ASM_BINDF_SUPPRESS_SECURITY_CHECKS = 0x2000
-} ASM_BIND_FLAGS;
-
-typedef enum tagDEVOVERRIDEMODE {
- DEVOVERRIDE_LOCAL = 0x1,
- DEVOVERRIDE_GLOBAL = 0x2
-} DEVOVERRIDEMODE;
-
-typedef enum tagWALK_LEVEL
-{
- LEVEL_STARTING, // only basic info
- LEVEL_WINRTCHECK, // WinRT specific checks
- LEVEL_GACCHECK, // until find something outside of the GAC
- LEVEL_COMPLETE, // no reason to request higher than this
- LEVEL_FXPREDICTED, // full walk, but FX assemblies were predicted
- LEVEL_FXPROBED // full walk, but FX assemblies could not be predicted
-} WALK_LEVEL;
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// IHistoryAssembly
-//
-///////////////////////////////////////////////////////////////////////////////
-[
- local,
- object,
- uuid(e6096a07-e188-4a49-8d50-2a0172a0d205),
- pointer_default(unique)
-]
-interface IHistoryAssembly : IUnknown
-{
- HRESULT GetAssemblyName
- (
- [out, annotation("__out")] LPWSTR wzAsmName,
- [in, out, annotation("__inout")] DWORD *pdwSize
- );
-
- HRESULT GetPublicKeyToken
- (
- [out, annotation("__out")] LPWSTR wzPublicKeyToken,
- [in, out, annotation("__inout")] DWORD *pdwSize
- );
-
- HRESULT GetCulture
- (
- [out, annotation("__out")] LPWSTR wzCulture,
- [in, out, annotation("__inout")] DWORD *pdwSize
- );
-
- HRESULT GetReferenceVersion
- (
- [out, annotation("__out")] LPWSTR wzVerRef,
- [in, out, annotation("__inout")] DWORD *pdwSize
- );
-
- HRESULT GetActivationDate
- (
- [out, annotation("__out")] LPWSTR wzActivationDate,
- [in, out, annotation("__inout")] DWORD *pdwSize
- );
-
- HRESULT GetAppCfgVersion
- (
- [out, annotation("__out")] LPWSTR pwzVerAppCfg,
- [in, out, annotation("__inout")] DWORD *pdwSize
- );
-
- HRESULT GetPublisherCfgVersion
- (
- [out, annotation("__out")] LPWSTR pwzVerPublisherCfg,
- [in, out, annotation("__inout")] DWORD *pdwSize
- );
-
- HRESULT GetAdminCfgVersion
- (
- [out, annotation("__out")] LPWSTR pwzAdminCfg,
- [in, out, annotation("__inout")] DWORD *pdwSize
- );
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// IHistoryReader
-//
-///////////////////////////////////////////////////////////////////////////////
-[
- local,
- object,
- uuid(1d23df4d-a1e2-4b8b-93d6-6ea3dc285a54),
- pointer_default(unique)
-]
-interface IHistoryReader : IUnknown
-{
- HRESULT GetFilePath
- (
- [out, annotation("__out")] LPWSTR wzFilePath,
- [in, out, annotation("__inout")] DWORD *pdwSize
- );
-
- HRESULT GetApplicationName
- (
- [out, annotation("__out")] LPWSTR wzAppName,
- [in, out, annotation("__inout")] DWORD *pdwSize
- );
-
- HRESULT GetEXEModulePath
- (
- [out, annotation("__out")] LPWSTR wzExePath,
- [in, out, annotation("__inout")] DWORD *pdwSize
- );
-
-
- HRESULT GetNumActivations
- (
- [out] DWORD *pdwNumActivations
- );
-
- HRESULT GetActivationDate
- (
- [in] DWORD dwIdx,
- [out] FILETIME *pftDate
- );
-
- HRESULT GetRunTimeVersion
- (
- [in] FILETIME *pftActivationDate,
- [out, annotation("__out")] LPWSTR wzRunTimeVersion,
- [in, out, annotation("__inout")] DWORD *pdwSize
- );
-
- HRESULT GetNumAssemblies
- (
- [in] FILETIME *pftActivationDate,
- [out] DWORD *pdwNumAsms
- );
-
- HRESULT GetHistoryAssembly
- (
- [in] FILETIME *pftActivationDate,
- [in] DWORD dwIdx,
- [out] IHistoryAssembly **ppHistAsm
- );
-}
-
-typedef enum {
- LOADCTX_TYPE_DEFAULT,
- LOADCTX_TYPE_LOADFROM,
- LOADCTX_TYPE_UNKNOWN,
- LOADCTX_TYPE_HOSTED, // Assembly bind was provided by hosted binder.
-} LOADCTX_TYPE;
-
-// Log for normal assembly binding
-cpp_quote("#define FUSION_BIND_LOG_CATEGORY_DEFAULT 0")
-// Log for native image binding
-cpp_quote("#define FUSION_BIND_LOG_CATEGORY_NGEN 1")
-// max entry for bind log kinds. Should always point to the biggest one
-cpp_quote("#define FUSION_BIND_LOG_CATEGORY_MAX 2")
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// IFusionBindLog
-//
-///////////////////////////////////////////////////////////////////////////////
-
-[
- local,
- object,
- uuid(67E9F87D-8B8A-4a90-9D3E-85ED5B2DCC83),
- pointer_default(unique)
-]
-interface IFusionBindLog : IUnknown
-{
- HRESULT SetResultCode
- (
- [in] DWORD dwLogCategory,
- [in] HRESULT hr
- );
-
- HRESULT GetResultCode
- (
- [in] DWORD dwLogCategory,
- [out] HRESULT *pHr
- );
-
- HRESULT GetBindLog
- (
- [in] DWORD dwDetailLevel,
- [in] DWORD dwLogCategory,
- [out, annotation("__out_opt")] LPWSTR pwzDebugLog,
- [in, out, annotation("__inout")] DWORD *pcbDebugLog
- );
-
- HRESULT LogMessage
- (
- [in] DWORD dwDetailLevel,
- [in] DWORD dwLogCategory,
- [in] LPCWSTR pwzDebugLog
- );
-
- HRESULT Flush
- (
- [in] DWORD dwDetailLevel,
- [in] DWORD dwLogCategory
- );
-
- HRESULT GetBindingID
- (
- [out] ULONGLONG *pullBindingID
- );
-
- HRESULT ETWTraceLogMessage
- (
- [in] DWORD dwETWLogCategory,
- [in] IAssemblyName *pAsm
- );
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// IAssemblyManifestImport
-//
-///////////////////////////////////////////////////////////////////////////////
-[
- local,
- object,
- uuid( de9a68ba-0fa2-11d3-94aa-00c04fc308ff),
- pointer_default(unique)
-]
-interface IAssemblyManifestImport: IUnknown
-{
- typedef [unique] IAssemblyManifestImport *LPASSEMBLY_MANIFEST_IMPORT;
-
- HRESULT GetAssemblyNameDef(
- [out] IAssemblyName **ppAssemblyName);
-
- HRESULT GetNextAssemblyNameRef(
- [in] DWORD nIndex,
- [out] IAssemblyName ** ppAssemblyName);
-
- HRESULT GetNextAssemblyModule(
- [in] DWORD nIndex,
- [out] IAssemblyModuleImport **ppImport);
-
- HRESULT GetModuleByName(
- [in] LPCOLESTR szModuleName,
- [out] IAssemblyModuleImport **ppModImport);
-
- HRESULT GetManifestModulePath(
- [out, size_is(*pccModulePath), annotation("__out_ecount_full(*pccModulePath)")] LPOLESTR szModulePath,
- [in, out] LPDWORD pccModulePath);
-
- HRESULT GetInternalMDImport(
- [out] IMetaDataAssemblyImport **ppMDImport);
-
- HRESULT LoadDataFromMDImport(
- [in] IMetaDataAssemblyImport *ppMDImport);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// IApplicationContext
-//
-///////////////////////////////////////////////////////////////////////////////
-[
- local,
- object,
- uuid(7c23ff90-33af-11d3-95da-00a024a85b51),
- pointer_default(unique)
-]
-interface IApplicationContext: IUnknown
-{
- cpp_quote("// App context configuration variables")
- cpp_quote("#define ACTAG_APP_BASE_URL L\"APPBASE\"")
- cpp_quote("#define ACTAG_MACHINE_CONFIG L\"MACHINE_CONFIG\"")
- cpp_quote("#define ACTAG_APP_PRIVATE_BINPATH L\"PRIVATE_BINPATH\"")
- cpp_quote("#define ACTAG_APP_SHARED_BINPATH L\"SHARED_BINPATH\"")
- cpp_quote("#define ACTAG_APP_SNAPSHOT_ID L\"SNAPSHOT_ID\"")
- cpp_quote("#define ACTAG_APP_CONFIG_FILE L\"APP_CONFIG_FILE\"")
- cpp_quote("#define ACTAG_APP_ID L\"APPLICATION_ID\"")
- cpp_quote("#define ACTAG_APP_SHADOW_COPY_DIRS L\"SHADOW_COPY_DIRS\"")
- cpp_quote("#define ACTAG_APP_DYNAMIC_BASE L\"DYNAMIC_BASE\"")
- cpp_quote("#define ACTAG_APP_CACHE_BASE L\"CACHE_BASE\"")
- cpp_quote("#define ACTAG_APP_NAME L\"APP_NAME\"")
- cpp_quote("#define ACTAG_DEV_PATH L\"DEV_PATH\"")
- cpp_quote("#define ACTAG_HOST_CONFIG_FILE L\"HOST_CONFIG\"")
- cpp_quote("#define ACTAG_SXS_ACTIVATION_CONTEXT L\"SXS\"")
- cpp_quote("#define ACTAG_APP_CFG_LOCAL_FILEPATH L\"APP_CFG_LOCAL_FILEPATH\"")
- cpp_quote("#define ACTAG_ZAP_STRING L\"ZAP_STRING\"")
- cpp_quote("#define ACTAG_ZAP_CONFIG_FLAGS L\"ZAP_CONFIG_FLAGS\"")
- cpp_quote("#define ACTAG_APP_DOMAIN_ID L\"APPDOMAIN_ID\"")
- cpp_quote("#define ACTAG_APP_CONFIG_BLOB L\"APP_CONFIG_BLOB\"")
- cpp_quote("#define ACTAG_FX_ONLY L\"FX_ONLY\"")
-
- cpp_quote("// App context flag overrides")
- cpp_quote("#define ACTAG_FORCE_CACHE_INSTALL L\"FORCE_CACHE_INSTALL\"")
- cpp_quote("#define ACTAG_RFS_INTEGRITY_CHECK L\"RFS_INTEGRITY_CHECK\"")
- cpp_quote("#define ACTAG_RFS_MODULE_CHECK L\"RFS_MODULE_CHECK\"")
- cpp_quote("#define ACTAG_BINPATH_PROBE_ONLY L\"BINPATH_PROBE_ONLY\"")
- cpp_quote("#define ACTAG_DISALLOW_APPLYPUBLISHERPOLICY L\"DISALLOW_APP\"")
- cpp_quote("#define ACTAG_DISALLOW_APP_BINDING_REDIRECTS L\"DISALLOW_APP_REDIRECTS\"")
- cpp_quote("#define ACTAG_DISALLOW_APP_BASE_PROBING L\"DISALLOW_APP_BASE_PROBING\"")
- cpp_quote("#define ACTAG_CODE_DOWNLOAD_DISABLED L\"CODE_DOWNLOAD_DISABLED\"")
- cpp_quote("#define ACTAG_DISABLE_FX_ASM_UNIFICATION L\"DISABLE_FX_ASM_UNIFICATION\"")
-
- typedef [unique] IApplicationContext *LPAPPLICATIONCONTEXT;
-
- typedef enum
- {
- APP_CTX_FLAGS_INTERFACE = 0x1
- } APP_FLAGS;
-
- HRESULT SetContextNameObject(
- [in] LPASSEMBLYNAME pName);
-
- HRESULT GetContextNameObject(
- [out] LPASSEMBLYNAME * ppName);
-
-
- HRESULT Set(
- [in] LPCOLESTR szName,
- [in] LPVOID pvValue,
- [in] DWORD cbValue,
- [in] DWORD dwFlags);
-
- HRESULT Get(
- [in] LPCOLESTR szName,
- [out] LPVOID pvValue,
- [in, out] LPDWORD pcbValue,
- [in] DWORD dwFlags);
-
- HRESULT GetDynamicDirectory(
- [out, annotation("__out_ecount_opt(*pdwSize)")] LPWSTR wzDynamicDir,
- [in, out] LPDWORD pdwSize);
-
- HRESULT GetAppCacheDirectory(
- [out, annotation("__out_ecount_opt(*pdwSize)")] LPWSTR wzAppCacheDir,
- [in, out] LPDWORD pdwSize);
-
- HRESULT RegisterKnownAssembly(
- [in] IAssemblyName *pName,
- [in] LPCWSTR pwzAsmURL,
- [out] IAssembly **ppAsmOut);
-
- HRESULT PrefetchAppConfigFile();
-
- // This will give a IAssemblyBindingClosure object without really walking
- // the closure. Any of the APIs on IAssemblyBindingClosure may trigger a
- // real walking.
- //
- // This closure is not cached in fusion. Caller is responsible to cache the closure.
- //
- // pUnk is the result of a previous bind within the same application context.
- // It could be IHostAssembly or IAssembly. The assembly has to be strongly named.
- //
- // dwSharingFlags cannot be 0 now.
- HRESULT GetAssemblyBindingClosure(
- [in] IUnknown *pUnk,
- [in] LPCWSTR pwzNativeImagePath,
- [out] IAssemblyBindingClosure **ppAsmClosure
- );
-}
-
-[
- local,
- object,
- uuid(56972d9d-0f6c-47de-a038-e82d5de3a777),
- pointer_default(unique)
-]
-interface IAssemblyNameBinder : IUnknown
-{
- HRESULT BindToObject(
- [in] REFIID refIID,
- [in] IUnknown *pUnkSink,
- [in] IUnknown *pUnkContext,
- [in] LPCOLESTR szCodeBase,
- [in] LONGLONG llFlags,
- [in] LPVOID pParentAssembly,
- [in] DWORD cbReserved,
- [out] LPVOID *ppv,
- [out] LPVOID *ppvNI);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// IAssembly
-//
-///////////////////////////////////////////////////////////////////////////////
-[
- local,
- object,
- uuid(ff08d7d4-04c2-11d3-94aa-00c04fc308ff),
- pointer_default(unique)
-]
-interface IAssembly : IUnknown
-{
- typedef [unique] IAssembly *LPASSEMBLY;
-
- cpp_quote("#define ASMLOC_LOCATION_MASK 0x0000001B")
- cpp_quote("#define ASMLOC_UNKNOWN 0x00000000")
- cpp_quote("#define ASMLOC_GAC 0x00000001")
- cpp_quote("#define ASMLOC_DOWNLOAD_CACHE 0x00000002")
- cpp_quote("#define ASMLOC_RUN_FROM_SOURCE 0x00000003")
- cpp_quote("#define ASMLOC_CODEBASE_HINT 0x00000004")
- cpp_quote("#define ASMLOC_ZAP 0x00000008")
- cpp_quote("#define ASMLOC_DEV_OVERRIDE 0x00000010")
-
- HRESULT GetAssemblyNameDef(
- [out] IAssemblyName **ppAssemblyName);
-
- HRESULT GetNextAssemblyNameRef(
- [in] DWORD nIndex,
- [out] IAssemblyName **ppAssemblyName);
-
- HRESULT GetNextAssemblyModule(
- [in] DWORD nIndex,
- [out] IAssemblyModuleImport **ppModImport);
-
- HRESULT GetModuleByName(
- [in] LPCOLESTR szModuleName,
- [out] IAssemblyModuleImport **ppModImport);
-
- HRESULT GetManifestModulePath(
- [out, size_is(*pccModulePath), annotation("__out_ecount_full_opt(*pccModulePath)")] LPOLESTR szModulePath,
- [in, out] LPDWORD pccModulePath);
-
- HRESULT GetAssemblyPath(
- [out, size_is(*lpcwBuffer), annotation("__out_ecount_full_opt(*lpcwBuffer)")] LPOLESTR pStr,
- [in, out] LPDWORD lpcwBuffer);
-
- HRESULT GetAssemblyLocation(
- [out] DWORD *pdwAsmLocation);
-
- LOADCTX_TYPE GetFusionLoadContext();
-
- HRESULT GetNextHardBoundDependency(
- [in] DWORD dwIndex,
- [out] IAssembly **ppILAsm,
- [out] IAssembly **ppNIAsm);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// IAssemblyBindingClosureEnumerator
-//
-///////////////////////////////////////////////////////////////////////////////
-[
- local,
- object,
- uuid(b3f1e4ed-cb09-4b85-9a1b-6809582f1ebc),
- pointer_default(unique)
-]
-interface IAssemblyBindingClosureEnumerator : IUnknown
-{
- // Get the next assembly in the closure's path
- HRESULT GetNextAssemblyPath(
- [out] LPCOLESTR *ppPath,
- [out] LPCOLESTR *ppniPath);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// IAssemblyBindingClosure
-//
-///////////////////////////////////////////////////////////////////////////////
-[
- local,
- object,
- uuid(415c226a-e513-41ba-9651-9c48e97aa5de),
- pointer_default(unique)
-]
-interface IAssemblyBindingClosure : IUnknown
-{
- // Test if all the assemblies in the closure are in GAC.
- // return:
- // S_OK all assemblies are in GAC.
- // S_FALSE not all assemblies are in GAC.
- // otherwise failure.
- HRESULT IsAllAssembliesInGAC();
-
- // Test to see if two closures are semantically the same
- // under the specified sharing context.
- // return:
- // S_OK Equal.
- // S_FALSE Not Equal.
- // otherwise failure.
- HRESULT IsEqual(
- [in] IAssemblyBindingClosure *pAssemblyClosure
- );
-
- HRESULT GetNextFailureAssembly(
- [in] DWORD dwIndex,
- [out] IAssemblyName **ppName,
- [out] HRESULT *pHResult);
-
- // ensure enough data is available
- HRESULT EnsureWalked(
- [in] IUnknown *pStartingAssembly,
- [in] IApplicationContext *pAppCtx,
- [in] WALK_LEVEL level);
-
- // Iterate over assembly paths in the closure
- HRESULT EnumerateAssemblies(
- [out] IAssemblyBindingClosureEnumerator **ppEnumerator);
-
- HRESULT HasBeenWalked([in] WALK_LEVEL level);
-
- // Test if the assembly might have unknonwn dependecies because of WinRT
- // return:
- // S_OK May.
- // S_FALSE No, all dependecies are traceable or FX.
- // otherwise failure.
- HRESULT MayHaveUnknownDependencies();
-
-
- // The closure walker asks the profiler (when present) for any additional
- // assembly references the profiler wishes to add. This method is then called
- // back by the profiler for each such assembly reference.
- HRESULT AddProfilerAssemblyReference(
- [in] LPVOID pbPublicKeyOrToken,
- [in] ULONG cbPublicKeyOrToken,
- [in] LPCWSTR szName,
- [in] LPVOID pMetaData,
- [in] void *pbHashValue,
- [in] ULONG cbHashValue,
- [in] DWORD dwAssemblyRefFlags,
- [in] struct AssemblyReferenceClosureWalkContextForProfAPI * pContext);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// IAssemblyBindSink
-//
-///////////////////////////////////////////////////////////////////////////////
-[
- local,
- object,
- uuid(af0bc960-0b9a-11d3-95ca-00a024a85b51),
- pointer_default(unique)
-]
-interface IAssemblyBindSink : IUnknown
-{
- typedef [unique] IAssemblyBindSink *LPASSEMBLY_BIND_SINK;
-
- typedef struct _tagFusionBindInfo
- {
- IFusionBindLog *pdbglog;
- IAssemblyName *pNamePolicy;
- DWORD dwPoliciesApplied;
- } FusionBindInfo;
-
- typedef enum
- {
- ASM_NOTIFICATION_START,
- ASM_NOTIFICATION_PROGRESS,
- ASM_NOTIFICATION_SUSPEND,
- ASM_NOTIFICATION_ATTEMPT_NEXT_CODEBASE,
- ASM_NOTIFICATION_BIND_INFO,
- ASM_NOTIFICATION_DONE,
- ASM_NOTIFICATION_NATIVE_IMAGE_DONE
- } ASM_NOTIFICATION;
-
-
- HRESULT OnProgress(
- [in] DWORD dwNotification,
- [in] HRESULT hrNotification,
- [in] LPCWSTR szNotification,
- [in] DWORD dwProgress,
- [in] DWORD dwProgressMax,
- [in] LPVOID pvBindInfo,
- [in] IUnknown *pUnk);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// IAssemblyBinding
-//
-///////////////////////////////////////////////////////////////////////////////
-[
- local,
- object,
- uuid(cfe52a80-12bd-11d3-95ca-00a024a85b51),
- pointer_default(unique)
-]
-interface IAssemblyBinding : IUnknown
-{
- typedef [unique] IAssemblyBinding *LPASSEMBLY_BINDINDING;
-
- HRESULT Control(
- [in] HRESULT hrControl);
-
- HRESULT DoDefaultUI(
- [in] HWND hWnd,
- [in] DWORD dwFlags);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// IAssemblyModuleImport
-//
-///////////////////////////////////////////////////////////////////////////////
-[
- local,
- object,
- uuid(da0cd4b0-1117-11d3-95ca-00a024a85b51),
- pointer_default(unique)
-]
-interface IAssemblyModuleImport : IStream
-{
- typedef [unique] IAssemblyModuleImport *LPASSEMBLY_MODULE_IMPORT;
-
- HRESULT GetModuleName(
- [out, size_is(*pccModuleName), annotation("__out_ecount_full_opt(*pccModuleName)")] LPOLESTR szModuleName,
- [in, out] LPDWORD pccModuleName);
-
- HRESULT GetHashAlgId(
- [out] LPDWORD pdwHashAlgId);
-
- HRESULT GetHashValue(
- [out, size_is(*pcbHashValue)] BYTE *pbHashValue,
- [in, out] LPDWORD pcbHashValue);
-
- HRESULT GetFlags(
- [out] LPDWORD pdwFlags);
-
- HRESULT GetModulePath(
- [out, size_is(*pccModulePath), annotation("__out_ecount_full_opt(*pccModulePath)")] LPOLESTR szModulePath,
- [in, out] LPDWORD pccModulePath);
-
- BOOL IsAvailable();
-
- HRESULT BindToObject(
- [in] IAssemblyBindSink *pBindSink,
- [in] IApplicationContext *pAppCtx,
- [in] LONGLONG llFlags,
- [out] LPVOID *ppv);
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// IAssemblyScavenger
-//
-///////////////////////////////////////////////////////////////////////////////
-[
- local,
- object,
- uuid(21b8916c-f28e-11d2-a473-00ccff8ef448),
- pointer_default(unique)
-]
-interface IAssemblyScavenger : IUnknown
-{
-
- HRESULT ScavengeAssemblyCache
- (
- );
-
- HRESULT GetCacheDiskQuotas
- (
- [out] DWORD *pdwZapQuotaInGAC,
- [out] DWORD *pdwDownloadQuotaAdmin,
- [out] DWORD *pdwDownloadQuotaUser
- );
-
- HRESULT SetCacheDiskQuotas
- (
- [in] DWORD dwZapQuotaInGAC,
- [in] DWORD dwDownloadQuotaAdmin,
- [in] DWORD dwDownloadQuotaUser
- );
-
- HRESULT GetCurrentCacheUsage
- (
- [out] DWORD *dwZapUsage,
- [out] DWORD *dwDownloadUsage
- );
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-
-[
- local,
- object,
- uuid(D8FB9BD6-3969-11d3-B4AF-00C04F8ECB26),
- pointer_default(unique)
-]
-interface ICodebaseList : IUnknown
-{
- HRESULT AddCodebase
- (
- [in] LPCWSTR wzCodebase,
- [in] DWORD dwFlags
- );
-
- HRESULT RemoveCodebase
- (
- [in] DWORD dwIndex
- );
-
- HRESULT RemoveAll();
-
- HRESULT GetCount
- (
- [out] DWORD *pdwCount
- );
-
- HRESULT GetCodebase
- (
- [in] DWORD dwIndex,
- [out] DWORD *pdwFlags,
- [out, annotation("__out_ecount_opt(*pcbCodebase)")]
- LPWSTR wzCodebase,
- [in, out] DWORD *pcbCodebase
- );
-}
-
-[
- local,
- object,
- uuid(0A6F16F8-ACD7-11d3-B4ED-00C04F8ECB26),
- pointer_default(unique)
-]
-interface IDownloadMgr : IUnknown
-{
- HRESULT PreDownloadCheck
- (
- [out] void **ppv,
- [out] void **ppvNI
- );
-
- HRESULT DoSetup
- (
- [in] LPCWSTR wzSourceUrl,
- [in] LPCWSTR wzFilePath,
- [in] const FILETIME *pftLastMod,
- [out] IUnknown **ppUnk,
- [out] IUnknown **ppAsmNI
- );
-
- HRESULT ProbeFailed
- (
- [out] IUnknown **ppUnk
- );
-
- HRESULT IsDuplicate
- (
- [out] IDownloadMgr *ppDLMgr
- );
-
- HRESULT LogResult();
-
- HRESULT DownloadEnabled
- (
- [out] BOOL *pbEnabled
- );
-
- HRESULT GetBindInfo
- (
- [out] FusionBindInfo *pBindInfo
- );
-
- HRESULT CacheBindingResult
- (
- [in] HRESULT hrResult
- );
-}
-
-
-[
- local,
- object,
- uuid(711f7c2d-8234-4505-b02f-7554f46cbf29),
- pointer_default(unique)
-]
-interface IHostAssembly : IUnknown
-{
- typedef [unique] IHostAssembly *LPHOSTASSEMBLY;
-
- HRESULT GetAssemblyNameDef(
- [out] IAssemblyName **ppAssemblyName);
-
- HRESULT GetNextAssemblyNameRef(
- [in] DWORD nIndex,
- [out] IAssemblyName **ppAssemblyName);
-
- HRESULT GetNextAssemblyModule(
- [in] DWORD nIndex,
- [out] IHostAssemblyModuleImport **ppModImport);
-
- HRESULT GetModuleByName(
- [in] LPCOLESTR szModuleName,
- [out] IHostAssemblyModuleImport **ppModImport);
-
- // Always release the copy in fusion
- HRESULT GetAssemblyStream(
- [out] IStream **ppStreamAsm);
-
- HRESULT GetAssemblyId(
- [out] UINT64 *pAssemblyId);
-
- // Always release the copy in fusion
- HRESULT GetAssemblyDebugStream(
- [out] IStream **ppDebugStream);
-
- LOADCTX_TYPE GetFusionLoadContext(
- );
-
- HRESULT GetAssemblyContext(
- [out] UINT64 *pdwAssemblyContext);
-}
-
-[
- local,
- object,
- uuid(b6f2729d-6c0f-4944-b692-e5a2ce2c6e7a),
- pointer_default(unique)
-]
-interface IHostAssemblyModuleImport : IUnknown
-{
- typedef [unique] IHostAssemblyModuleImport *LPHOSTASSEMBLY_MODULE_IMPORT;
-
- HRESULT GetModuleName(
- [out, size_is(*pccModuleName), annotation("__out_ecount_full(*pccModuleName)")] LPOLESTR szModuleName,
- [in, out] LPDWORD pccModuleName);
-
- HRESULT GetModuleStream(
- [out] IStream **ppStreamModule);
-
- HRESULT GetModuleId(
- [out] DWORD *pdwModuleId);
-
- HRESULT GetModuleDebugStream(
- [out] IStream **ppDebugStream);
-}
-
-
-#pragma midl_echo("STDAPI CreateHistoryReader(LPCWSTR wzFilePath, IHistoryReader **ppHistReader);")
-#pragma midl_echo("STDAPI LookupHistoryAssembly(LPCWSTR pwzFilePath, FILETIME *pftActivationDate, LPCWSTR pwzAsmName, LPCWSTR pwzPublicKeyToken, LPCWSTR wzCulture, LPCWSTR pwzVerRef, IHistoryAssembly **pHistAsm);")
-#pragma midl_echo("STDAPI GetHistoryFileDirectory(__out_ecount_opt(*pdwSize) LPWSTR wzDir, DWORD *pdwSize);")
-#pragma midl_echo("STDAPI PreBindAssembly(IApplicationContext *pAppCtx, IAssemblyName *pName, IAssembly *pAsmParent, IAssemblyName **ppNamePostPolicy, LPVOID pvReserved); ")
-
-#pragma midl_echo("STDAPI CreateApplicationContext(IAssemblyName *pName, LPAPPLICATIONCONTEXT *ppCtx); ")
-#pragma midl_echo("STDAPI IsRetargetableAssembly(IAssemblyName *pName, BOOL *pbIsRetargetable); ")
-#pragma midl_echo("STDAPI IsOptionallyRetargetableAssembly(IAssemblyName *pName, BOOL *pbIsRetargetable); ")
-
-
-cpp_quote("#define EXPLICITBIND_FLAGS_NON_BINDABLE 0x0")
-cpp_quote("#define EXPLICITBIND_FLAGS_EXE 0x1")
-
-#ifndef FEATURE_CORECLR
-#pragma midl_echo("HRESULT BindToSystem(IAssemblyName *pNameSystem, LPCWSTR pcwzSystemDirectory, IUnknown *pNIEva, IApplicationContext *pAppCtx, IAssembly **ppAsmOut, IBindResult **ppNIAsmOut, IFusionBindLog **ppdbglog);")
-
-#pragma midl_echo("HRESULT ExplicitBind(LPCWSTR wzPath, IApplicationContext *pAppCtx, DWORD dwFlags, IUnknown *pNIEva, IAssembly **ppAsmOut, IBindResult **ppNIAsmOut, IFusionBindLog **ppdbglog);")
-
-#pragma midl_echo("HRESULT GetBindContextFromApplicationContext(IApplicationContext *pAppCtx, IBindContext **ppBindCtx);")
-
-#pragma midl_echo("HRESULT SetApplicationContext_WinRTBinder(IApplicationContext * pAppCtx, IBindContext * pWinRTBinder);")
-
-// Used by InstallNativeImage() to extract dependency names from the NI's CORCOMPILE_DEPENDENCY_INFO records.
-#pragma midl_echo("STDAPI FusionGetAssemblyNameRefFromMDImport(IMetaDataAssemblyImport *pMDImport, /* This is really an mdAssemblyRef */ DWORD mdar, DWORD dwFlags, IAssemblyName **ppName);")
-
-#endif //!FEATURE_CORECLR
diff --git a/src/inc/fusionsink.h b/src/inc/fusionsink.h
deleted file mode 100644
index adf88d4cd4..0000000000
--- a/src/inc/fusionsink.h
+++ /dev/null
@@ -1,129 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-
-
-/*============================================================
-**
-** Header: FusionSink.hpp
-**
-** Purpose: Implements FusionSink
-**
-**
-===========================================================*/
-#ifndef _FUSIONSINK_H
-#define _FUSIONSINK_H
-
-#include <fusion.h>
-#include <fusionpriv.h>
-#include "corhlpr.h"
-#include "corpriv.h"
-
-class FusionSink : public IAssemblyBindSink, public INativeImageEvaluate
-{
-public:
-
- FusionSink() :
- m_punk(NULL),
- m_pNIunk(NULL),
- m_pAbortUnk(NULL),
- m_pFusionLog(NULL),
- m_cRef(1),
- m_hEvent(NULL),
- m_LastResult(S_OK)
- {
- WRAPPER_NO_CONTRACT;
- }
-
- virtual void Reset()
- {
- CONTRACTL
- {
- INSTANCE_CHECK;
- NOTHROW;
- }
- CONTRACTL_END;
-
- if(m_pAbortUnk) {
- m_pAbortUnk->Release();
- m_pAbortUnk = NULL;
- }
-
- if(m_punk) {
- m_punk->Release();
- m_punk = NULL;
- }
-
- if(m_pNIunk) {
- m_pNIunk->Release();
- m_pNIunk = NULL;
- }
-
- if(m_pFusionLog) {
- m_pFusionLog->Release();
- m_pFusionLog = NULL;
- }
-
- m_LastResult = S_OK;
- }
-
- ~FusionSink()
- {
- CONTRACTL
- {
- DESTRUCTOR_CHECK;
- NOTHROW;
- }
- CONTRACTL_END;
-
- if(m_hEvent) {
- delete m_hEvent;
- m_hEvent = NULL;
- }
-
- Reset();
- }
-
- HRESULT AssemblyResetEvent();
- HRESULT LastResult()
- {
- LIMITED_METHOD_CONTRACT;
- return m_LastResult;
- }
-
- STDMETHODIMP QueryInterface(REFIID riid, void **ppInterface);
- ULONG STDMETHODCALLTYPE AddRef(void);
- ULONG STDMETHODCALLTYPE Release(void);
-
- STDMETHODIMP OnProgress(DWORD dwNotification,
- HRESULT hrNotification,
- LPCWSTR szNotification,
- DWORD dwProgress,
- DWORD dwProgressMax,
- LPVOID pvBindInfo,
- IUnknown* punk);
-
- // Wait on the event.
- virtual HRESULT Wait();
-
- STDMETHODIMP Evaluate(
- IAssembly *pILAssembly,
- IAssembly *pNativeAssembly,
- BYTE * pbCachedData,
- DWORD dwDataSize);
-
- IUnknown* m_punk; // Getting an assembly
- IUnknown* m_pNIunk; // Getting an assembly
- IUnknown* m_pAbortUnk; // pUnk for aborting a bind
- IFusionBindLog *m_pFusionLog;
-
-protected:
- HRESULT AssemblyCreateEvent();
-
- LONG m_cRef; // Ref count.
- Event *m_hEvent; // Event to block thread.
- HRESULT m_LastResult; // Last notification result
-};
-
-#endif // _FUSIONSINK_H
diff --git a/src/inc/gchost.idl b/src/inc/gchost.idl
index 3aa528f028..6d85f91513 100644
--- a/src/inc/gchost.idl
+++ b/src/inc/gchost.idl
@@ -10,22 +10,8 @@
* -------------------------------------------------------------------------- */
import "unknwn.idl";
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
-typedef enum
-{
- COR_GC_COUNTS = 0x00000001, // Fill out count values.
- COR_GC_MEMORYUSAGE = 0x00000002, // Fill out memory usage values.
-} COR_GC_STAT_TYPES;
-
-typedef enum
-{
- COR_GC_THREAD_HAS_PROMOTED_BYTES = 0x00000001 // Thread has bytes promoted in the last GC
- // if flags set to this value.
-} COR_GC_THREAD_STATS_TYPES;
-
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
-#if defined(FEATURE_INCLUDE_ALL_INTERFACES) || defined(FEATURE_WINDOWSPHONE)
+#if defined(FEATURE_WINDOWSPHONE)
/*
* This structure is used to return statics for the GC system. Set the Flags
* value to a bitmask of values that should be returned. Only those values which
@@ -50,86 +36,12 @@ typedef struct _COR_GC_STATS
SIZE_T KBytesPromotedFromGen1;
} COR_GC_STATS;
-#endif // FEATURE_INCLUDE_ALL_INTERFACES || FEATURE_WINDOWSPHONE
-
-#ifdef FEATURE_INCLUDE_ALL_INTERFACES
-/*
- * This structure is used to return per-thread statistics related to GC.
- */
-typedef struct _COR_GC_THREAD_STATS
-{
- ULONGLONG PerThreadAllocation; // Amount of memory allocated on this
- // thread. Cleared to 0 on each Gen 0 collection.
- ULONG Flags; // Thread has bytes promoted in the last GC?
-} COR_GC_THREAD_STATS;
-
-
-/*
- * This interface is used to get information about the GC system and
- * control some aspects of the GC. This interface is for expert usage
- * only, and can severely impact the performance of an application if
- * used improperly!!
- */
-[
- object,
- uuid(FAC34F6E-0DCD-47b5-8021-531BC5ECCA63),
- pointer_default(unique),
- local
-]
-interface IGCHost : IUnknown
-{
-
- /*
- * Sets the segment size and gen 0 maximum size. This value may only be
- * specified once and will not change if called later.
- */
- HRESULT SetGCStartupLimits([in] DWORD SegmentSize, [in] DWORD MaxGen0Size);
-
- /*
- * Forces a collection to occur for the given generation, regardless of
- * current GC statistics. A value of -1 means collect all generations.
- */
- HRESULT Collect([in] LONG Generation);
-
- /*
- * Returns a set of current statistics about the state of the GC system.
- * These values can then be used by a smart allocation system to help the
- * GC run, by say adding more memory or forcing a collection.
- */
- HRESULT GetStats([in][out] COR_GC_STATS *pStats);
-
- /*
- * This method returns the per-thread statics gathered by the GC.
- */
- HRESULT GetThreadStats([in] DWORD *pFiberCookie, [in][out] COR_GC_THREAD_STATS *pStats);
-
- /*
- * This method allows the caller to set virtual memory limit (MB) of the runtime. This limit
- * can be changed dynamically.
- */
- HRESULT SetVirtualMemLimit ([in] SIZE_T sztMaxVirtualMemMB);
-}
-
-[
- object,
- uuid(A1D70CEC-2DBE-4E2F-9291-FDF81438A1DF),
- pointer_default(unique),
- local
-]
-interface IGCHost2 : IGCHost
-{
- /*
- * Sets the segment size and gen 0 maximum size. This value may only be
- * specified once and will not change if called later.
- */
- HRESULT SetGCStartupLimitsEx([in] SIZE_T SegmentSize, [in] SIZE_T MaxGen0Size);
-}
+#endif // FEATURE_WINDOWSPHONE
-#else // FEATURE_INCLUDE_ALL_INTERFACES
cpp_quote("/*")
cpp_quote(" * WARNING - This is a dummy interface that should never be used.")
cpp_quote(" * The code is written this way because Midl requires a CoClass, Interface, etc... that generates")
-cpp_quote(" * a guid. Removing the IGCHost interface for FEATURE_INCLUDE_ALL_INTERFACES removes the only guid")
+cpp_quote(" * a guid. Removing the IGCHost interface removes the only guid")
cpp_quote(" * This option was selected because ifdefs are not simple to implement for excluding files in SOURCES")
cpp_quote("*/")
[
@@ -141,4 +53,3 @@ cpp_quote("*/")
interface IDummyDoNotUse : IUnknown
{
}
-#endif // FEATURE_INCLUDE_ALL_INTERFACES
diff --git a/src/inc/holder.h b/src/inc/holder.h
index a4d19bbf92..a92eeabaab 100644
--- a/src/inc/holder.h
+++ b/src/inc/holder.h
@@ -65,12 +65,6 @@
#ifdef _DEBUG
-#ifdef FEATURE_FUSION
-namespace NATIVE_BINDER_SPACE
-{
- class NativeAssembly;
-}
-#endif //FEATURE_FUSION
//------------------------------------------------------------------------------------------------
// This is used to make Visual Studio autoexp.dat work sensibly with holders again.
@@ -95,26 +89,11 @@ struct AutoExpVisibleValue
union
{
// Only include a class name here if it is customarily referred to through an abstract interface.
-#ifdef FEATURE_FUSION
- const class CAssemblyName *_asCAssemblyName;
- const class CAssembly *_asCAssembly;
- const class CAssemblyManifestImport *_asCAssemblyManifestImport;
- const class CAssemblyModuleImport *_asCAssemblyModuleImport;
- const class CHostAssembly *_asCHostAssembly;
- const class CHostAssemblyModuleImport *_asCHostAssemblyModuleImport;
- const class BindResult *_asBindResult;
- const class BindContext *_asBindContext;
- const class NATIVE_BINDER_SPACE::NativeAssembly *_asNativeAssembly;
- const class AssemblyLocation *_asAssemblyLocation;
-#endif //FEATURE_FUSION
#if defined(FEATURE_APPX)
const class AppXBindResultImpl *_asAppXBindResultImpl;
#endif
-#ifndef FEATURE_CORECLR
- const class PEFingerprint *_asPEFingerprint;
-#endif //!FEATURE_CORECLR
const void *_pPreventEmptyUnion;
};
};
@@ -1214,16 +1193,6 @@ FORCEINLINE void VoidDeleteFile(LPCWSTR wszFilePath) { WszDeleteFile(wszFilePath
typedef Wrapper<LPCWSTR, DoNothing<LPCWSTR>, VoidDeleteFile, NULL> DeleteFileHolder;
#endif // WszDeleteFile
-#if !defined(FEATURE_CORECLR) || defined(FEATURE_CRYPTO)
-// Crypto holders
-FORCEINLINE void VoidCryptReleaseContext(HCRYPTPROV h) { CryptReleaseContext(h, 0); }
-FORCEINLINE void VoidCryptDestroyHash(HCRYPTHASH h) { CryptDestroyHash(h); }
-FORCEINLINE void VoidCryptDestroyKey(HCRYPTKEY h) { CryptDestroyKey(h); }
-
-typedef Wrapper<HCRYPTPROV, DoNothing, VoidCryptReleaseContext, 0> HandleCSPHolder;
-typedef Wrapper<HCRYPTHASH, DoNothing, VoidCryptDestroyHash, 0> HandleHashHolder;
-typedef Wrapper<HCRYPTKEY, DoNothing, VoidCryptDestroyKey, 0> HandleKeyHolder;
-#endif // !FEATURE_CORECLR || FEATURE_CRYPTO
//-----------------------------------------------------------------------------
// Misc holders
diff --git a/src/inc/jithelpers.h b/src/inc/jithelpers.h
index f84db9142d..4e56250b04 100644
--- a/src/inc/jithelpers.h
+++ b/src/inc/jithelpers.h
@@ -38,15 +38,15 @@
// CORINFO_HELP_DBL2INT, CORINFO_HELP_DBL2UINT, and CORINFO_HELP_DBL2LONG get
// patched for CPUs that support SSE2 (P4 and above).
-#if !defined(_WIN64)
+#ifndef BIT64
JITHELPER(CORINFO_HELP_LLSH, JIT_LLsh, CORINFO_HELP_SIG_REG_ONLY)
JITHELPER(CORINFO_HELP_LRSH, JIT_LRsh, CORINFO_HELP_SIG_REG_ONLY)
JITHELPER(CORINFO_HELP_LRSZ, JIT_LRsz, CORINFO_HELP_SIG_REG_ONLY)
-#else
+#else // !BIT64
JITHELPER(CORINFO_HELP_LLSH, NULL, CORINFO_HELP_SIG_CANNOT_USE_ALIGN_STUB)
JITHELPER(CORINFO_HELP_LRSH, NULL, CORINFO_HELP_SIG_CANNOT_USE_ALIGN_STUB)
JITHELPER(CORINFO_HELP_LRSZ, NULL, CORINFO_HELP_SIG_CANNOT_USE_ALIGN_STUB)
-#endif
+#endif // BIT64
JITHELPER(CORINFO_HELP_LMUL, JIT_LMul, CORINFO_HELP_SIG_16_STACK)
JITHELPER(CORINFO_HELP_LMUL_OVF, JIT_LMulOvf, CORINFO_HELP_SIG_16_STACK)
JITHELPER(CORINFO_HELP_ULMUL_OVF, JIT_ULMulOvf, CORINFO_HELP_SIG_16_STACK)
@@ -70,18 +70,12 @@
JITHELPER(CORINFO_HELP_DBLROUND, JIT_DoubleRound, CORINFO_HELP_SIG_16_STACK)
// Allocating a new object
-#ifdef FEATURE_REMOTING
- JITHELPER(CORINFO_HELP_NEW_CROSSCONTEXT, JIT_NewCrossContext, CORINFO_HELP_SIG_REG_ONLY)
-#else
JITHELPER(CORINFO_HELP_NEW_CROSSCONTEXT, NULL, CORINFO_HELP_SIG_CANNOT_USE_ALIGN_STUB)
-#endif
JITHELPER(CORINFO_HELP_NEWFAST, JIT_New, CORINFO_HELP_SIG_REG_ONLY)
DYNAMICJITHELPER(CORINFO_HELP_NEWSFAST, JIT_New, CORINFO_HELP_SIG_REG_ONLY)
DYNAMICJITHELPER(CORINFO_HELP_NEWSFAST_ALIGN8, JIT_New, CORINFO_HELP_SIG_REG_ONLY)
JITHELPER(CORINFO_HELP_NEW_MDARR, JIT_NewMDArr,CORINFO_HELP_SIG_8_VA)
-#if COR_JIT_EE_VERSION > 460
JITHELPER(CORINFO_HELP_NEW_MDARR_NONVARARG, JIT_NewMDArrNonVarArg,CORINFO_HELP_SIG_4_STACK)
-#endif
JITHELPER(CORINFO_HELP_NEWARR_1_DIRECT, JIT_NewArr1,CORINFO_HELP_SIG_REG_ONLY)
DYNAMICJITHELPER(CORINFO_HELP_NEWARR_1_OBJ, JIT_NewArr1,CORINFO_HELP_SIG_REG_ONLY)
DYNAMICJITHELPER(CORINFO_HELP_NEWARR_1_VC, JIT_NewArr1,CORINFO_HELP_SIG_REG_ONLY)
@@ -124,9 +118,7 @@
JITHELPER(CORINFO_HELP_RNGCHKFAIL, JIT_RngChkFail, CORINFO_HELP_SIG_REG_ONLY)
JITHELPER(CORINFO_HELP_OVERFLOW, JIT_Overflow, CORINFO_HELP_SIG_REG_ONLY)
JITHELPER(CORINFO_HELP_THROWDIVZERO, JIT_ThrowDivZero, CORINFO_HELP_SIG_REG_ONLY)
-#if COR_JIT_EE_VERSION > 460
JITHELPER(CORINFO_HELP_THROWNULLREF, JIT_ThrowNullRef, CORINFO_HELP_SIG_REG_ONLY)
-#endif // COR_JIT_EE_VERSION
JITHELPER(CORINFO_HELP_INTERNALTHROW, JIT_InternalThrow, CORINFO_HELP_SIG_REG_ONLY)
JITHELPER(CORINFO_HELP_VERIFICATION, IL_VerificationError,CORINFO_HELP_SIG_REG_ONLY)
JITHELPER(CORINFO_HELP_SEC_UNMGDCODE_EXCPT, JIT_SecurityUnmanagedCodeException, CORINFO_HELP_SIG_REG_ONLY)
@@ -209,22 +201,8 @@
JITHELPER(CORINFO_HELP_GETFIELDADDR, JIT_GetFieldAddr,CORINFO_HELP_SIG_REG_ONLY)
-#ifdef FEATURE_REMOTING
- JITHELPER(CORINFO_HELP_GETSTATICFIELDADDR_CONTEXT, JIT_GetStaticFieldAddr_Context,CORINFO_HELP_SIG_REG_ONLY)
-#else
JITHELPER(CORINFO_HELP_GETSTATICFIELDADDR_CONTEXT, NULL, CORINFO_HELP_SIG_CANNOT_USE_ALIGN_STUB)
-#endif
-
-#if COR_JIT_EE_VERSION > 460
-#ifdef FEATURE_MIXEDMODE
- // TLS
- JITHELPER(CORINFO_HELP_GETSTATICFIELDADDR_TLS, JIT_GetStaticFieldAddr_Tls,CORINFO_HELP_SIG_REG_ONLY)
-#else // FEATURE_MIXEDMODE
JITHELPER(CORINFO_HELP_GETSTATICFIELDADDR_TLS, NULL, CORINFO_HELP_SIG_CANNOT_USE_ALIGN_STUB)
-#endif // FEATURE_MIXEDMODE
-#else // COR_JIT_EE_VERSION
- JITHELPER(CORINFO_HELP_GETSTATICFIELDADDR_TLS, JIT_GetStaticFieldAddr_Tls,CORINFO_HELP_SIG_REG_ONLY)
-#endif // COR_JIT_EE_VERSION
JITHELPER(CORINFO_HELP_GETGENERICS_GCSTATIC_BASE, JIT_GetGenericsGCStaticBase,CORINFO_HELP_SIG_REG_ONLY)
JITHELPER(CORINFO_HELP_GETGENERICS_NONGCSTATIC_BASE, JIT_GetGenericsNonGCStaticBase,CORINFO_HELP_SIG_REG_ONLY)
@@ -308,11 +286,9 @@
JITHELPER(CORINFO_HELP_READYTORUN_CHKCAST, NULL, CORINFO_HELP_SIG_NO_ALIGN_STUB)
JITHELPER(CORINFO_HELP_READYTORUN_STATIC_BASE, NULL, CORINFO_HELP_SIG_NO_ALIGN_STUB)
JITHELPER(CORINFO_HELP_READYTORUN_VIRTUAL_FUNC_PTR, NULL, CORINFO_HELP_SIG_NO_ALIGN_STUB)
-#if COR_JIT_EE_VERSION > 460
JITHELPER(CORINFO_HELP_READYTORUN_GENERIC_HANDLE, NULL, CORINFO_HELP_SIG_NO_ALIGN_STUB)
JITHELPER(CORINFO_HELP_READYTORUN_DELEGATE_CTOR, NULL, CORINFO_HELP_SIG_NO_ALIGN_STUB)
JITHELPER(CORINFO_HELP_READYTORUN_GENERIC_STATIC_BASE, NULL, CORINFO_HELP_SIG_NO_ALIGN_STUB)
-#endif // COR_JIT_EE_VERSION
JITHELPER(CORINFO_HELP_EE_PRESTUB, ThePreStub, CORINFO_HELP_SIG_NO_ALIGN_STUB)
@@ -328,22 +304,18 @@
JITHELPER(CORINFO_HELP_EE_EXTERNAL_FIXUP, ExternalMethodFixupStub, CORINFO_HELP_SIG_NO_ALIGN_STUB)
JITHELPER(CORINFO_HELP_EE_VTABLE_FIXUP, VirtualMethodFixupStub, CORINFO_HELP_SIG_NO_ALIGN_STUB)
-#if (defined(_TARGET_X86_) || defined(_TARGET_ARM_)) && defined(FEATURE_REMOTING)
- JITHELPER(CORINFO_HELP_EE_REMOTING_THUNK, PrecodeRemotingThunk, CORINFO_HELP_SIG_UNDEF)
-#else
JITHELPER(CORINFO_HELP_EE_REMOTING_THUNK, NULL, CORINFO_HELP_SIG_UNDEF)
-#endif
// We do not need this to be saved in ngen images on Mac64 since the exception dispatch
// is not done via the OS and thus, there wont be any need to know this information
// by anyone.
-#if !defined(_TARGET_X86_)
+#ifdef WIN64EXCEPTIONS
JITHELPER(CORINFO_HELP_EE_PERSONALITY_ROUTINE, ProcessCLRException, CORINFO_HELP_SIG_UNDEF)
JITHELPER(CORINFO_HELP_EE_PERSONALITY_ROUTINE_FILTER_FUNCLET, ProcessCLRException,CORINFO_HELP_SIG_UNDEF)
-#else
+#else // WIN64EXCEPTIONS
JITHELPER(CORINFO_HELP_EE_PERSONALITY_ROUTINE, NULL, CORINFO_HELP_SIG_UNDEF)
JITHELPER(CORINFO_HELP_EE_PERSONALITY_ROUTINE_FILTER_FUNCLET, NULL, CORINFO_HELP_SIG_UNDEF)
-#endif
+#endif // !WIN64EXCEPTIONS
#ifdef _TARGET_X86_
JITHELPER(CORINFO_HELP_ASSIGN_REF_EAX, JIT_WriteBarrierEAX, CORINFO_HELP_SIG_NO_ALIGN_STUB)
@@ -378,8 +350,6 @@
JITHELPER(CORINFO_HELP_LOOP_CLONE_CHOICE_ADDR, JIT_LoopCloneChoiceAddr, CORINFO_HELP_SIG_REG_ONLY)
JITHELPER(CORINFO_HELP_DEBUG_LOG_LOOP_CLONING, JIT_DebugLogLoopCloning, CORINFO_HELP_SIG_REG_ONLY)
-#if COR_JIT_EE_VERSION > 460
-
JITHELPER(CORINFO_HELP_THROW_ARGUMENTEXCEPTION, JIT_ThrowArgumentException, CORINFO_HELP_SIG_REG_ONLY)
JITHELPER(CORINFO_HELP_THROW_ARGUMENTOUTOFRANGEEXCEPTION, JIT_ThrowArgumentOutOfRangeException, CORINFO_HELP_SIG_REG_ONLY)
@@ -389,7 +359,7 @@
JITHELPER(CORINFO_HELP_JIT_REVERSE_PINVOKE_ENTER, NULL, CORINFO_HELP_SIG_UNDEF)
JITHELPER(CORINFO_HELP_JIT_REVERSE_PINVOKE_EXIT, NULL, CORINFO_HELP_SIG_UNDEF)
-#endif // COR_JIT_EE_VERSION
+ JITHELPER(CORINFO_HELP_GVMLOOKUP_FOR_SLOT, NULL, CORINFO_HELP_SIG_NO_ALIGN_STUB)
#undef JITHELPER
#undef DYNAMICJITHELPER
diff --git a/src/inc/legacyactivationshim.h b/src/inc/legacyactivationshim.h
deleted file mode 100644
index 4d8eaa5dd9..0000000000
--- a/src/inc/legacyactivationshim.h
+++ /dev/null
@@ -1,1382 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-//
-// LegacyActivationShim.h
-//
-// This file allows simple migration from .NET Runtime v2 Host Activation APIs
-// to the .NET Runtime v4 Host Activation APIs through simple shim functions.
-
-#ifndef __LEGACYACTIVATIONSHIM_H__
-#define __LEGACYACTIVATIONSHIM_H__
-
-#pragma warning(push)
-#pragma warning(disable:4127) // warning C4127: conditional expression is constant
- // caused by IfHrFailRet's while(0) code.
-#pragma warning(disable:4917) // a GUID can only be associated with a class, interface or namespace
-#pragma warning(disable:4191) // 'reinterpret_cast' : unsafe conversion from 'FARPROC' to 'XXX'
-
-#ifdef _MANAGED
-// We are compiling Managed C++, switch to native code then (and store current managed/native status on the stack)
-#pragma managed(push, off)
-#endif //_MANAGED
-
-#include "mscoree.h"
-#include "metahost.h"
-
-#include "wchar.h"
-
-#include "corerror.h"
-
-// To minimize how much we perturb sources that we are included in, we make sure that
-// all macros we define/redefine are restored at the end of the header.
-#pragma push_macro("IfHrFailRet")
-#pragma push_macro("IfHrFailRetFALSE")
-#pragma push_macro("IfHrFailRetVOID")
-
-// ---IfHrFailRet------------------------------------------------------------------------------------
-#undef IfHrFailRet
-#undef IfHrFailRetFALSE
-#undef IfHrFailRetVOID
-#define IfHrFailRet(EXPR) do { hr = (EXPR); if(FAILED(hr)) { return (hr); } } while (0)
-#define IfHrFailRetFALSE(EXPR) do { HRESULT _hr_ = (EXPR); if(FAILED(_hr_)) { return false; } } while (0)
-#define IfHrFailRetVOID(EXPR) do { HRESULT _hr_ = (EXPR); if(FAILED(_hr_)) { return; } } while (0)
-
-#include "legacyactivationshimutil.h"
-
-// Use of deprecated APIs within LegacyActivationShim namespace will result in C4996 that we will
-// disable for our own use.
-#pragma warning(push)
-#pragma warning(disable:4996)
-// ---LEGACYACTIVATONSHIM NAMESPACE----------------------------------------------------------------
-namespace LegacyActivationShim
-{
- // ---HELPERS----------------------------------------------------------------------------------
-#define GET_CLRMETAHOST(x) \
- ICLRMetaHost *x = NULL; \
- IfHrFailRet(Util::GetCLRMetaHost(&x))
-
-#define GET_CLRMETAHOSTPOLICY(x) \
- ICLRMetaHostPolicy*x = NULL; \
- IfHrFailRet(Util::GetCLRMetaHostPolicy(&x))
-
-#define GET_CLRINFO(x) \
- ICLRRuntimeInfo *x = NULL; \
- IfHrFailRet(Util::GetCLRRuntimeInfo(&x))
-
-#define LEGACY_API_PASS_THROUGH_STATIC(_name, _ret_type, _ret_value, _sig, _args) \
- { \
- hr = S_OK; \
- _ret_value = ::_name _args; \
- }
-
-#define LEGACY_API_PASS_THROUGH_STATIC_VOIDRET(_name, _sig, _args) \
- { \
- ::_name _args; \
- }
-
-#define LEGACY_API_PASS_THROUGH_DELAYLOAD(_name, _ret_type, _ret_value, _sig, _args) \
- { \
- typedef _ret_type __stdcall t_FN _sig; \
- Util::MscoreeFunctor<t_FN> FN; \
- if (SUCCEEDED(hr = FN.Init(#_name))) { \
- _ret_value = FN()_args; \
- } \
- }
-
-#define LEGACY_API_PASS_THROUGH_DELAYLOAD_VOIDRET(_name, _sig, _args) \
- { \
- typedef void __stdcall t_FN _sig; \
- Util::MscoreeFunctor<t_FN> FN; \
- if (SUCCEEDED(FN.Init(#_name))) { \
- FN()_args; \
- } \
- }
-
-#ifndef LEGACY_ACTIVATION_SHIM_DELAY_LOAD
-#define CALL_LEGACY_API(_name, _sig, _args) \
- LEGACY_API_PASS_THROUGH_STATIC(_name, HRESULT, hr, _sig, _args)
-#define CALL_LEGACY_API_VOIDRET(_name, _sig, _args) \
- LEGACY_API_PASS_THROUGH_STATIC_VOIDRET(_name, _sig, _args)
-#else
-#define CALL_LEGACY_API(_name, _sig, _args) \
- LEGACY_API_PASS_THROUGH_DELAYLOAD(_name, HRESULT, hr, _sig, _args)
-#define CALL_LEGACY_API_VOIDRET(_name, _sig, _args) \
- LEGACY_API_PASS_THROUGH_DELAYLOAD_VOIDRET(_name, _sig, _args)
-#endif
-
- // ---LEGACY SHIM FUNCTIONS--------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------------------
- inline
- HRESULT GetCORSystemDirectory(
- __out_ecount(cchBuffer) LPWSTR pBuffer,
- __in DWORD cchBuffer,
- __out DWORD *pdwLength)
- {
- HRESULT hr = S_OK;
-
- if (Util::HasNewActivationAPIs())
- {
- DWORD dwLengthDummy = cchBuffer;
- if (pdwLength == NULL)
- pdwLength = &dwLengthDummy;
- else
- *pdwLength = cchBuffer;
-
- GET_CLRINFO(pInfo);
- IfHrFailRet(pInfo->GetRuntimeDirectory(pBuffer, pdwLength));
- }
- else
- {
- CALL_LEGACY_API(GetCORSystemDirectory,
- (LPWSTR pBuffer,
- DWORD cchBuffer,
- DWORD *pdwLength),
- (pBuffer,
- cchBuffer,
- pdwLength));
- }
-
- return hr;
- }
-
- // --------------------------------------------------------------------------------------------
- inline
- HRESULT GetCORVersion(
- __out_ecount(cchBuffer) LPWSTR pbBuffer,
- __in DWORD cchBuffer,
- __out DWORD *pdwLength)
- {
- HRESULT hr = S_OK;
-
- if (Util::HasNewActivationAPIs())
- {
- DWORD dwLengthDummy = cchBuffer;
- if (pdwLength == NULL)
- pdwLength = &dwLengthDummy;
- else
- *pdwLength = cchBuffer;
-
- GET_CLRINFO(pInfo);
- IfHrFailRet(pInfo->GetVersionString(pbBuffer, pdwLength));
- }
- else
- {
- CALL_LEGACY_API(GetCORVersion,
- (LPWSTR pbBuffer,
- DWORD cchBuffer,
- DWORD *pdwLength),
- (pbBuffer,
- cchBuffer,
- pdwLength));
-
- }
-
- return hr;
- }
-
- // --------------------------------------------------------------------------------------------
- inline
- HRESULT GetFileVersion(
- __in LPCWSTR szFileName,
- __out_ecount(cchBuffer) LPWSTR szBuffer,
- __in DWORD cchBuffer,
- __out DWORD *pdwLength)
- {
- HRESULT hr = S_OK;
-
- if (Util::HasNewActivationAPIs())
- {
- DWORD dwLengthDummy = cchBuffer;
- if (pdwLength == NULL)
- pdwLength = &dwLengthDummy;
- else
- *pdwLength = cchBuffer;
-
- GET_CLRMETAHOST(pMH);
- IfHrFailRet(pMH->GetVersionFromFile(szFileName, szBuffer, pdwLength));
- }
- else
- {
- CALL_LEGACY_API(GetFileVersion,
- (LPCWSTR szFileName,
- LPWSTR szBuffer,
- DWORD cchBuffer,
- DWORD *pdwLength),
- (szFileName,
- szBuffer,
- cchBuffer,
- pdwLength));
- }
-
- return hr;
- }
-
- // --------------------------------------------------------------------------------------------
- inline
- HRESULT GetCORRequiredVersion(
- __out_ecount(cchBuffer) LPWSTR pBuffer,
- __in DWORD cchBuffer,
- __out DWORD *pdwLength)
- {
- HRESULT hr = S_OK;
-
- if (Util::HasNewActivationAPIs())
- {
- DWORD dwLengthDummy = cchBuffer;
- if (pdwLength == NULL)
- pdwLength = &dwLengthDummy;
- else
- *pdwLength = cchBuffer;
-
- IfHrFailRet(Util::GetConfigImageVersion(pBuffer, pdwLength));
- }
- else
- {
- CALL_LEGACY_API(GetCORRequiredVersion,
- (LPWSTR pBuffer,
- DWORD cchBuffer,
- DWORD *pdwLength),
- (pBuffer,
- cchBuffer,
- pdwLength));
- }
-
- return hr;
- }
-
- // --------------------------------------------------------------------------------------------
- // This API is the one exception that we don't have fully equivalent functionality for
- // in the new APIs. Specifically, we do not have the runtimeInfoFlags equivalent that
- // allows platform differentiation. As such, we just send the call to the legacy API,
- // which does not bind (thankfully) and so we do not cap this specific API to Whidbey.
- inline
- HRESULT GetRequestedRuntimeInfo(
- __in_opt LPCWSTR pExe,
- __in_opt LPCWSTR pwszVersion,
- __in_opt LPCWSTR pConfigurationFile,
- __in DWORD startupFlags,
- __in DWORD runtimeInfoFlags,
- __out_ecount(dwDirectory) LPWSTR pDirectory,
- __in DWORD dwDirectory,
- __out DWORD *pdwDirectoryLength,
- __out_ecount(cchBuffer) LPWSTR pVersion,
- __in DWORD cchBuffer,
- __out DWORD *pdwLength)
- {
- HRESULT hr = S_OK;
-
- CALL_LEGACY_API(GetRequestedRuntimeInfo,
- (LPCWSTR pExe,
- LPCWSTR pwszVersion,
- LPCWSTR pConfigurationFile,
- DWORD startupFlags,
- DWORD runtimeInfoFlags,
- LPWSTR pDirectory,
- DWORD dwDirectory,
- DWORD *pdwDirectoryLength,
- LPWSTR pVersion,
- DWORD cchBuffer,
- DWORD *pdwLength),
- (pExe,
- pwszVersion,
- pConfigurationFile,
- startupFlags,
- runtimeInfoFlags,
- pDirectory,
- dwDirectory,
- pdwDirectoryLength,
- pVersion,
- cchBuffer,
- pdwLength));
-
- return hr;
- }
-
- // --------------------------------------------------------------------------------------------
- inline
- HRESULT GetRequestedRuntimeVersion(
- __in LPWSTR pExe,
- __out_ecount(cchBuffer) LPWSTR pVersion,
- __in DWORD cchBuffer,
- __out DWORD *pdwLength)
- {
- HRESULT hr = S_OK;
-
- if (Util::HasNewActivationAPIs())
- {
- DWORD dwLengthDummy = cchBuffer;
- if (pdwLength == NULL)
- pdwLength = &dwLengthDummy;
- else
- *pdwLength = cchBuffer;
-
- GET_CLRMETAHOSTPOLICY(pMHP);
- ICLRRuntimeInfo *pInfo = NULL;
- IfHrFailRet(pMHP->GetRequestedRuntime(
- METAHOST_POLICY_USE_PROCESS_IMAGE_PATH,
- pExe,
- NULL, // config stream
- pVersion,
- pdwLength,
- NULL, // image version str
- NULL, // image version len
- NULL,
- IID_ICLRRuntimeInfo,
- reinterpret_cast<LPVOID*>(&pInfo)));// ppRuntime
- Util::ReleaseHolder<ICLRRuntimeInfo*> hInfo(pInfo);
- }
- else
- {
- CALL_LEGACY_API(GetRequestedRuntimeVersion,
- (LPWSTR pExe,
- LPWSTR pVersion,
- DWORD cchBuffer,
- DWORD *pdwLength),
- (pExe,
- pVersion,
- cchBuffer,
- pdwLength));
- }
-
- return hr;
- }
-
- // --------------------------------------------------------------------------------------------
- inline
- HRESULT CorBindToRuntimeHost(
- LPCWSTR pwszVersion,
- LPCWSTR pwszBuildFlavor,
- LPCWSTR pwszHostConfigFile,
- VOID* pReserved,
- DWORD startupFlags,
- REFCLSID rclsid,
- REFIID riid,
- LPVOID FAR *ppv)
- {
- HRESULT hr = S_OK;
-
- if (Util::HasNewActivationAPIs())
- {
- IStream *pConfigStream = NULL;
- Util::ReleaseHolder<IStream*> hConfigStream;
- if (pwszHostConfigFile != NULL)
- {
- IfHrFailRet(Util::CreateIStreamFromFile(pwszHostConfigFile, &pConfigStream));
- hConfigStream.Assign(pConfigStream);
- }
-
- WCHAR wszVersionLocal[512];
- DWORD cchVersionLocal = 512;
- if (pwszVersion != NULL)
- wcsncpy_s(&wszVersionLocal[0], cchVersionLocal, pwszVersion, _TRUNCATE);
-
- ICLRRuntimeInfo *pInfo = NULL;
- IfHrFailRet(Util::GetCLRRuntimeInfo(
- &pInfo,
- NULL,
- pConfigStream,
- pwszVersion == NULL ? NULL : &wszVersionLocal[0],
- pwszVersion == NULL ? NULL : &cchVersionLocal));
-
- // We're intentionally ignoring the HRESULT return value, since CorBindToRuntimeEx
- // always ignored these flags when a runtime had already been bound, and we need
- // to emulate that behavior for when multiple calls to CorBindToRuntimeEx are made
- // but with different startup flags (ICLRRuntimeInfo::SetDefaultStartupFlags will
- // return E_INVALIDARG in the case that the runtime has already been started with
- // different flags).
- Util::AddStartupFlags(pInfo, pwszBuildFlavor, startupFlags, pwszHostConfigFile);
-
- IfHrFailRet(pInfo->GetInterface(rclsid, riid, ppv));
- }
- else
- {
- CALL_LEGACY_API(CorBindToRuntimeHost,
- (LPCWSTR pwszVersion,
- LPCWSTR pwszBuildFlavor,
- LPCWSTR pwszHostConfigFile,
- VOID* pReserved,
- DWORD startupFlags,
- REFCLSID rclsid,
- REFIID riid,
- LPVOID FAR *ppv),
- (pwszVersion,
- pwszBuildFlavor,
- pwszHostConfigFile,
- pReserved,
- startupFlags,
- rclsid,
- riid,
- ppv));
- }
-
- return hr;
- }
-
- // --------------------------------------------------------------------------------------------
- inline
- HRESULT CorBindToRuntimeEx(
- LPCWSTR pwszVersion,
- LPCWSTR pwszBuildFlavor,
- DWORD startupFlags,
- REFCLSID rclsid,
- REFIID riid,
- LPVOID* ppv)
- {
- HRESULT hr = S_OK;
-
- if (Util::HasNewActivationAPIs())
- {
- WCHAR wszVersionLocal[512];
- DWORD cchVersionLocal = 512;
- if (pwszVersion != NULL)
- wcsncpy_s(&wszVersionLocal[0], cchVersionLocal, pwszVersion, _TRUNCATE);
-
- ICLRRuntimeInfo *pInfo = NULL;
- IfHrFailRet(Util::GetCLRRuntimeInfo(
- &pInfo,
- NULL, // exe path
- NULL, // config stream
- pwszVersion == NULL ? NULL : &wszVersionLocal[0],
- pwszVersion == NULL ? NULL : &cchVersionLocal));
-
- // We're intentionally ignoring the HRESULT return value, since CorBindToRuntimeEx
- // always ignored these flags when a runtime had already been bound, and we need
- // to emulate that behavior for when multiple calls to CorBindToRuntimeEx are made
- // but with different startup flags (ICLRRuntimeInfo::SetDefaultStartupFlags will
- // return E_INVALIDARG in the case that the runtime has already been started with
- // different flags).
- Util::AddStartupFlags(pInfo, pwszBuildFlavor, startupFlags, NULL);
-
- IfHrFailRet(pInfo->GetInterface(rclsid, riid, ppv));
- }
- else
- {
- CALL_LEGACY_API(CorBindToRuntimeEx,
- (LPCWSTR pwszVersion,
- LPCWSTR pwszBuildFlavor,
- DWORD startupFlags,
- REFCLSID rclsid,
- REFIID riid,
- LPVOID* ppv),
- (pwszVersion,
- pwszBuildFlavor,
- startupFlags,
- rclsid,
- riid,
- ppv));
- }
-
- return hr;
- }
-
- // --------------------------------------------------------------------------------------------
- inline
- HRESULT CorBindToRuntimeByCfg(
- IStream* pCfgStream,
- DWORD reserved,
- DWORD startupFlags,
- REFCLSID rclsid,
- REFIID riid,
- LPVOID* ppv)
- {
- HRESULT hr = S_OK;
-
- if (Util::HasNewActivationAPIs())
- {
- // The legacy CorBindToRuntimeByCfg picks up startup flags from both the config stream and
- // application config file if it is present. For simplicity, we ignore the app config here.
- ICLRRuntimeInfo *pInfo = NULL;
- IfHrFailRet(Util::GetCLRRuntimeInfo(
- &pInfo,
- NULL, // exe path
- pCfgStream));
-
- // We're intentionally ignoring the HRESULT return value, since CorBindToRuntimeEx
- // always ignored these flags when a runtime had already been bound, and we need
- // to emulate that behavior for when multiple calls to CorBindToRuntimeEx are made
- // but with different startup flags (ICLRRuntimeInfo::SetDefaultStartupFlags will
- // return E_INVALIDARG in the case that the runtime has already been started with
- // different flags).
- Util::AddStartupFlags(pInfo, NULL, startupFlags, NULL);
-
- IfHrFailRet(pInfo->GetInterface(rclsid, riid, ppv));
- }
- else
- {
- CALL_LEGACY_API(CorBindToRuntimeByCfg,
- (IStream* pCfgStream,
- DWORD reserved,
- DWORD startupFlags,
- REFCLSID rclsid,
- REFIID riid,
- LPVOID* ppv),
- (pCfgStream,
- reserved,
- startupFlags,
- rclsid,
- riid,
- ppv));
- }
-
- return hr;
- }
-
- // --------------------------------------------------------------------------------------------
- inline
- HRESULT CorBindToRuntime(
- LPCWSTR pwszVersion,
- LPCWSTR pwszBuildFlavor,
- REFCLSID rclsid,
- REFIID riid,
- LPVOID* ppv)
- {
- HRESULT hr = S_OK;
-
- if (Util::HasNewActivationAPIs())
- {
- WCHAR wszVersionLocal[512];
- DWORD cchVersionLocal = 512;
- if (pwszVersion != NULL)
- wcsncpy_s(&wszVersionLocal[0], cchVersionLocal, pwszVersion, _TRUNCATE);
-
- ICLRRuntimeInfo *pInfo = NULL;
- IfHrFailRet(Util::GetCLRRuntimeInfo(
- &pInfo,
- NULL, // exe path
- NULL, // config stream
- pwszVersion == NULL ? NULL : &wszVersionLocal[0],
- pwszVersion == NULL ? NULL : &cchVersionLocal));
-
- // CorBindToRuntime has its special default flags
- //
- // We're intentionally ignoring the HRESULT return value, since CorBindToRuntimeEx
- // always ignored these flags when a runtime had already been bound, and we need
- // to emulate that behavior for when multiple calls to CorBindToRuntimeEx are made
- // but with different startup flags (ICLRRuntimeInfo::SetDefaultStartupFlags will
- // return E_INVALIDARG in the case that the runtime has already been started with
- // different flags).
- Util::AddStartupFlags(pInfo, NULL, STARTUP_LOADER_OPTIMIZATION_MULTI_DOMAIN_HOST, NULL);
-
- IfHrFailRet(pInfo->GetInterface(rclsid, riid, ppv));
- }
- else
- {
- CALL_LEGACY_API(CorBindToRuntime,
- (LPCWSTR pwszVersion,
- LPCWSTR pwszBuildFlavor,
- REFCLSID rclsid,
- REFIID riid,
- LPVOID* ppv),
- (pwszVersion,
- pwszBuildFlavor,
- rclsid,
- riid,
- ppv));
- }
-
- return hr;
- }
-
- // --------------------------------------------------------------------------------------------
- inline
- HRESULT CorBindToCurrentRuntime(
- LPCWSTR pwszFileName,
- REFCLSID rclsid,
- REFIID riid,
- LPVOID FAR *ppv)
- {
- HRESULT hr = S_OK;
-
- if (Util::HasNewActivationAPIs())
- {
- ICLRRuntimeInfo *pInfo = NULL;
- IfHrFailRet(Util::GetCLRRuntimeInfo(
- &pInfo,
- pwszFileName));
-
- IfHrFailRet(pInfo->GetInterface(rclsid, riid, ppv));
- }
- else
- {
- CALL_LEGACY_API(CorBindToCurrentRuntime,
- (LPCWSTR pwszFileName,
- REFCLSID rclsid,
- REFIID riid,
- LPVOID FAR *ppv),
- (pwszFileName,
- rclsid,
- riid,
- ppv));
- }
-
- return hr;
- }
-
- // --------------------------------------------------------------------------------------------
- inline
- HRESULT ClrCreateManagedInstance(
- LPCWSTR pTypeName,
- REFIID riid,
- void **ppObject)
- {
- HRESULT hr = S_OK;
-
- if (Util::HasNewActivationAPIs())
- {
- GET_CLRINFO(pInfo);
- HRESULT (STDMETHODCALLTYPE *pfnClrCreateManagedInstance)(LPCWSTR typeName, REFIID riid, void ** ppv) = NULL;
- IfHrFailRet(pInfo->GetProcAddress("ClrCreateManagedInstance", (LPVOID *)&pfnClrCreateManagedInstance));
- IfHrFailRet(pfnClrCreateManagedInstance(pTypeName, riid, ppObject));
- }
- else
- {
- CALL_LEGACY_API(ClrCreateManagedInstance,
- (LPCWSTR pTypeName,
- REFIID riid,
- void **ppObject),
- (pTypeName,
- riid,
- ppObject));
- }
-
- return hr;
- }
-
- // --------------------------------------------------------------------------------------------
- inline
- HRESULT LoadLibraryShim(
- LPCWSTR szDllName,
- LPCWSTR szVersion,
- LPVOID pvReserved,
- HMODULE *phModDll)
- {
- HRESULT hr = S_OK;
-
- if (Util::HasNewActivationAPIs())
- {
- Util::ReleaseHolder<ICLRRuntimeInfo*> hInfo;
- ICLRRuntimeInfo *pInfo = NULL;
-
- // Semantics of LoadLibraryShim is that a non-null version must match exactly.
- if (szVersion != NULL)
- {
- GET_CLRMETAHOST(pMH);
- IfHrFailRet(pMH->GetRuntime(szVersion, IID_ICLRRuntimeInfo, reinterpret_cast<LPVOID*>(&pInfo)));
- hInfo.Assign(pInfo);
- }
- else
- {
- IfHrFailRet(Util::GetCLRRuntimeInfo(&pInfo));
- }
- IfHrFailRet(pInfo->LoadLibrary(szDllName, phModDll));
- }
- else
- {
- CALL_LEGACY_API(LoadLibraryShim,
- (LPCWSTR szDllName,
- LPCWSTR szVersion,
- LPVOID pvReserved,
- HMODULE *phModDll),
- (szDllName,
- szVersion,
- pvReserved,
- phModDll));
- }
-
- return hr;
- }
-
- // --------------------------------------------------------------------------------------------
- inline
- HRESULT CallFunctionShim(
- LPCWSTR szDllName,
- LPCSTR szFunctionName,
- LPVOID lpvArgument1,
- LPVOID lpvArgument2,
- LPCWSTR szVersion,
- LPVOID pvReserved)
- {
- HRESULT hr = S_OK;
-
- if (Util::HasNewActivationAPIs())
- {
- HMODULE hMod = NULL;
- HRESULT (__stdcall * pfn)(LPVOID,LPVOID) = NULL;
-
- // Load library
- IfHrFailRet(LegacyActivationShim::LoadLibraryShim(szDllName, szVersion, pvReserved, &hMod));
-
- // NOTE: Legacy CallFunctionShim does not release HMODULE, leak to maintain compat
- // Util::HMODULEHolder hModHolder(hMod);
-
- // Find function.
- pfn = (HRESULT (__stdcall *)(LPVOID,LPVOID))GetProcAddress(hMod, szFunctionName);
- if (pfn == NULL)
- return HRESULT_FROM_WIN32(GetLastError());
-
- // Call it.
- return pfn(lpvArgument1, lpvArgument2);
- }
- else
- {
- CALL_LEGACY_API(CallFunctionShim,
- (LPCWSTR szDllName,
- LPCSTR szFunctionName,
- LPVOID lpvArgument1,
- LPVOID lpvArgument2,
- LPCWSTR szVersion,
- LPVOID pvReserved),
- (szDllName,
- szFunctionName,
- lpvArgument1,
- lpvArgument2,
- szVersion,
- pvReserved));
- }
-
- return hr;
- }
-
- // --------------------------------------------------------------------------------------------
- inline
- HRESULT GetRealProcAddress(
- LPCSTR pwszProcName,
- VOID **ppv)
- {
- HRESULT hr = S_OK;
-
- if (Util::HasNewActivationAPIs())
- {
- GET_CLRINFO(pInfo);
- IfHrFailRet(pInfo->GetProcAddress(pwszProcName, ppv));
- }
- else
- {
- CALL_LEGACY_API(GetRealProcAddress,
- (LPCSTR pwszProcName,
- VOID **ppv),
- (pwszProcName,
- ppv));
- }
-
- return hr;
- }
-
- // --------------------------------------------------------------------------------------------
- inline
- void CorExitProcess(
- int exitCode)
- {
-#ifndef LEGACY_ACTIVATION_SHIM_DELAY_LOAD
- ::CorExitProcess(exitCode);
-#else
- typedef void __stdcall t_CorExitProcess(
- int exitCode);
-
- Util::MscoreeFunctor<t_CorExitProcess> FN;
- if (FAILED(FN.Init("CorExitProcess")))
- return;
-
- FN()(exitCode);
-#endif
- }
-
-// Define this method only if it is not yet defined as macro (see ndp\clr\src\inc\UtilCode.h).
-#ifndef LoadStringRC
- // --------------------------------------------------------------------------------------------
- inline
- HRESULT LoadStringRC(
- UINT nResourceID,
- __out_ecount(nMax) LPWSTR szBuffer,
- int nMax,
- int fQuiet)
- {
- HRESULT hr = S_OK;
-
- if (Util::HasNewActivationAPIs())
- {
- GET_CLRINFO(pInfo);
- DWORD cchMax = static_cast<DWORD>(nMax);
- IfHrFailRet(pInfo->LoadErrorString(nResourceID, szBuffer, &cchMax, -1));
- }
- else
- {
- CALL_LEGACY_API(LoadStringRC,
- (UINT nResourceID,
- LPWSTR szBuffer,
- int nMax,
- int fQuiet),
- (nResourceID,
- szBuffer,
- nMax,
- fQuiet));
- }
-
- return hr;
- }
-#endif //LoadStringRC
-
-// Define this method only if it is not yet defined as macro (see ndp\clr\src\inc\UtilCode.h).
-#if !defined(LoadStringRCEx) && !defined(FEATURE_CORESYSTEM)
- // --------------------------------------------------------------------------------------------
- inline
- HRESULT LoadStringRCEx(
- LCID lcid,
- UINT nResourceID,
- __out_ecount(nMax) LPWSTR szBuffer,
- int nMax,
- int fQuiet,
- int *pcwchUsed)
- {
- HRESULT hr = S_OK;
-
- if (Util::HasNewActivationAPIs())
- {
- GET_CLRINFO(pInfo);
- DWORD cchUsed = static_cast<DWORD>(nMax);
- IfHrFailRet(pInfo->LoadErrorString(nResourceID, szBuffer, &cchUsed, lcid));
- *pcwchUsed = cchUsed;
- }
- else
- {
- CALL_LEGACY_API(LoadStringRCEx,
- (LCID lcid,
- UINT nResourceID,
- LPWSTR szBuffer,
- int nMax,
- int fQuiet,
- int *pcwchUsed),
- (lcid,
- nResourceID,
- szBuffer,
- nMax,
- fQuiet,
- pcwchUsed));
- }
-
- return hr;
- }
-#endif //LoadStringRCEx
-
- // --------------------------------------------------------------------------------------------
- inline
- HRESULT LockClrVersion(
- FLockClrVersionCallback hostCallback,
- FLockClrVersionCallback *pBeginHostSetup,
- FLockClrVersionCallback *pEndHostSetup)
- {
- HRESULT hr = S_OK;
-
- CALL_LEGACY_API(LockClrVersion,
- (FLockClrVersionCallback hostCallback,
- FLockClrVersionCallback *pBeginHostSetup,
- FLockClrVersionCallback *pEndHostSetup),
- (hostCallback,
- pBeginHostSetup,
- pEndHostSetup));
-
- return hr;
- }
-
- // --------------------------------------------------------------------------------------------
- inline
- HRESULT CreateDebuggingInterfaceFromVersion(
- int nDebuggerVersion,
- LPCWSTR szDebuggeeVersion,
- IUnknown ** ppCordb)
- {
- HRESULT hr = S_OK;
-
- CALL_LEGACY_API(CreateDebuggingInterfaceFromVersion,
- (int nDebuggerVersion,
- LPCWSTR szDebuggeeVersion,
- IUnknown ** ppCordb),
- (nDebuggerVersion,
- szDebuggeeVersion,
- ppCordb));
-
- return hr;
- }
-
- // --------------------------------------------------------------------------------------------
- inline
- HRESULT GetVersionFromProcess(
- __in HANDLE hProcess,
- __out_ecount(cchBuffer) LPWSTR pVersion,
- __in DWORD cchBuffer,
- __out DWORD *pdwLength)
- {
- HRESULT hr = S_OK;
-
- CALL_LEGACY_API(GetVersionFromProcess,
- (HANDLE hProcess,
- LPWSTR pVersion,
- DWORD cchBuffer,
- DWORD *pdwLength),
- (hProcess,
- pVersion,
- cchBuffer,
- pdwLength));
-
- return hr;
- }
-
- // --------------------------------------------------------------------------------------------
-// CoInitializeEE is declared in cor.h, define it only if explicitly requested
-#ifdef LEGACY_ACTIVATION_SHIM_DEFINE_CoInitializeEE
- inline
- HRESULT CoInitializeEE(DWORD flags)
- {
- HRESULT hr = S_OK;
-
- if (Util::HasNewActivationAPIs())
- {
- GET_CLRINFO(pInfo);
- HRESULT (* pfnCoInitializeEE)(DWORD);
- IfHrFailRet(pInfo->GetProcAddress("CoInitializeEE", (LPVOID *)&pfnCoInitializeEE));
- return (*pfnCoInitializeEE)(flags);
- }
- else
- {
- CALL_LEGACY_API(CoInitializeEE,
- (DWORD flags),
- (flags));
- }
-
- return hr;
- }
-
- inline
- VOID CoUninitializeEE(BOOL flags)
- {
- if (Util::HasNewActivationAPIs())
- {
- ICLRRuntimeInfo *pInfo = NULL;
- if (FAILED(Util::GetCLRRuntimeInfo(&pInfo)))
- return;
-
- VOID (* pfnCoUninitializeEE)(BOOL);
- if (FAILED(pInfo->GetProcAddress("CoUninitializeEE", (LPVOID *)&pfnCoUninitializeEE)))
- return;
-
- (*pfnCoUninitializeEE)(flags);
- }
- else
- {
- CALL_LEGACY_API_VOIDRET(CoUninitializeEE,
- (BOOL flags),
- (flags));
- }
- }
-
- inline
- HRESULT CoInitializeCor(DWORD flags)
- {
- HRESULT hr = S_OK;
-
- if (Util::HasNewActivationAPIs())
- {
- GET_CLRINFO(pInfo);
- HRESULT (* pfnCoInitializeCor)(DWORD);
- IfHrFailRet(pInfo->GetProcAddress("CoInitializeCor", (LPVOID *)&pfnCoInitializeCor));
- return (*pfnCoInitializeCor)(flags);
- }
- else
- {
- CALL_LEGACY_API(CoInitializeCor,
- (DWORD flags),
- (flags));
- }
-
- return hr;
- }
-
- inline
- VOID CoUninitializeCor()
- {
- if (Util::HasNewActivationAPIs())
- {
- ICLRRuntimeInfo *pInfo = NULL;
- if (FAILED(Util::GetCLRRuntimeInfo(&pInfo)))
- return;
-
- VOID (* pfnCoUninitializeCor)();
- if (FAILED(pInfo->GetProcAddress("CoUninitializeCor", (LPVOID *)&pfnCoUninitializeCor)))
- return;
-
- (*pfnCoUninitializeCor)();
- }
- else
- {
- CALL_LEGACY_API_VOIDRET(CoUninitializeCor,
- (VOID),
- ());
- }
- }
-
-#endif //LEGACY_ACTIVATION_SHIM_DEFINE_CoInitializeEE
-
- // --------------------------------------------------------------------------------------------
-// CoEEShutDownCOM is declared in cor.h, define it only if explicitly requested
-#ifdef LEGACY_ACTIVATION_SHIM_DEFINE_CoEEShutDownCOM
- inline
- void CoEEShutDownCOM()
- {
- if (Util::HasNewActivationAPIs())
- {
- ICLRRuntimeInfo *pInfo = NULL;
- IfHrFailRetVOID(Util::GetCLRRuntimeInfo(&pInfo));
- void (* pfnCoEEShutDownCOM)();
- IfHrFailRetVOID(pInfo->GetProcAddress("CoEEShutDownCOM", (LPVOID *)&pfnCoEEShutDownCOM));
- (*pfnCoEEShutDownCOM)();
- }
- else
- {
- CALL_LEGACY_API_VOIDRET(CoEEShutDownCOM,
- (),
- ());
- }
-
- return;
- }
-#endif //LEGACY_ACTIVATION_SHIM_DEFINE_CoEEShutDownCOM
-
- // ---StrongName Function Helpers--------------------------------------------------------------
-#if !defined(LEGACY_ACTIVATION_SHIM_DELAY_LOAD) && defined(__STRONG_NAME_H)
-#define LEGACY_STRONGNAME_API_PASS_THROUGH(_name, _ret_type, _ret_value, _sig, _args) \
- LEGACY_API_PASS_THROUGH_STATIC(_name, _ret_type, _ret_value, _sig, _args)
-#define LEGACY_STRONGNAME_API_PASS_THROUGH_VOIDRET(_name, _sig, _args) \
- LEGACY_API_PASS_THROUGH_STATIC_VOIDRET(_name, _sig, _args)
-#else //defined(LEGACY_ACTIVATION_SHIM_DELAY_LOAD) || !defined(__STRONG_NAME_H)
-#define LEGACY_STRONGNAME_API_PASS_THROUGH(_name, _ret_type, _ret_value, _sig, _args) \
- LEGACY_API_PASS_THROUGH_DELAYLOAD(_name, _ret_type, _ret_value, _sig, _args)
-#define LEGACY_STRONGNAME_API_PASS_THROUGH_VOIDRET(_name, _sig, _args) \
- LEGACY_API_PASS_THROUGH_DELAYLOAD_VOIDRET(_name, _sig, _args)
-#endif //defined(LEGACY_ACTIVATION_SHIM_DELAY_LOAD) || !defined(__STRONG_NAME_H)
-
-// Defines a method that just delegates a call to the right runtime, this one is for SN APIs that
-// return HRESULT.
-#define PASS_THROUGH_IMPL_HRESULT(_name, _signature, _args) \
- inline \
- HRESULT _name##_signature \
- { \
- HRESULT hr = S_OK; \
- if (Util::HasNewActivationAPIs()) \
- { \
- ICLRStrongName *pSN = NULL; \
- IfHrFailRet(Util::GetCLRStrongName(&pSN)); \
- IfHrFailRet(pSN->_name _args); \
- } \
- else \
- { \
- LEGACY_STRONGNAME_API_PASS_THROUGH( \
- _name, HRESULT, hr, _signature, _args); \
- IfHrFailRet(hr); \
- } \
- return hr; \
- }
-
-// Defines a method that just delegates a call to the right runtime, this one is for SN APIs that
-// return BOOL.
-#define PASS_THROUGH_IMPL_BOOLEAN(_name, _signature, _args) \
- inline \
- BOOL _name##_signature \
- { \
- HRESULT hr = S_OK; \
- if (Util::HasNewActivationAPIs()) \
- { \
- ICLRStrongName *pSN = NULL; \
- IfHrFailRetFALSE(Util::GetCLRStrongName(&pSN)); \
- IfHrFailRetFALSE(pSN->_name _args); \
- return TRUE; \
- } \
- else \
- { \
- BOOL fResult = TRUE; \
- LEGACY_STRONGNAME_API_PASS_THROUGH( \
- _name, BOOL, fResult, _signature, _args); \
- IfHrFailRetFALSE(hr); \
- return fResult; \
- } \
- }
-
-// Defines a method that just delegates a call to the right runtime, this one is for SN APIs that
-// return VOID.
-#define PASS_THROUGH_IMPL_VOID(_name, _signature, _args) \
- inline \
- VOID _name##_signature \
- { \
- HRESULT hr = S_OK; \
- if (Util::HasNewActivationAPIs()) \
- { \
- ICLRStrongName *pSN = NULL; \
- IfHrFailRetVOID(Util::GetCLRStrongName(&pSN)); \
- IfHrFailRetVOID(pSN->_name _args); \
- return; \
- } \
- else \
- { \
- LEGACY_STRONGNAME_API_PASS_THROUGH_VOIDRET( \
- _name, _signature, _args); \
- IfHrFailRetVOID(hr); \
- return; \
- } \
- }
-
- // ---StrongName functions---------------------------------------------------------------------
-
-PASS_THROUGH_IMPL_HRESULT(GetHashFromAssemblyFile,
- (LPCSTR pszFilePath, unsigned int *piHashAlg, BYTE *pbHash, DWORD cchHash, DWORD *pchHash),
- (pszFilePath, piHashAlg, pbHash, cchHash, pchHash));
-
-PASS_THROUGH_IMPL_HRESULT(GetHashFromAssemblyFileW,
- (LPCWSTR pwzFilePath, unsigned int *piHashAlg, BYTE *pbHash, DWORD cchHash, DWORD *pchHash),
- (pwzFilePath, piHashAlg, pbHash, cchHash, pchHash));
-
-PASS_THROUGH_IMPL_HRESULT(GetHashFromBlob,
- (BYTE *pbBlob, DWORD cchBlob, unsigned int *piHashAlg, BYTE *pbHash, DWORD cchHash, DWORD *pchHash),
- (pbBlob, cchBlob, piHashAlg, pbHash, cchHash, pchHash));
-
-PASS_THROUGH_IMPL_HRESULT(GetHashFromFile,
- (LPCSTR pszFilePath, unsigned int *piHashAlg, BYTE *pbHash, DWORD cchHash, DWORD *pchHash),
- (pszFilePath, piHashAlg, pbHash, cchHash, pchHash));
-
-PASS_THROUGH_IMPL_HRESULT(GetHashFromFileW,
- (LPCWSTR pwzFilePath, unsigned int *piHashAlg, BYTE *pbHash, DWORD cchHash, DWORD *pchHash),
- (pwzFilePath, piHashAlg, pbHash, cchHash, pchHash));
-
-PASS_THROUGH_IMPL_HRESULT(GetHashFromHandle,
- (HANDLE hFile, unsigned int *piHashAlg, BYTE *pbHash, DWORD cchHash, DWORD *pchHash),
- (hFile, piHashAlg, pbHash, cchHash, pchHash));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameCompareAssemblies,
- (LPCWSTR pwzAssembly1, LPCWSTR pwzAssembly2, DWORD *pdwResult),
- (pwzAssembly1, pwzAssembly2, pdwResult));
-
-PASS_THROUGH_IMPL_VOID(StrongNameFreeBuffer,
- (BYTE *pbMemory),
- (pbMemory));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameGetBlob,
- (LPCWSTR pwzFilePath, BYTE *pbBlob, DWORD *pcbBlob),
- (pwzFilePath, pbBlob, pcbBlob));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameGetBlobFromImage,
- (BYTE *pbBase, DWORD dwLength, BYTE *pbBlob, DWORD *pcbBlob),
- (pbBase, dwLength, pbBlob, pcbBlob));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameGetPublicKey,
- (LPCWSTR pwzKeyContainer, BYTE *pbKeyBlob, ULONG cbKeyBlob, BYTE **ppbPublicKeyBlob, ULONG *pcbPublicKeyBlob),
- (pwzKeyContainer, pbKeyBlob, cbKeyBlob, ppbPublicKeyBlob, pcbPublicKeyBlob));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameHashSize,
- (ULONG ulHashAlg, DWORD *pcbSize),
- (ulHashAlg, pcbSize));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameKeyDelete,
- (LPCWSTR pwzKeyContainer),
- (pwzKeyContainer));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameKeyGen,
- (LPCWSTR pwzKeyContainer, DWORD dwFlags, BYTE **ppbKeyBlob, ULONG *pcbKeyBlob),
- (pwzKeyContainer, dwFlags, ppbKeyBlob, pcbKeyBlob));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameKeyGenEx,
- (LPCWSTR pwzKeyContainer, DWORD dwFlags, DWORD dwKeySize, BYTE **ppbKeyBlob, ULONG *pcbKeyBlob),
- (pwzKeyContainer, dwFlags, dwKeySize, ppbKeyBlob, pcbKeyBlob));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameKeyInstall,
- (LPCWSTR pwzKeyContainer, BYTE *pbKeyBlob, ULONG cbKeyBlob),
- (pwzKeyContainer, pbKeyBlob, cbKeyBlob));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameSignatureGeneration,
- (LPCWSTR pwzFilePath, LPCWSTR pwzKeyContainer, BYTE *pbKeyBlob, ULONG cbKeyBlob, BYTE **ppbSignatureBlob, ULONG *pcbSignatureBlob),
- (pwzFilePath, pwzKeyContainer, pbKeyBlob, cbKeyBlob, ppbSignatureBlob, pcbSignatureBlob));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameSignatureGenerationEx,
- (LPCWSTR wszFilePath, LPCWSTR wszKeyContainer, BYTE *pbKeyBlob, ULONG cbKeyBlob, BYTE **ppbSignatureBlob, ULONG *pcbSignatureBlob, DWORD dwFlags),
- (wszFilePath, wszKeyContainer, pbKeyBlob, cbKeyBlob, ppbSignatureBlob, pcbSignatureBlob, dwFlags));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameSignatureSize,
- (BYTE *pbPublicKeyBlob, ULONG cbPublicKeyBlob, DWORD *pcbSize),
- (pbPublicKeyBlob, cbPublicKeyBlob, pcbSize));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameSignatureVerification,
- (LPCWSTR pwzFilePath, DWORD dwInFlags, DWORD *pdwOutFlags),
- (pwzFilePath, dwInFlags, pdwOutFlags));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameSignatureVerificationEx,
- (LPCWSTR pwzFilePath, BOOLEAN fForceVerification, BOOLEAN *pfWasVerified),
- (pwzFilePath, fForceVerification, pfWasVerified));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameSignatureVerificationFromImage,
- (BYTE *pbBase, DWORD dwLength, DWORD dwInFlags, DWORD *pdwOutFlags),
- (pbBase, dwLength, dwInFlags, pdwOutFlags));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameTokenFromAssembly,
- (LPCWSTR pwzFilePath, BYTE **ppbStrongNameToken, ULONG *pcbStrongNameToken),
- (pwzFilePath, ppbStrongNameToken, pcbStrongNameToken));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameTokenFromAssemblyEx,
- (LPCWSTR pwzFilePath, BYTE **ppbStrongNameToken, ULONG *pcbStrongNameToken, BYTE **ppbPublicKeyBlob, ULONG *pcbPublicKeyBlob),
- (pwzFilePath, ppbStrongNameToken, pcbStrongNameToken, ppbPublicKeyBlob, pcbPublicKeyBlob));
-
-PASS_THROUGH_IMPL_BOOLEAN(StrongNameTokenFromPublicKey,
- (BYTE *pbPublicKeyBlob, ULONG cbPublicKeyBlob, BYTE **ppbStrongNameToken, ULONG *pcbStrongNameToken),
- (pbPublicKeyBlob, cbPublicKeyBlob, ppbStrongNameToken, pcbStrongNameToken));
-
-#undef PASS_THROUGH_IMPL_HRESULT
-#undef PASS_THROUGH_IMPL_BOOLEAN
-#undef PASS_THROUGH_IMPL_VOID
-
-// Defines a method that just delegates a call to the right runtime, this one is for SN APIs that
-// return BOOLEAN.
-#define WRAP_HRESULT_IMPL_BOOLEAN(_WrapperName, _name, _signature, _args) \
- inline \
- HRESULT _WrapperName##_signature \
- { \
- HRESULT hr = S_OK; \
- if (Util::HasNewActivationAPIs()) \
- { \
- ICLRStrongName *pSN = NULL; \
- IfHrFailRet(Util::GetCLRStrongName(&pSN)); \
- return pSN->_name _args; \
- } \
- else \
- { \
- typedef BOOL __stdcall t_FN _signature; \
- Util::MscoreeFunctor<t_FN> FN; \
- IfHrFailRet(FN.Init(#_name)); \
- if ((FN() _args)) \
- { \
- return S_OK; \
- } \
- else \
- { /*@TODO: Static bind version, if necessary*/ \
- typedef DWORD __stdcall t_FNStrongNameErrorInfo(void); \
- Util::MscoreeFunctor<t_FNStrongNameErrorInfo> FNStrongNameErrorInfo; \
- IfHrFailRet(FNStrongNameErrorInfo.Init("StrongNameErrorInfo")); \
- HRESULT hrResult = (HRESULT)FNStrongNameErrorInfo() (); \
- if (SUCCEEDED(hrResult)) \
- { \
- hrResult = E_FAIL; \
- } \
- return hrResult; \
- } \
- } \
- }
-
-WRAP_HRESULT_IMPL_BOOLEAN(StrongNameHashSize_HRESULT,
- StrongNameHashSize,
- (ULONG ulHashAlg, DWORD *pcbSize),
- (ulHashAlg, pcbSize));
-
-WRAP_HRESULT_IMPL_BOOLEAN(StrongNameTokenFromPublicKey_HRESULT,
- StrongNameTokenFromPublicKey,
- (BYTE *pbPublicKeyBlob, ULONG cbPublicKeyBlob, BYTE **ppbStrongNameToken, ULONG *pcbStrongNameToken),
- (pbPublicKeyBlob, cbPublicKeyBlob, ppbStrongNameToken, pcbStrongNameToken));
-
-WRAP_HRESULT_IMPL_BOOLEAN(StrongNameSignatureSize_HRESULT,
- StrongNameSignatureSize,
- (BYTE *pbPublicKeyBlob, ULONG cbPublicKeyBlob, DWORD *pcbSize),
- (pbPublicKeyBlob, cbPublicKeyBlob, pcbSize));
-
-WRAP_HRESULT_IMPL_BOOLEAN(StrongNameGetPublicKey_HRESULT,
- StrongNameGetPublicKey,
- (LPCWSTR pwzKeyContainer, BYTE *pbKeyBlob, ULONG cbKeyBlob, BYTE **ppbPublicKeyBlob, ULONG *pcbPublicKeyBlob),
- (pwzKeyContainer, pbKeyBlob, cbKeyBlob, ppbPublicKeyBlob, pcbPublicKeyBlob));
-
-WRAP_HRESULT_IMPL_BOOLEAN(StrongNameKeyInstall_HRESULT,
- StrongNameKeyInstall,
- (LPCWSTR pwzKeyContainer, BYTE *pbKeyBlob, ULONG cbKeyBlob),
- (pwzKeyContainer, pbKeyBlob, cbKeyBlob));
-
-WRAP_HRESULT_IMPL_BOOLEAN(StrongNameSignatureGeneration_HRESULT,
- StrongNameSignatureGeneration,
- (LPCWSTR pwzFilePath, LPCWSTR pwzKeyContainer, BYTE *pbKeyBlob, ULONG cbKeyBlob, BYTE **ppbSignatureBlob, ULONG *pcbSignatureBlob),
- (pwzFilePath, pwzKeyContainer, pbKeyBlob, cbKeyBlob, ppbSignatureBlob, pcbSignatureBlob));
-
-WRAP_HRESULT_IMPL_BOOLEAN(StrongNameKeyGen_HRESULT,
- StrongNameKeyGen,
- (LPCWSTR pwzKeyContainer, DWORD dwFlags, BYTE **ppbKeyBlob, ULONG *pcbKeyBlob),
- (pwzKeyContainer, dwFlags, ppbKeyBlob, pcbKeyBlob));
-
-#undef WRAP_HRESULT_IMPL_BOOLEAN
-
-// Defines a method that just delegates a call to the right runtime, this one is for ICLRStrongName2
-// APIs that return BOOLEAN.
-#define WRAP_HRESULT_IMPL_BOOLEAN(_WrapperName, _name, _signature, _args) \
- inline \
- HRESULT _WrapperName##_signature \
- { \
- HRESULT hr = S_OK; \
- if (Util::HasNewActivationAPIs()) \
- { \
- ICLRStrongName2 *pSN = NULL; \
- IfHrFailRet(Util::GetCLRStrongName2(&pSN)); \
- return pSN->_name _args; \
- } \
- else \
- { \
- return E_FAIL; \
- } \
- }
-
-
-WRAP_HRESULT_IMPL_BOOLEAN(StrongNameGetPublicKeyEx_HRESULT,
- StrongNameGetPublicKeyEx,
- (LPCWSTR pwzKeyContainer, BYTE *pbKeyBlob, ULONG cbKeyBlob, BYTE **ppbPublicKeyBlob, ULONG *pcbPublicKeyBlob, ULONG uHashAlgId, ULONG uReserved),
- (pwzKeyContainer, pbKeyBlob, cbKeyBlob, ppbPublicKeyBlob, pcbPublicKeyBlob, uHashAlgId, uReserved));
-
-#undef WRAP_HRESULT_IMPL_BOOLEAN
-
- inline
- HRESULT ClrCoCreateInstance(
- REFCLSID rclsid,
- LPUNKNOWN pUnkOuter,
- DWORD dwClsContext,
- REFIID riid,
- LPVOID * ppv)
- {
- HRESULT hr = S_OK;
-
- if (Util::HasNewActivationAPIs() /*&& Util::IsCLSIDHostedByClr(rclsid)*/)
- {
- GET_CLRINFO(pInfo);
- IfHrFailRet(pInfo->GetInterface(rclsid, riid, ppv));
- }
- else
- {
- IfHrFailRet(::CoCreateInstance(rclsid, pUnkOuter, dwClsContext, riid, ppv));
- }
-
- return hr;
- }
-}; // namespace LegacyActivationShim
-#pragma warning(pop) // Revert C4996 status
-
-#undef LEGACY_API_PASS_THROUGH_STATIC
-#undef LEGACY_API_PASS_THROUGH_STATIC_VOIDRET
-#undef LEGACY_API_PASS_THROUGH_DELAYLOAD
-#undef LEGACY_API_PASS_THROUGH_DELAYLOAD_VOIDRET
-#undef CALL_LEGACY_API
-#undef LEGACY_STRONGNAME_API_PASS_THROUGH
-#undef LEGACY_STRONGNAME_API_PASS_THROUGH_VOIDRET
-
-#undef LEGACY_ACTIVATION_SHIM_DEFAULT_PRODUCT_VER_HELPER_L
-#undef LEGACY_ACTIVATION_SHIM_DEFAULT_PRODUCT_VER_STR_L
-
-#pragma pop_macro("IfHrFailRetVOID")
-#pragma pop_macro("IfHrFailRetFALSE")
-#pragma pop_macro("IfHrFailRet")
-
-#ifdef _MANAGED
-// We are compiling Managed C++, restore previous managed/native status from the stack
-#pragma managed(pop)
-#endif //_MANAGED
-
-#pragma warning(pop)
-
-#endif // __LEGACYACTIVATIONSHIM_H__
diff --git a/src/inc/legacyactivationshimdelayload.h b/src/inc/legacyactivationshimdelayload.h
deleted file mode 100644
index 8e77ff2ce3..0000000000
--- a/src/inc/legacyactivationshimdelayload.h
+++ /dev/null
@@ -1,13 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-//
-
-#ifndef __LEGACYACTIVATIONSHIMDELAYLOAD_H__
-#define __LEGACYACTIVATIONSHIMDELAYLOAD_H__
-
-#define LEGACY_ACTIVATION_SHIM_DELAY_LOAD
-#include <legacyactivationshim.h>
-#undef LEGACY_ACTIVATION_SHIM_DELAY_LOAD
-
-#endif //__LEGACYACTIVATIONSHIMDELAYLOAD_H__
diff --git a/src/inc/loglf.h b/src/inc/loglf.h
index ea121cda7c..e7fbd519d9 100644
--- a/src/inc/loglf.h
+++ b/src/inc/loglf.h
@@ -4,39 +4,39 @@
// The code in sos.DumpLog depends on the first 32 facility codes
// being bit flags sorted in incresing order.
-DEFINE_LOG_FACILITY(LF_GC ,0x00000001)
-DEFINE_LOG_FACILITY(LF_GCINFO ,0x00000002)
-DEFINE_LOG_FACILITY(LF_STUBS ,0x00000004)
-DEFINE_LOG_FACILITY(LF_JIT ,0x00000008)
-DEFINE_LOG_FACILITY(LF_LOADER ,0x00000010)
-DEFINE_LOG_FACILITY(LF_METADATA ,0x00000020)
-DEFINE_LOG_FACILITY(LF_SYNC ,0x00000040)
-DEFINE_LOG_FACILITY(LF_EEMEM ,0x00000080)
-DEFINE_LOG_FACILITY(LF_GCALLOC ,0x00000100)
-DEFINE_LOG_FACILITY(LF_CORDB ,0x00000200)
-DEFINE_LOG_FACILITY(LF_CLASSLOADER ,0x00000400)
-DEFINE_LOG_FACILITY(LF_CORPROF ,0x00000800)
-DEFINE_LOG_FACILITY(LF_REMOTING ,0x00001000)
-DEFINE_LOG_FACILITY(LF_DBGALLOC ,0x00002000)
-DEFINE_LOG_FACILITY(LF_EH ,0x00004000)
-DEFINE_LOG_FACILITY(LF_ENC ,0x00008000)
-DEFINE_LOG_FACILITY(LF_ASSERT ,0x00010000)
-DEFINE_LOG_FACILITY(LF_VERIFIER ,0x00020000)
-DEFINE_LOG_FACILITY(LF_THREADPOOL ,0x00040000)
-DEFINE_LOG_FACILITY(LF_GCROOTS ,0x00080000)
-DEFINE_LOG_FACILITY(LF_INTEROP ,0x00100000)
-DEFINE_LOG_FACILITY(LF_MARSHALER ,0x00200000)
-DEFINE_LOG_FACILITY(LF_IJW ,0x00400000)
-DEFINE_LOG_FACILITY(LF_ZAP ,0x00800000)
-DEFINE_LOG_FACILITY(LF_STARTUP ,0x01000000) // Log startupa and shutdown failures
-DEFINE_LOG_FACILITY(LF_APPDOMAIN ,0x02000000)
-DEFINE_LOG_FACILITY(LF_CODESHARING ,0x04000000)
-DEFINE_LOG_FACILITY(LF_STORE ,0x08000000)
-DEFINE_LOG_FACILITY(LF_SECURITY ,0x10000000)
-DEFINE_LOG_FACILITY(LF_LOCKS ,0x20000000)
-DEFINE_LOG_FACILITY(LF_BCL ,0x40000000)
-// LF_ALWAYS 0x80000000 // make certain you don't try to use this bit for a real facility
-// LF_ALL 0xFFFFFFFF
+DEFINE_LOG_FACILITY(LF_GC ,0x00000001)
+DEFINE_LOG_FACILITY(LF_GCINFO ,0x00000002)
+DEFINE_LOG_FACILITY(LF_STUBS ,0x00000004)
+DEFINE_LOG_FACILITY(LF_JIT ,0x00000008)
+DEFINE_LOG_FACILITY(LF_LOADER ,0x00000010)
+DEFINE_LOG_FACILITY(LF_METADATA ,0x00000020)
+DEFINE_LOG_FACILITY(LF_SYNC ,0x00000040)
+DEFINE_LOG_FACILITY(LF_EEMEM ,0x00000080)
+DEFINE_LOG_FACILITY(LF_GCALLOC ,0x00000100)
+DEFINE_LOG_FACILITY(LF_CORDB ,0x00000200)
+DEFINE_LOG_FACILITY(LF_CLASSLOADER ,0x00000400)
+DEFINE_LOG_FACILITY(LF_CORPROF ,0x00000800)
+DEFINE_LOG_FACILITY(LF_REMOTING ,0x00001000)
+DEFINE_LOG_FACILITY(LF_DBGALLOC ,0x00002000)
+DEFINE_LOG_FACILITY(LF_EH ,0x00004000)
+DEFINE_LOG_FACILITY(LF_ENC ,0x00008000)
+DEFINE_LOG_FACILITY(LF_ASSERT ,0x00010000)
+DEFINE_LOG_FACILITY(LF_VERIFIER ,0x00020000)
+DEFINE_LOG_FACILITY(LF_THREADPOOL ,0x00040000)
+DEFINE_LOG_FACILITY(LF_GCROOTS ,0x00080000)
+DEFINE_LOG_FACILITY(LF_INTEROP ,0x00100000)
+DEFINE_LOG_FACILITY(LF_MARSHALER ,0x00200000)
+DEFINE_LOG_FACILITY(LF_TIEREDCOMPILATION ,0x00400000) // This used to be IJW, but now repurposed for tiered compilation
+DEFINE_LOG_FACILITY(LF_ZAP ,0x00800000)
+DEFINE_LOG_FACILITY(LF_STARTUP ,0x01000000) // Log startupa and shutdown failures
+DEFINE_LOG_FACILITY(LF_APPDOMAIN ,0x02000000)
+DEFINE_LOG_FACILITY(LF_CODESHARING ,0x04000000)
+DEFINE_LOG_FACILITY(LF_STORE ,0x08000000)
+DEFINE_LOG_FACILITY(LF_SECURITY ,0x10000000)
+DEFINE_LOG_FACILITY(LF_LOCKS ,0x20000000)
+DEFINE_LOG_FACILITY(LF_BCL ,0x40000000)
+// LF_ALWAYS 0x80000000 // make certain you don't try to use this bit for a real facility
+// LF_ALL 0xFFFFFFFF
//
#undef DEFINE_LOG_FACILITY
diff --git a/src/inc/longfilepathwrappers.h b/src/inc/longfilepathwrappers.h
index a0ffe38da5..3bb9166990 100644
--- a/src/inc/longfilepathwrappers.h
+++ b/src/inc/longfilepathwrappers.h
@@ -152,120 +152,5 @@ DWORD WINAPI GetEnvironmentVariableWrapper(
BOOL PAL_GetPALDirectoryWrapper(SString& pbuffer);
-#ifndef FEATURE_CORECLR
-//Temporarily providing direct OS Calls Till All of the Desktop CLR start using the above format
-inline DWORD
-SearchPathWrapper(
- _In_opt_ LPCWSTR lpPath,
- _In_ LPCWSTR lpFileName,
- _In_opt_ LPCWSTR lpExtension,
- _In_ BOOL getPath,
- _Out_ LPWSTR lpBuffer,
- _Out_opt_ LPWSTR * lpFilePart
- )
-{
- return SearchPathW(
- lpPath,
- lpFileName,
- lpExtension,
- getPath,
- lpBuffer,
- lpFilePart
- );
-}
-
-
-inline DWORD
-GetShortPathNameWrapper(
- _In_ LPCWSTR lpszLongPath,
- _Out_ LPWSTR lpszShortPath,
- _In_ DWORD cchBuffer
- )
-{
- return GetShortPathNameW(
- lpszLongPath,
- lpszShortPath,
- cchBuffer
- );
-}
-
-inline DWORD
-GetLongPathNameWrapper(
- _In_ LPCWSTR lpszShortPath,
- _Out_ LPWSTR lpszLongPath,
- _In_ DWORD cchBuffer
- )
-{
- return GetLongPathNameW(
- lpszShortPath,
- lpszLongPath,
- cchBuffer
- );
-}
-
-inline UINT GetTempFileNameWrapper(
- _In_ LPCWSTR lpPathName,
- _In_ LPCWSTR lpPrefixString,
- _In_ UINT uUnique,
- _Out_ LPWSTR lpTempFileName
- )
-{
- return GetTempFileNameW(
- lpPathName,
- lpPrefixString,
- uUnique,
- lpTempFileName
- );
-}
-
-inline DWORD GetTempPathWrapper(
- _In_ DWORD nBufferLength,
- _Out_ LPWSTR lpBuffer
- )
-{
- return GetTempPathW(
- nBufferLength,
- lpBuffer
- );
-}
-
-inline DWORD GetCurrentDirectoryWrapper(
- _In_ DWORD nBufferLength,
- _Out_ LPWSTR lpBuffer
- )
-{
- return GetCurrentDirectoryW(
- nBufferLength,
- lpBuffer
- );
-}
-
-inline DWORD
-GetModuleFileNameWrapper(
- _In_opt_ HMODULE hModule,
- _Out_ LPWSTR lpFilename,
- _In_ DWORD nSize
- )
-{
- return GetModuleFileNameW(
- hModule,
- lpFilename,
- nSize
- );
-}
-
-inline DWORD GetEnvironmentVariableWrapper(
- _In_opt_ LPCWSTR lpName,
- _Out_opt_ LPWSTR lpBuffer,
- _In_ DWORD nSize
- )
-{
- return GetEnvironmentVariableW(
- lpName,
- lpBuffer,
- nSize
- );
-}
-#endif //FEATURE_CORECLR
#endif //_WIN_PATH_APIS_WRAPPER_
diff --git a/src/inc/metadatatracker.h b/src/inc/metadatatracker.h
index 93ecaab983..00aa56afae 100644
--- a/src/inc/metadatatracker.h
+++ b/src/inc/metadatatracker.h
@@ -5,7 +5,7 @@
#ifndef _METADATATRACKER_H_
#define _METADATATRACKER_H_
-#if defined(FEATURE_PREJIT) && (!defined(FEATURE_CORECLR) || defined(FEATURE_WINDOWSPHONE))
+#if defined(FEATURE_PREJIT) && defined(FEATURE_WINDOWSPHONE)
#define METADATATRACKER_DATA 1
#if !defined(DACCESS_COMPILE)
diff --git a/src/inc/mscoruef.idl b/src/inc/mscoruef.idl
deleted file mode 100644
index 4ed554f544..0000000000
--- a/src/inc/mscoruef.idl
+++ /dev/null
@@ -1,117 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-//
-
-//
-/**************************************************************************************
- ** **
- ** Mscoruef.idl - interface definitions for internal UEF chain management. **
- ** **
- **************************************************************************************/
-
-//
-// Interface descriptions
-//
-import "unknwn.idl";
-
-cpp_quote("#ifdef FEATURE_UEF_CHAINMANAGER")
-
-// IID IUEFManager : uuid(F4D25DF3-E9B3-439c-8B2B-C814E36F9404)
-cpp_quote("EXTERN_GUID(IID_IUEFManager, 0xf4d25df3, 0xe9b3, 0x439c, 0x8b, 0x2b, 0xc8, 0x14, 0xe3, 0x6f, 0x94, 0x4);")
-
-// IID IWatsonSxSManager :uuid(A269593A-51E2-46bf-B914-8DCC5C39B5A5)
-cpp_quote("EXTERN_GUID(IID_IWatsonSxSManager, 0xa269593a, 0x51e2, 0x46bf, 0xb9, 0x14, 0x8d, 0xcc, 0x5c, 0x39, 0xb5, 0xa5);")
-
-cpp_quote("#ifdef __midl")
-
-#define EXCEPTION_MAXIMUM_PARAMETERS 15
-
-typedef struct _EXCEPTION_RECORD {
- DWORD ExceptionCode;
- DWORD ExceptionFlags;
- struct _EXCEPTION_RECORD *ExceptionRecord;
- PVOID ExceptionAddress;
- DWORD NumberParameters;
- ULONG_PTR ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
-} EXCEPTION_RECORD, *PEXCEPTION_RECORD;
-
-typedef struct _EXCEPTION_POINTERS {
- PEXCEPTION_RECORD ExceptionRecord;
- PVOID ContextRecord; // not using PCONTEXT here to avoid pulling extra definitions into this file
-} EXCEPTION_POINTERS, *PEXCEPTION_POINTERS, *LPEXCEPTION_POINTERS;
-
-typedef LONG (__stdcall *PTOP_LEVEL_EXCEPTION_FILTER)(
- struct _EXCEPTION_POINTERS * pExceptionPointers);
-
-typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER;
-
-cpp_quote("#endif // __midl")
-
-typedef BOOL (__stdcall * IsExceptionFromManagedCodeFnPtr)(EXCEPTION_RECORD * pExceptionRecord);
-
-//*****************************************************************************
-// Interface for Watson SxS management to the VM.
-//*****************************************************************************
-[
- uuid(A269593A-51E2-46bf-B914-8DCC5C39B5A5),
- helpstring("CLR Watson SxS Management Interface"),
- pointer_default(unique),
- local
-]
-interface IWatsonSxSManager : IUnknown
-{
- // Used to register an exception claiming callback
- BOOL RegisterExceptionClaimingCallback(
- [in] IsExceptionFromManagedCodeFnPtr pCallback);
-
- // Used to unregister an exception claiming callback
- BOOL UnregisterExceptionClaimingCallback(
- [in] IsExceptionFromManagedCodeFnPtr pCallback);
-
- // Used to determine if the exception pointed by pExceptionRecord was thrown by a registered runtime
- BOOL IsExceptionClaimed(
- [in] EXCEPTION_RECORD * pExceptionRecord);
-
- // Used to check if Watson has been triggered
- BOOL HasWatsonBeenTriggered(void);
-
- // Used to bestow the permission to report Watson to only one of its callers
- BOOL IsCurrentRuntimeAllowedToReportWatson(void);
-
- // Used to wait for the Watson SxS completion event
- BOOL WaitForWatsonSxSCompletionEvent(void);
-
- // Used to signal Watson SxS completion event
- BOOL SignalWatsonSxSCompletionEvent(void);
-};
-
-//*****************************************************************************
-// Interface for UEF chain management to the VM.
-//*****************************************************************************
-[
- uuid(F4D25DF3-E9B3-439c-8B2B-C814E36F9404),
- helpstring("CLR UEF Chain Management Interface"),
- pointer_default(unique),
- local
-]
-interface IUEFManager : IUnknown
-{
- // Used to register the function to be invoked upon unhandled exception
- // notification from the OS
- BOOL AddUnhandledExceptionFilter(
- [in] LPTOP_LEVEL_EXCEPTION_FILTER uefCallbackFunc,
- [in] BOOL firstHandler);
-
- // Used to unregister a previously registered UEF callback
- BOOL RemoveUnhandledExceptionFilter(
- [in] LPTOP_LEVEL_EXCEPTION_FILTER uefCallbackFunc);
-
- // Used to explicitly invoke the registered UEF callbacks
- LONG InvokeUEFCallbacks(LPEXCEPTION_POINTERS pExceptionInfo);
-
- // Used to return the WatsonSxSManager singleton instance
- IWatsonSxSManager * GetWastonSxSManagerInstance(void);
-};
-
-cpp_quote("#endif // FEATURE_UEF_CHAINMANAGER")
diff --git a/src/inc/newapis.h b/src/inc/newapis.h
index dfe77a5000..e0e6d999e1 100644
--- a/src/inc/newapis.h
+++ b/src/inc/newapis.h
@@ -288,15 +288,17 @@ namespace NewApis
__in_ecount(cchCount2) LPCWSTR pString2, // String we're looking for
__in int cchCount2, // length of pString2
__in DWORD dwFlags, // search flags
- __in BOOL startWith);
+ __in BOOL startWith,
+ __out_opt LPINT pcchFound);
int LastIndexOfString(__in LPCWSTR lpLocaleName,
- __in_ecount(cchCount1) LPCWSTR pString1, // String to search in
- __in int cchCount1, // length of pString1
- __in_ecount(cchCount2) LPCWSTR pString2, // String we're looking for
- __in int cchCount2, // length of pString2
- __in DWORD dwFlags,
- __in BOOL endWith);
+ __in_ecount(cchCount1) LPCWSTR pString1, // String to search in
+ __in int cchCount1, // length of pString1
+ __in_ecount(cchCount2) LPCWSTR pString2, // String we're looking for
+ __in int cchCount2, // length of pString2
+ __in DWORD dwFlags,
+ __in BOOL endWith,
+ __out_opt LPINT pcchFound);
int FindNLSStringEx(__in LPCWSTR lpLocaleName,
__in DWORD dwFindNLSStringFlags,
diff --git a/src/inc/palclr_win.h b/src/inc/palclr_win.h
index 18edc6c8f5..372f467cbd 100644
--- a/src/inc/palclr_win.h
+++ b/src/inc/palclr_win.h
@@ -83,67 +83,6 @@
// WIN_PAL_ENDTRY
//
-#if !defined(FEATURE_CORECLR)
-
-#include "staticcontract.h"
-
-#define WIN_PAL_TRY_NAKED \
- { \
- bool __exHandled; __exHandled = false; \
- DWORD __exCode; __exCode = 0; \
- __try \
- {
-
-#define WIN_PAL_TRY \
- { \
- WIN_PAL_TRY_NAKED \
- WIN_PAL_TRY_HANDLER_DBG_BEGIN
-
-#define WIN_PAL_TRY_FOR_DLLMAIN(_reason) \
- { \
- WIN_PAL_TRY_NAKED \
- WIN_PAL_TRY_HANDLER_DBG_BEGIN_DLLMAIN(_reason)
-
-// Note: PAL_SEH_RESTORE_GUARD_PAGE is only ever defined in clrex.h, so we only restore guard pages automatically
-// when these macros are used from within the VM.
-#define WIN_PAL_SEH_RESTORE_GUARD_PAGE PAL_SEH_RESTORE_GUARD_PAGE
-
-#define WIN_PAL_EXCEPT_NAKED(Disposition) \
- } __except(__exCode = GetExceptionCode(), Disposition) { \
- __exHandled = true; \
- WIN_PAL_SEH_RESTORE_GUARD_PAGE
-
-#define WIN_PAL_EXCEPT(Disposition) \
- WIN_PAL_TRY_HANDLER_DBG_END \
- WIN_PAL_EXCEPT_NAKED(Disposition)
-
-#define WIN_PAL_EXCEPT_FILTER_NAKED(pfnFilter, pvFilterParameter) \
- } __except(__exCode = GetExceptionCode(), pfnFilter(GetExceptionInformation(), pvFilterParameter)) { \
- __exHandled = true; \
- WIN_PAL_SEH_RESTORE_GUARD_PAGE
-
-#define WIN_PAL_EXCEPT_FILTER(pfnFilter, pvFilterParameter) \
- WIN_PAL_TRY_HANDLER_DBG_END \
- WIN_PAL_EXCEPT_FILTER_NAKED(pfnFilter, pvFilterParameter)
-
-#define WIN_PAL_FINALLY_NAKED \
- } __finally { \
-
-#define WIN_PAL_FINALLY \
- WIN_PAL_TRY_HANDLER_DBG_END \
- WIN_PAL_FINALLY_NAKED
-
-#define WIN_PAL_ENDTRY_NAKED \
- } \
- } \
-
-#define WIN_PAL_ENDTRY \
- } \
- WIN_PAL_ENDTRY_NAKED_DBG \
- } \
- }
-
-#endif // !PAL_WIN_SEH
#if defined(_DEBUG_IMPL) && !defined(JIT_BUILD) && !defined(JIT64_BUILD) && !defined(_ARM_) // @ARMTODO
diff --git a/src/inc/profilepriv.h b/src/inc/profilepriv.h
index f74818c731..ae7b225f8c 100644
--- a/src/inc/profilepriv.h
+++ b/src/inc/profilepriv.h
@@ -148,9 +148,9 @@ GVAL_DECL(ProfControlBlock, g_profControlBlock);
#endif // defined(PROFILING_SUPPORTED_DATA) || defined(PROFILING_SUPPORTED)
// This is the helper callback that the gc uses when walking the heap.
-BOOL HeapWalkHelper(Object* pBO, void* pv);
+bool HeapWalkHelper(Object* pBO, void* pv);
void ScanRootsHelper(Object* pObj, Object** ppRoot, ScanContext *pSC, uint32_t dwUnused);
-BOOL AllocByClassHelper(Object* pBO, void* pv);
+bool AllocByClassHelper(Object* pBO, void* pv);
#endif // _ProfilePriv_h_
diff --git a/src/inc/readytorun.h b/src/inc/readytorun.h
index ebc557b6f1..0f5183ff3a 100644
--- a/src/inc/readytorun.h
+++ b/src/inc/readytorun.h
@@ -16,7 +16,9 @@
#define READYTORUN_SIGNATURE 0x00525452 // 'RTR'
#define READYTORUN_MAJOR_VERSION 0x0002
-#define READYTORUN_MINOR_VERSION 0x0000
+#define READYTORUN_MINOR_VERSION 0x0002
+// R2R Version 2.1 adds the READYTORUN_SECTION_INLINING_INFO section
+// R2R Version 2.2 adds the READYTORUN_SECTION_PROFILEDATA_INFO section
struct READYTORUN_HEADER
{
@@ -57,6 +59,14 @@ enum ReadyToRunSectionType
// 107 used by an older format of READYTORUN_SECTION_AVAILABLE_TYPES
READYTORUN_SECTION_AVAILABLE_TYPES = 108,
READYTORUN_SECTION_INSTANCE_METHOD_ENTRYPOINTS = 109,
+ READYTORUN_SECTION_INLINING_INFO = 110, // Added in V2.1
+ READYTORUN_SECTION_PROFILEDATA_INFO = 111 // Added in V2.2
+
+ // If you add a new section consider whether it is a breaking or non-breaking change.
+ // Usually it is non-breaking, but if it is preferable to have older runtimes fail
+ // to load the image vs. ignoring the new section it could be marked breaking.
+ // Increment the READYTORUN_MINOR_VERSION (non-breaking) or READYTORUN_MAJOR_VERSION
+ // (breaking) as appropriate.
};
//
@@ -220,6 +230,9 @@ enum ReadyToRunHelper
// Get string handle lazily
READYTORUN_HELPER_GetString = 0x50,
+ // Used by /Tuning for Profile optimizations
+ READYTORUN_HELPER_LogMethodEnter = 0x51,
+
// Reflection helpers
READYTORUN_HELPER_GetRuntimeTypeHandle = 0x54,
READYTORUN_HELPER_GetRuntimeMethodHandle = 0x55,
diff --git a/src/inc/readytorunhelpers.h b/src/inc/readytorunhelpers.h
index 4524e1ae84..9baf0e4459 100644
--- a/src/inc/readytorunhelpers.h
+++ b/src/inc/readytorunhelpers.h
@@ -32,6 +32,8 @@ HELPER(READYTORUN_HELPER_Ldelema_Ref, CORINFO_HELP_LDELEMA_REF,
HELPER(READYTORUN_HELPER_MemSet, CORINFO_HELP_MEMSET, )
HELPER(READYTORUN_HELPER_MemCpy, CORINFO_HELP_MEMCPY, )
+HELPER(READYTORUN_HELPER_LogMethodEnter, CORINFO_HELP_BBT_FCN_ENTER, )
+
HELPER(READYTORUN_HELPER_GetRuntimeTypeHandle, CORINFO_HELP_TYPEHANDLE_TO_RUNTIMETYPE, )
HELPER(READYTORUN_HELPER_GetRuntimeMethodHandle, CORINFO_HELP_METHODDESC_TO_STUBRUNTIMEMETHOD, )
HELPER(READYTORUN_HELPER_GetRuntimeFieldHandle, CORINFO_HELP_FIELDDESC_TO_STUBRUNTIMEFIELD, )
diff --git a/src/inc/regdisp.h b/src/inc/regdisp.h
index d08c44c904..a361dca719 100644
--- a/src/inc/regdisp.h
+++ b/src/inc/regdisp.h
@@ -275,28 +275,7 @@ inline TADDR GetRegdisplayStackMark(REGDISPLAY *display) {
}
#else // none of the above processors
-
-PORTABILITY_WARNING("RegDisplay functions are not implemented on this platform.")
-
-struct REGDISPLAY : public REGDISPLAY_BASE {
- size_t * FramePtr;
- SLOT * pPC;
-};
-
-inline TADDR GetRegdisplayFP(REGDISPLAY *display) {
- LIMITED_METHOD_CONTRACT;
- return (TADDR)*(display->FramePtr);
-}
-
-inline BOOL IsInCalleesFrames(REGDISPLAY *display, LPVOID stackPointer) {
- LIMITED_METHOD_CONTRACT;
- return FALSE;
-}
-inline LPVOID GetRegdisplayStackMark(REGDISPLAY *display) {
- LIMITED_METHOD_CONTRACT;
- return (LPVOID)display->SP;
-}
-
+#error "RegDisplay functions are not implemented on this platform."
#endif
#if defined(_WIN64) || defined(_TARGET_ARM_) || (defined(_TARGET_X86_) && defined(WIN64EXCEPTIONS))
@@ -417,7 +396,7 @@ inline void FillRegDisplay(const PREGDISPLAY pRD, PT_CONTEXT pctx, PT_CONTEXT pC
#elif defined(_TARGET_X86_) // _TARGET_ARM_
for (int i = 0; i < 7; i++)
{
- *(&pRD->ctxPtrsOne.Esi + i) = (&pctx->Esi + i);
+ *(&pRD->ctxPtrsOne.Edi + i) = (&pctx->Edi + i);
}
#else // _TARGET_X86_
PORTABILITY_ASSERT("FillRegDisplay");
@@ -477,35 +456,21 @@ inline void CopyRegDisplay(const PREGDISPLAY pInRD, PREGDISPLAY pOutRD, T_CONTEX
inline size_t * getRegAddr (unsigned regNum, PTR_CONTEXT regs)
{
#ifdef _TARGET_X86_
- switch (regNum)
+ _ASSERTE(regNum < 8);
+
+ static const SIZE_T OFFSET_OF_REGISTERS[] =
{
- case 0:
- return (size_t *)&regs->Eax;
- break;
- case 1:
- return (size_t *)&regs->Ecx;
- break;
- case 2:
- return (size_t *)&regs->Edx;
- break;
- case 3:
- return (size_t *)&regs->Ebx;
- break;
- case 4:
- return (size_t *)&regs->Esp;
- break;
- case 5:
- return (size_t *)&regs->Ebp;
- break;
- case 6:
- return (size_t *)&regs->Esi;
- break;
- case 7:
- return (size_t *)&regs->Edi;
- break;
- default:
- _ASSERTE (!"unknown regNum");
- }
+ offsetof(CONTEXT, Eax),
+ offsetof(CONTEXT, Ecx),
+ offsetof(CONTEXT, Edx),
+ offsetof(CONTEXT, Ebx),
+ offsetof(CONTEXT, Esp),
+ offsetof(CONTEXT, Ebp),
+ offsetof(CONTEXT, Esi),
+ offsetof(CONTEXT, Edi),
+ };
+
+ return (PTR_size_t)(PTR_BYTE(regs) + OFFSET_OF_REGISTERS[regNum]);
#elif defined(_TARGET_AMD64_)
_ASSERTE(regNum < 16);
return &regs->Rax + regNum;
diff --git a/src/inc/registrywrapper.h b/src/inc/registrywrapper.h
index bd6afe190b..6b284506bb 100644
--- a/src/inc/registrywrapper.h
+++ b/src/inc/registrywrapper.h
@@ -11,38 +11,10 @@
#ifndef __REGISTRYWRAPPER_H
#define __REGISTRYWRAPPER_H
-#if !defined(FEATURE_UTILCODE_NO_DEPENDENCIES) && !defined(FEATURE_CORECLR)
-
-// Registry API wrappers
-
-LONG ClrRegCreateKeyEx(
- HKEY hKey,
- LPCWSTR lpSubKey,
- DWORD Reserved,
- __in_opt LPWSTR lpClass,
- DWORD dwOptions,
- REGSAM samDesired,
- LPSECURITY_ATTRIBUTES lpSecurityAttributes,
- PHKEY phkResult,
- LPDWORD lpdwDisposition
- );
-
-LONG ClrRegOpenKeyEx(
- HKEY hKey,
- LPCWSTR lpSubKey,
- DWORD ulOptions,
- REGSAM samDesired,
- PHKEY phkResult
- );
-
-bool IsNgenOffline();
-
-#else
#define ClrRegCreateKeyEx RegCreateKeyExW
#define ClrRegOpenKeyEx RegOpenKeyExW
#define IsNgenOffline() false
-#endif
#endif // __REGISTRYWRAPPER_H
diff --git a/src/inc/shimload.h b/src/inc/shimload.h
index 9a6ab7de6f..a2651d1aff 100644
--- a/src/inc/shimload.h
+++ b/src/inc/shimload.h
@@ -14,17 +14,6 @@
#ifndef _SHIMLOAD_H
#define _SHIMLOAD_H
-#ifndef FEATURE_CORECLR
-#include <delayimp.h>
-
-extern FARPROC __stdcall ShimDelayLoadHook(unsigned dliNotify, // What event has occurred, dli* flag.
- DelayLoadInfo *pdli); // Description of the event.
-
-//and one for safe mode
-extern FARPROC __stdcall ShimSafeModeDelayLoadHook(unsigned dliNotify, // What event has occurred, dli* flag.
- DelayLoadInfo *pdli); // Description of the event.
-
-#endif
//*****************************************************************************
// Sets/Gets the directory based on the location of the module. This routine
diff --git a/src/inc/stacktrace.h b/src/inc/stacktrace.h
index 49e951780c..9152116d39 100644
--- a/src/inc/stacktrace.h
+++ b/src/inc/stacktrace.h
@@ -74,7 +74,7 @@ void GetStringFromStackLevels(UINT ifrStart, UINT cfrTotal, __out_ecount(cchMaxA
******************************************************************** robch */
void GetStringFromAddr(DWORD_PTR dwAddr, __out_ecount(cchMaxAssertStackLevelStringLen) LPSTR szString);
-#if defined(_TARGET_X86_) && defined(FEATURE_CORECLR) && !defined(FEATURE_PAL)
+#if defined(_TARGET_X86_) && !defined(FEATURE_PAL)
/****************************************************************************
* ClrCaptureContext *
*-------------------*
@@ -83,9 +83,9 @@ void GetStringFromAddr(DWORD_PTR dwAddr, __out_ecount(cchMaxAssertStackLevelStri
* support this, so we need it for CoreCLR 4, if we require Win2K support
****************************************************************************/
extern "C" void __stdcall ClrCaptureContext(__out PCONTEXT ctx);
-#else // _TARGET_X86_ && FEATURE_CORECLR && !FEATURE_PAL
+#else // _TARGET_X86_ && !FEATURE_PAL
#define ClrCaptureContext RtlCaptureContext
-#endif // _TARGET_X86_ && FEATURE_CORECLR && !FEATURE_PAL
+#endif // _TARGET_X86_ && !FEATURE_PAL
#endif
diff --git a/src/inc/stdmacros.h b/src/inc/stdmacros.h
index ab77a2cd91..3ec8bec6f3 100644
--- a/src/inc/stdmacros.h
+++ b/src/inc/stdmacros.h
@@ -277,7 +277,7 @@ inline ULONG RoundUpToPower2(ULONG x)
#define DBG_GET_CLASS_NAME(pMT) \
- (pMT)->GetClass()->GetDebugClassName()
+ (((pMT) == NULL) ? NULL : (pMT)->GetClass()->GetDebugClassName())
#define DBG_CLASS_NAME_MT(pMT) \
(DBG_GET_CLASS_NAME(pMT) == NULL) ? "<null-class>" : DBG_GET_CLASS_NAME(pMT)
diff --git a/src/inc/stgpool.h b/src/inc/stgpool.h
index 9eef70742e..4486695507 100644
--- a/src/inc/stgpool.h
+++ b/src/inc/stgpool.h
@@ -310,12 +310,11 @@ public:
{
LIMITED_METHOD_CONTRACT;
-// @todo: Triton workaround: FEATURE_METADATA_STANDALNE_WINRT_RO is supposed to disable FEATURE_PREJIT - remove this #ifdef once we figure out how to get that working in the CoreClr build.
-#if !(defined(FEATURE_UTILCODE_NO_DEPENDENCIES) || defined(FEATURE_METADATA_STANDALNE_WINRT_RO))
+#if !defined(FEATURE_UTILCODE_NO_DEPENDENCIES)
m_HotHeap = hotHeap;
#else
_ASSERTE(!"InitHotData(): Not supposed to exist in RoMetaData.dll");
-#endif //!(defined(FEATURE_UTILCODE_NO_DEPENDENCIES) || defined(FEATURE_METADATA_STANDALNE_WINRT_RO))
+#endif //!(defined(FEATURE_UTILCODE_NO_DEPENDENCIES))
}
#endif //FEATURE_PREJIT
@@ -345,8 +344,7 @@ protected:
return CLDB_E_INDEX_NOTFOUND;
}
-// @todo: Triton workaround: FEATURE_METADATA_STANDALNE_WINRT_RO is supposed to disable FEATURE_PREJIT - remove this #if once we figure out how to get that working in the CoreClr build.
-#if !(defined(FEATURE_UTILCODE_NO_DEPENDENCIES) || defined(FEATURE_METADATA_STANDALNE_WINRT_RO))
+#if !defined(FEATURE_UTILCODE_NO_DEPENDENCIES)
#ifdef FEATURE_PREJIT
// try hot data first
if (!m_HotHeap.IsEmpty())
@@ -359,7 +357,7 @@ protected:
_ASSERTE(hr == S_FALSE);
}
#endif //FEATURE_PREJIT
-#endif //!(defined(FEATURE_UTILCODE_NO_DEPENDENCIES) || defined(FEATURE_METADATA_STANDALNE_WINRT_RO))
+#endif //!(defined(FEATURE_UTILCODE_NO_DEPENDENCIES))
pData->Init(m_pSegData + nOffset, m_cbSegSize - nOffset);
@@ -381,11 +379,10 @@ protected:
} // StgPoolReadOnly::GetData
private:
-// @todo: Triton workaround: FEATURE_METADATA_STANDALNE_WINRT_RO is supposed to disable FEATURE_PREJIT - remove this #if once we figure out how to get that working in the CoreClr build.
-#if !(defined(FEATURE_UTILCODE_NO_DEPENDENCIES) || defined(FEATURE_METADATA_STANDALNE_WINRT_RO))
+#if !defined(FEATURE_UTILCODE_NO_DEPENDENCIES)
// hot pool data
MetaData::HotHeap m_HotHeap;
-#endif //!(defined(FEATURE_UTILCODE_NO_DEPENDENCIES) || defined(FEATURE_METADATA_STANDALNE_WINRT_RO))
+#endif //!(defined(FEATURE_UTILCODE_NO_DEPENDENCIES))
}; // class StgPoolReadOnly
diff --git a/src/inc/switches.h b/src/inc/switches.h
index bb3ca28e12..bb303876e8 100644
--- a/src/inc/switches.h
+++ b/src/inc/switches.h
@@ -10,9 +10,6 @@
#define STRESS_HEAP
#endif
-#if !defined(CROSSGEN_COMPILE) && !defined(FEATURE_CORECLR)
-#define STRESS_THREAD
-#endif
#define VERIFY_HEAP
@@ -67,9 +64,6 @@
#define GC_STATS
#endif
-#if !defined(FEATURE_CORECLR)
-#define EMIT_FIXUPS
-#endif
#if defined(_DEBUG) && !defined(DACCESS_COMPILE) && (defined(_TARGET_X86_) || defined(_TARGET_AMD64_))
// On x86/x64 Windows debug builds, respect the COMPlus_EnforceEEThreadNotRequiredContracts
@@ -110,16 +104,12 @@
// ALLOW_SXS_JIT_NGEN enables AltJit support for NGEN, via COMPlus_AltJitNgen / COMPlus_AltJitName.
// Note that if ALLOW_SXS_JIT_NGEN is defined, then ALLOW_SXS_JIT must be defined.
#define ALLOW_SXS_JIT
-#if defined(ALLOW_SXS_JIT)
#define ALLOW_SXS_JIT_NGEN
-#endif // ALLOW_SXS_JIT
-#if defined(FEATURE_CORECLR)
//master switch for gc suspension not based on hijacking
#define FEATURE_ENABLE_GCPOLL
-#endif //FEATURE_CORECLR
-#if defined(FEATURE_ENABLE_GCPOLL) && defined(_TARGET_X86_)
+#if defined(_TARGET_X86_)
//this enables a fast version of the GC Poll helper instead of the default portable one.
#define ENABLE_FAST_GCPOLL_HELPER
#endif // defined(FEATURE_ENABLE_GCPOLL) && defined(_TARGET_X86_)
@@ -132,18 +122,13 @@
#define PLATFORM_SUPPORTS_SAFE_THREADSUSPEND
#endif // !FEATURE_PAL
-#if !defined(PLATFORM_SUPPORTS_SAFE_THREADSUSPEND) && !defined(FEATURE_ENABLE_GCPOLL)
-#error "Platform must support either safe thread suspension or GC polling"
-#endif
#if defined(STRESS_HEAP) && defined(_DEBUG) && defined(FEATURE_HIJACK)
#define HAVE_GCCOVER
#endif
-#ifdef FEATURE_CORECLR
//Turns on a startup delay to allow simulation of slower and faster startup times.
#define ENABLE_STARTUP_DELAY
-#endif
#ifndef ALLOW_LOCAL_WORKER
@@ -182,28 +167,14 @@
#define FEATURE_PROFAPI_EVENT_LOGGING
#endif // defined(PROFILING_SUPPORTED)
-// Windows desktop supports the profiling API attach / detach feature.
-// This will eventually be supported on coreclr as well.
-#if defined(PROFILING_SUPPORTED) && !defined(FEATURE_CORECLR)
-#define FEATURE_PROFAPI_ATTACH_DETACH
-#endif
-
-// Windows desktop DAC builds need to see some of the data used in the profiling API
-// attach / detach feature, particularly Thread::m_dwProfilerEvacuationCounter
-#if defined(PROFILING_SUPPORTED_DATA) && !defined(FEATURE_CORECLR)
-#define DATA_PROFAPI_ATTACH_DETACH
-#endif
-
// MUST NEVER CHECK IN WITH THIS ENABLED.
// This is just for convenience in doing performance investigations in a checked-out enlistment.
// #define FEATURE_ENABLE_NO_RANGE_CHECKS
-#ifndef FEATURE_CORECLR
// This controls whether a compilation-timing feature that relies on Windows APIs, if available, else direct
// hardware instructions (rdtsc), for accessing high-resolution hardware timers is enabled. This is disabled
// in Silverlight (just to avoid thinking about whether the extra code space is worthwhile).
#define FEATURE_JIT_TIMER
-#endif // FEATURE_CORECLR
// This feature in RyuJIT supersedes the FEATURE_JIT_TIMER. In addition to supporting the time log file, this
// feature also supports using COMPlus_JitTimeLogCsv=a.csv, which will dump method-level and phase-level timing
@@ -221,9 +192,7 @@
// are treated as potential pinned interior pointers. When enabled, the runtime flag COMPLUS_GCCONSERVATIVE
// determines dynamically whether GC is conservative. Note that appdomain unload, LCG and unloadable assemblies
// do not work reliably with conservative GC.
-#ifdef FEATURE_CORECLR
#define FEATURE_CONSERVATIVE_GC 1
-#endif
#if (defined(_TARGET_ARM_) && !defined(ARM_SOFTFP)) || defined(_TARGET_ARM64_)
#define FEATURE_HFA
@@ -246,7 +215,7 @@
#define FEATURE_MINIMETADATA_IN_TRIAGEDUMPS
#endif // defined(FEATURE_CORESYSTEM)
-#if defined(FEATURE_PREJIT) && defined(FEATURE_CORECLR) && defined(FEATURE_CORESYSTEM)
+#if defined(FEATURE_PREJIT) && defined(FEATURE_CORESYSTEM)
// Desktop CLR allows profilers and debuggers to opt out of loading NGENd images, and to
// JIT everything instead. "FEATURE_TREAT_NI_AS_MSIL_DURING_DIAGNOSTICS" is roughly the
// equivalent for Apollo, where MSIL images may not be available at all.
@@ -260,7 +229,7 @@
// If defined, support interpretation.
#if !defined(CROSSGEN_COMPILE)
-#if defined(ALLOW_SXS_JIT) && !defined(FEATURE_PAL)
+#if !defined(FEATURE_PAL)
#define FEATURE_STACK_SAMPLING
#endif // defined (ALLOW_SXS_JIT)
diff --git a/src/inc/tlbutils.h b/src/inc/tlbutils.h
deleted file mode 100644
index 54a274587c..0000000000
--- a/src/inc/tlbutils.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-//
-// Utilities used to help manipulating typelibs
-//
-
-
-#ifndef _TLBUTILS_H
-#define _TLBUTILS_H
-
-#ifndef FEATURE_COMINTEROP_TLB_SUPPORT
-#error FEATURE_COMINTEROP_TLB_SUPPORT is required for this file
-#endif // FEATURE_COMINTEROP_TLB_SUPPORT
-
-#include "windows.h"
-#include "utilcode.h"
-
-struct StdConvertibleItfInfo
-{
- LPUTF8 m_strMngTypeName;
- GUID * m_pNativeTypeIID;
- LPUTF8 m_strCustomMarshalerTypeName;
- LPUTF8 m_strCookie;
-};
-
-// This method returns the custom marshaler info to convert the native interface
-// to its managed equivalent. Or null if the interface is not a standard convertible interface.
-const StdConvertibleItfInfo *GetConvertionInfoFromNativeIID(REFGUID rGuidNativeItf);
-
-// This function determines the namespace name for a TypeLib.
-HRESULT GetNamespaceNameForTypeLib( // S_OK or error.
- ITypeLib *pITLB, // [IN] The TypeLib.
- BSTR *pwzNamespace); // [OUT] Put the namespace name here.
-
-// This function determines the namespace.name for a TypeInfo. If no namespace
-// is provided, it is retrieved from the containing library.
-HRESULT GetManagedNameForTypeInfo( // S_OK or error.
- ITypeInfo *pITI, // [IN] The TypeInfo.
- LPCWSTR wzNamespace, // [IN, OPTIONAL] Default namespace name.
- LPCWSTR wzAsmName, // [IN, OPTIONAL] Assembly name.
- BSTR *pwzName); // [OUT] Put the name here.
-
-#endif // _TLBUTILS_H
-
-
-
-
-
-
-
diff --git a/src/inc/utilcode.h b/src/inc/utilcode.h
index a1a083638b..5394f1beb2 100644
--- a/src/inc/utilcode.h
+++ b/src/inc/utilcode.h
@@ -51,7 +51,6 @@ const WCHAR kWatsonName2[] = W("drwtsn32");
#define WINDOWS_KERNEL32_DLLNAME_A "kernel32"
#define WINDOWS_KERNEL32_DLLNAME_W W("kernel32")
-#if defined(FEATURE_CORECLR)
#define CoreLibName_W W("System.Private.CoreLib")
#define CoreLibName_IL_W W("System.Private.CoreLib.dll")
#define CoreLibName_NI_W W("System.Private.CoreLib.ni.dll")
@@ -64,20 +63,6 @@ const WCHAR kWatsonName2[] = W("drwtsn32");
#define CoreLibSatelliteName_A "System.Private.CoreLib.resources"
#define CoreLibSatelliteNameLen 32
#define LegacyCoreLibName_A "mscorlib"
-#else // !defined(FEATURE_CORECLR)
-#define CoreLibName_W W("mscorlib")
-#define CoreLibName_IL_W W("mscorlib.dll")
-#define CoreLibName_NI_W W("mscorlib.ni.dll")
-#define CoreLibName_TLB_W W("mscorlib.tlb")
-#define CoreLibName_A "mscorlib"
-#define CoreLibName_IL_A "mscorlib.dll"
-#define CoreLibName_NI_A "mscorlib.ni.dll"
-#define CoreLibName_TLB_A "mscorlib.tlb"
-#define CoreLibNameLen 8
-#define CoreLibSatelliteName_A "mscorlib.resources"
-#define CoreLibSatelliteNameLen 18
-#define LegacyCoreLibName_A "mscorlib"
-#endif // defined(FEATURE_CORECLR)
class StringArrayList;
@@ -814,10 +799,8 @@ public:
// Get the default resource location (mscorrc.dll for desktop, mscorrc.debug.dll for CoreCLR)
static CCompRC* GetDefaultResourceDll();
-#ifdef FEATURE_CORECLR
// Get the generic messages dll (Silverlight only, mscorrc.dll)
static CCompRC* GetFallbackResourceDll();
-#endif
static void ShutdownDefaultResourceDll();
static void GetDefaultCallbacks(
FPGETTHREADUICULTURENAMES* fpGetThreadUICultureNames,
@@ -842,12 +825,10 @@ public:
fpGetThreadUICultureNames,
fpGetThreadUICultureId);
-#ifdef FEATURE_CORECLR
m_FallbackResourceDll.SetResourceCultureCallbacks(
fpGetThreadUICultureNames,
fpGetThreadUICultureId);
-#endif
}
#ifdef USE_FORMATMESSAGE_WRAPPER
@@ -881,12 +862,10 @@ private:
static CCompRC m_DefaultResourceDll;
static LPCWSTR m_pDefaultResource;
-#ifdef FEATURE_CORECLR
// fallback resources if debug pack is not installed
static LONG m_dwFallbackInitialized;
static CCompRC m_FallbackResourceDll;
static LPCWSTR m_pFallbackResource;
-#endif
// We must map between a thread's int and a dll instance.
// Since we only expect 1 language almost all of the time, we'll special case
@@ -1143,13 +1122,6 @@ void SplitPathInterior(
__out_opt LPCWSTR *pwszFileName, __out_opt size_t *pcchFileName,
__out_opt LPCWSTR *pwszExt, __out_opt size_t *pcchExt);
-#ifndef FEATURE_CORECLR
-void MakePath(__out_ecount (MAX_LONGPATH) register WCHAR *path,
- __in LPCWSTR drive,
- __in LPCWSTR dir,
- __in LPCWSTR fname,
- __in LPCWSTR ext);
-#endif
void MakePath(__out CQuickWSTR &path,
__in LPCWSTR drive,
@@ -1243,13 +1215,9 @@ public:
static void FreeConfigString(__in __in_z LPWSTR name);
-#ifdef FEATURE_CORECLR
private:
-#endif //FEATURE_CORECLR
static LPWSTR EnvGetString(LPCWSTR name, BOOL fPrependCOMPLUS);
-#ifdef FEATURE_CORECLR
public:
-#endif //FEATURE_CORECLR
static BOOL UseRegistry();
@@ -1267,138 +1235,6 @@ private:
BOOL fPrependCOMPLUS = TRUE);
public:
-#ifndef FEATURE_CORECLR
- static void AllowRegistryUse(BOOL fAllowUse);
-
-
-//*****************************************************************************
-// Open's the given key and returns the value desired. If the key or value is
-// not found, then the default is returned.
-//*****************************************************************************
- static long GetLong( // Return value from registry or default.
- LPCTSTR szName, // Name of value to get.
- long iDefault, // Default value to return if not found.
- LPCTSTR szKey=NULL, // Name of key, NULL==default.
- HKEY hKey=HKEY_LOCAL_MACHINE);// What key to work on.
-
-//*****************************************************************************
-// Open's the given key and returns the value desired. If the key or value is
-// not found, then the default is returned.
-//*****************************************************************************
- static long SetLong( // Return value from registry or default.
- LPCTSTR szName, // Name of value to get.
- long iValue, // Value to set.
- LPCTSTR szKey=NULL, // Name of key, NULL==default.
- HKEY hKey=HKEY_LOCAL_MACHINE);// What key to work on.
-
-//*****************************************************************************
-// Open's the given key and returns the value desired. If the key or value is
-// not found, then it's created
-//*****************************************************************************
- static long SetOrCreateLong( // Return value from registry or default.
- LPCTSTR szName, // Name of value to get.
- long iValue, // Value to set.
- LPCTSTR szKey=NULL, // Name of key, NULL==default.
- HKEY hKey=HKEY_LOCAL_MACHINE);// What key to work on.
-
-
-
-//*****************************************************************************
-// Set an entry in the registry of the form:
-// HKEY_CLASSES_ROOT\szKey\szSubkey = szValue. If szSubkey or szValue are
-// NULL, omit them from the above expression.
-//*****************************************************************************
- static BOOL SetKeyAndValue( // TRUE or FALSE.
- LPCTSTR szKey, // Name of the reg key to set.
- LPCTSTR szSubkey, // Optional subkey of szKey.
- LPCTSTR szValue); // Optional value for szKey\szSubkey.
-
-//*****************************************************************************
-// Delete an entry in the registry of the form:
-// HKEY_CLASSES_ROOT\szKey\szSubkey.
-//*****************************************************************************
- static LONG DeleteKey( // TRUE or FALSE.
- LPCTSTR szKey, // Name of the reg key to set.
- LPCTSTR szSubkey); // Subkey of szKey.
-
-//*****************************************************************************
-// Open the key, create a new keyword and value pair under it.
-//*****************************************************************************
- static BOOL SetRegValue( // Return status.
- LPCTSTR szKeyName, // Name of full key.
- LPCTSTR szKeyword, // Name of keyword.
- LPCTSTR szValue); // Value of keyword.
-
-//*****************************************************************************
-// Does standard registration of a CoClass with a progid.
-//*****************************************************************************
- static HRESULT RegisterCOMClass( // Return code.
- REFCLSID rclsid, // Class ID.
- LPCTSTR szDesc, // Description of the class.
- LPCTSTR szProgIDPrefix, // Prefix for progid.
- int iVersion, // Version # for progid.
- LPCTSTR szClassProgID, // Class progid.
- LPCTSTR szThreadingModel, // What threading model to use.
- LPCTSTR szModule, // Path to class.
- HINSTANCE hInst, // Handle to module being registered
- LPCTSTR szAssemblyName, // Optional assembly name
- LPCTSTR szVersion, // Optional Runtime Version (directry containing runtime)
- BOOL fExternal, // flag - External to mscoree.
- BOOL fRelativePath); // flag - Relative path in szModule
-
-//*****************************************************************************
-// Unregister the basic information in the system registry for a given object
-// class.
-//*****************************************************************************
- static HRESULT UnregisterCOMClass( // Return code.
- REFCLSID rclsid, // Class ID we are registering.
- LPCTSTR szProgIDPrefix, // Prefix for progid.
- int iVersion, // Version # for progid.
- LPCTSTR szClassProgID, // Class progid.
- BOOL fExternal); // flag - External to mscoree.
-
-//*****************************************************************************
-// Does standard registration of a CoClass with a progid.
-// NOTE: This is the non-side-by-side execution version.
-//*****************************************************************************
- static HRESULT RegisterCOMClass( // Return code.
- REFCLSID rclsid, // Class ID.
- LPCTSTR szDesc, // Description of the class.
- LPCTSTR szProgIDPrefix, // Prefix for progid.
- int iVersion, // Version # for progid.
- LPCTSTR szClassProgID, // Class progid.
- LPCTSTR szThreadingModel, // What threading model to use.
- LPCTSTR szModule, // Path to class.
- BOOL bInprocServer = true); // Whether we register the server as inproc or local
-
-//*****************************************************************************
-// Unregister the basic information in the system registry for a given object
-// class.
-// NOTE: This is the non-side-by-side execution version.
-//*****************************************************************************
- static HRESULT UnregisterCOMClass( // Return code.
- REFCLSID rclsid, // Class ID we are registering.
- LPCTSTR szProgIDPrefix, // Prefix for progid.
- int iVersion, // Version # for progid.
- LPCTSTR szClassProgID); // Class progid.
-
-//*****************************************************************************
-// Register a type library.
-//*****************************************************************************
- static HRESULT RegisterTypeLib( // Return code.
- REFGUID rtlbid, // TypeLib ID we are registering.
- int iVersion, // Typelib version.
- LPCTSTR szDesc, // TypeLib description.
- LPCTSTR szModule); // Path to the typelib.
-
-//*****************************************************************************
-// Remove the registry keys for a type library.
-//*****************************************************************************
- static HRESULT UnregisterTypeLib( // Return code.
- REFGUID rtlbid, // TypeLib ID we are registering.
- int iVersion); // Typelib version.
-
-#endif //#ifndef FEATURE_CORECLR
//*****************************************************************************
// (Optional) Initialize the config registry cache
@@ -1408,31 +1244,6 @@ public:
private:
-#ifndef FEATURE_CORECLR
-
-//*****************************************************************************
-// Register the basics for a in proc server.
-//*****************************************************************************
- static HRESULT RegisterClassBase( // Return code.
- REFCLSID rclsid, // Class ID we are registering.
- LPCTSTR szDesc, // Class description.
- LPCTSTR szProgID, // Class prog ID.
- LPCTSTR szIndepProgID, // Class version independant prog ID.
- __out_ecount (cchOutCLSID) LPTSTR szOutCLSID, // CLSID formatted in character form.
- DWORD cchOutCLSID); // Out CLS ID buffer size in characters
-
-
-//*****************************************************************************
-// Delete the basic settings for an inproc server.
-//*****************************************************************************
- static HRESULT UnregisterClassBase( // Return code.
- REFCLSID rclsid, // Class ID we are registering.
- LPCTSTR szProgID, // Class prog ID.
- LPCTSTR szIndepProgID, // Class version independant prog ID.
- __out_ecount (cchOutCLSID) LPTSTR szOutCLSID, // Return formatted class ID here.
- DWORD cchOutCLSID); // Out CLS ID buffer size in characters
-
-#endif //#ifndef FEATURE_CORECLR
//*****************************************************************************
// Return TRUE if the registry value name might have been seen in the registry
@@ -4688,18 +4499,6 @@ public:
return NtCurrentTeb()->ProcessEnvironmentBlock;
}
-#ifndef FEATURE_CORECLR
- static void* GetFiberDataPtr()
- {
- LIMITED_METHOD_CONTRACT;
- return ClrTeb::IsCurrentThreadAFiber()? GetCurrentFiber() : NULL;
- }
-
- static BOOL IsCurrentThreadAFiber()
- {
- return IsThreadAFiber();
- }
-#endif
static void* InvalidFiberPtrId()
{
@@ -5205,22 +5004,6 @@ typedef Wrapper<BSTR, DoNothing, HolderSysFreeString> BSTRHolder;
BOOL FileExists(LPCWSTR filename);
-#ifndef FEATURE_CORECLR
-class FileLockHolder
-{
-public:
- FileLockHolder();
- ~FileLockHolder();
-
- virtual void Acquire(LPCWSTR lockName, HANDLE hInterrupt = 0, BOOL* pInterrupted = NULL);
- HRESULT AcquireNoThrow(LPCWSTR lockName, HANDLE hInterrupt = 0, BOOL* pInterrupted = NULL);
-
- static BOOL IsTaken(LPCWSTR lockName);
- void Release();
-private:
- HANDLE _hLock;
-};
-#endif // FEATURE_CORECLR
// a class for general x.x version info
class MajorMinorVersionInfo
@@ -5336,7 +5119,6 @@ struct CoreClrCallbacks
pfnGetCLRFunction_t m_pfnGetCLRFunction;
};
-#if defined(FEATURE_CORECLR) || !defined(SELF_NO_HOST) || defined(DACCESS_COMPILE)
// For DAC, we include this functionality only when EH SxS is enabled.
@@ -5362,7 +5144,6 @@ void OnUninitializedCoreClrCallbacks();
#define VALIDATECORECLRCALLBACKS()
#endif //_DEBUG
-#endif // defined(FEATURE_CORECLR) || !defined(SELF_NO_HOST) || defined(DACCESS_COMPILE)
#ifdef FEATURE_CORRUPTING_EXCEPTIONS
@@ -5572,33 +5353,6 @@ void* FindLocalizedFile(_In_z_ LPCWSTR wzResourceDllName, LocalizedFileHandler l
BOOL IsClrHostedLegacyComObject(REFCLSID rclsid);
-#if !defined(FEATURE_CORECLR) && !defined(CROSSGEN_COMPILE)
-
-// No utilcode code should use the global LoadLibraryShim anymore. UtilCode::LoadLibraryShim will do
-// the right thing based on whether the hosted or non-hosted utilcode is linked to. Using the global
-// LoadLibraryShim will result in a deprecated use warning.
-
-#ifdef SELF_NO_HOST
-#define LEGACY_ACTIVATION_SHIM_LOAD_LIBRARY WszLoadLibrary
-#include "legacyactivationshim.h"
-#include "mscoreepriv.h"
-
-namespace UtilCode
-{
- inline HRESULT LoadLibraryShim(LPCWSTR szDllName, LPCWSTR szVersion, LPVOID pvReserved, HMODULE *phModDll)
- {
- return LegacyActivationShim::LoadLibraryShim(szDllName, szVersion, pvReserved, phModDll);
- }
-};
-#else // SELF_NO_HOST
-namespace UtilCode
-{
- // Hosted environment
- HRESULT LoadLibraryShim(LPCWSTR szDllName, LPCWSTR szVersion, LPVOID pvReserved, HMODULE *phModDll);
-};
-#endif // SELF_NO_HOST
-
-#endif // !FEATURE_CORECLR && !CROSSGEN_COMPILE
// Helper to support termination due to heap corruption
@@ -5606,10 +5360,6 @@ namespace UtilCode
void EnableTerminationOnHeapCorruption();
-#if !defined(FEATURE_CORECLR)
-// On success, sets pwszProcessExePath (required) to full path to process EXE.
-HRESULT GetProcessExePath(LPCWSTR *pwszProcessExePath);
-#endif
namespace Clr { namespace Util
{
diff --git a/src/inc/volatile.h b/src/inc/volatile.h
index c295f98696..9531d98085 100644
--- a/src/inc/volatile.h
+++ b/src/inc/volatile.h
@@ -479,7 +479,7 @@ public:
#else
// Disable use of Volatile<T> for GC/HandleTable code except on platforms where it's absolutely necessary.
-#if defined(_MSC_VER) && !defined(_ARM_)
+#if defined(_MSC_VER) && !defined(_ARM_) && !defined(_ARM64_)
#define VOLATILE(T) T RAW_KEYWORD(volatile)
#else
#define VOLATILE(T) Volatile<T>
diff --git a/src/inc/vptr_list.h b/src/inc/vptr_list.h
index bac0c1165e..a0333c3239 100644
--- a/src/inc/vptr_list.h
+++ b/src/inc/vptr_list.h
@@ -27,22 +27,10 @@ VPTR_CLASS(Module)
VPTR_CLASS(ReflectionModule)
VPTR_CLASS(AppDomain)
-#ifndef FEATURE_CORECLR // FEATURE_NATIVE_IMAGE_GENERATION
-VPTR_MULTI_CLASS(CompilationDomain, AppDomain)
-#endif
VPTR_CLASS(SharedDomain)
VPTR_CLASS(SystemDomain)
VPTR_CLASS(DomainAssembly)
-#ifdef FEATURE_MULTIMODULE_ASSEMBLIES
-VPTR_CLASS(DomainModule)
-#endif
-#ifdef FEATURE_REMOTING
-#ifdef _TARGET_AMD64_ // HAS_REMOTING_PRECODE
-VPTR_CLASS(CNonVirtualThunkMgr)
-#endif
-VPTR_CLASS(CVirtualThunkMgr)
-#endif
VPTR_CLASS(PrecodeStubManager)
VPTR_CLASS(StubLinkStubManager)
VPTR_CLASS(ThePreStubManager)
@@ -57,9 +45,6 @@ VPTR_CLASS(DelegateInvokeStubManager)
VPTR_CLASS(TailCallStubManager)
VPTR_CLASS(PEFile)
VPTR_CLASS(PEAssembly)
-#ifdef FEATURE_MULTIMODULE_ASSEMBLIES
-VPTR_CLASS(PEModule)
-#endif
VPTR_CLASS(PEImageLayout)
VPTR_CLASS(RawImageLayout)
VPTR_CLASS(ConvertedImageLayout)
@@ -68,20 +53,12 @@ VPTR_CLASS(MappedImageLayout)
VPTR_CLASS(LoadedImageLayout)
#endif // !CROSSGEN_COMPILE && !FEATURE_PAL
VPTR_CLASS(FlatImageLayout)
-#ifdef FEATURE_FUSION
-VPTR_CLASS(StreamImageLayout)
-#endif
#ifdef FEATURE_COMINTEROP
VPTR_CLASS(ComMethodFrame)
VPTR_CLASS(ComPlusMethodFrame)
VPTR_CLASS(ComPrestubMethodFrame)
#endif // FEATURE_COMINTEROP
VPTR_CLASS(ContextTransitionFrame)
-#ifdef FEATURE_REMOTING
-VPTR_CLASS(GCSafeCollectionFrame)
-VPTR_CLASS(GCSafeObjectTable)
-VPTR_CLASS(GCSafeObjectHashTable)
-#endif
#ifdef FEATURE_INTERPRETER
VPTR_CLASS(InterpreterFrame)
#endif // FEATURE_INTERPRETER
@@ -100,10 +77,6 @@ VPTR_CLASS(HelperMethodFrame_PROTECTOBJ)
VPTR_CLASS(HijackFrame)
#endif
VPTR_CLASS(InlinedCallFrame)
-#if defined(FEATURE_INCLUDE_ALL_INTERFACES) && defined(_TARGET_X86_)
-VPTR_CLASS(LeaveRuntimeFrame)
-VPTR_CLASS(ReverseEnterRuntimeFrame)
-#endif
VPTR_CLASS(SecureDelegateFrame)
VPTR_CLASS(SecurityContextFrame)
VPTR_CLASS(MulticastFrame)
@@ -123,9 +96,6 @@ VPTR_CLASS(DynamicHelperFrame)
#if !defined(_TARGET_X86_)
VPTR_CLASS(StubHelperFrame)
#endif
-#ifdef FEATURE_REMOTING
-VPTR_CLASS(TPMethodFrame)
-#endif
#if defined(_TARGET_X86_)
VPTR_CLASS(UMThkCallFrame)
#endif
diff --git a/src/inc/winrt/windowsruntime.h b/src/inc/winrt/windowsruntime.h
index 766b94ab9c..2ac4391612 100644
--- a/src/inc/winrt/windowsruntime.h
+++ b/src/inc/winrt/windowsruntime.h
@@ -9,18 +9,6 @@
#include <windowsstring.h>
#include "holder.h"
-#ifdef FEATURE_LEAVE_RUNTIME_HOLDER
- #define HR_LEAVE_RUNTIME_HOLDER(X) \
- GCX_PREEMP(); \
- LeaveRuntimeHolderNoThrow lrh(X); \
- if (FAILED(lrh.GetHR())) \
- { \
- return lrh.GetHR(); \
- }
-#else
- #define HR_LEAVE_RUNTIME_HOLDER(X) (void *)0;
-#endif
-
#ifndef IID_INS_ARGS
#define IID_INS_ARGS(ppType) __uuidof(**(ppType)), IID_INS_ARGS_Helper(ppType)
#endif
@@ -42,7 +30,7 @@ namespace clr
__deref_out ItfT** ppItf)
{
LIMITED_METHOD_CONTRACT;
- HR_LEAVE_RUNTIME_HOLDER(::RoGetActivationFactory);
+ GCX_PREEMP();
return GetActivationFactory(wzActivatableClassId.Get(), ppItf);
}
@@ -52,13 +40,12 @@ namespace clr
__in typename ReleaseHolder<ItfT>& hItf)
{
LIMITED_METHOD_CONTRACT;
- HR_LEAVE_RUNTIME_HOLDER(::RoGetActivationFactory);
+ GCX_PREEMP();
return GetActivationFactory(wzActivatableClassId.Get(), (ItfT**)&hItf);
}
} // namespace winrt
} // namespace clr
#endif //CROSSGEN_COMPILE
-#undef HR_LEAVE_RUNTIME_HOLDER
#endif // WindowsRuntime_h
diff --git a/src/inc/winwrap.h b/src/inc/winwrap.h
index 4a012d3726..820d64bdff 100644
--- a/src/inc/winwrap.h
+++ b/src/inc/winwrap.h
@@ -484,7 +484,6 @@
#define WszLogonUser LogonUserW
#define WszCreateProcessAsUser CreateProcessAsUserW
#define WszGetCurrentHwProfile GetCurrentHwProfileW
-#define WszGetVersionEx GetVersionExW
#define WszCreateJobObject CreateJobObjectW
#define WszOpenJobObject OpenJobObjectW
@@ -633,16 +632,6 @@
#define WszRegQueryValueExTrue RegQueryValueExW
#define WszRegQueryStringValueEx RegQueryValueExW
-#ifndef FEATURE_CORECLR
-#define WszRegDeleteKey RegDeleteKeyW
-#define WszRegCreateKeyEx ClrRegCreateKeyEx
-#define WszRegSetValueEx RegSetValueExW
-#define WszRegDeleteValue RegDeleteValueW
-#define WszRegLoadKey RegLoadKeyW
-#define WszRegUnLoadKey RegUnLoadKeyW
-#define WszRegRestoreKey RegRestoreKeyW
-#define WszRegReplaceKey RegReplaceKeyW
-#endif //#ifndef FEATURE_CORECLR
#define WszRegQueryInfoKey RegQueryInfoKeyW
#define WszRegEnumValue RegEnumValueW
@@ -935,8 +924,6 @@ __forceinline LONGLONG __InterlockedExchangeAdd64(LONGLONG volatile * Addend, LO
#define CLR_VER_SUITENAME 0x0000040
#define CLR_VER_PRODUCT_TYPE 0x0000080
-BOOL GetOSVersion(LPOSVERSIONINFOW osVer);
-
// Output printf-style formatted text to the debugger if it's present or stdout otherwise.
inline void DbgWPrintf(const LPCWSTR wszFormat, ...)
{
diff --git a/src/inc/zapper.h b/src/inc/zapper.h
index 1018505faa..a55ddbe75f 100644
--- a/src/inc/zapper.h
+++ b/src/inc/zapper.h
@@ -18,9 +18,6 @@
#include "shash.h"
#include "utilcode.h"
#include "corjit.h"
-#ifdef FEATURE_FUSION
-#include "binderngen.h"
-#endif
#include "corcompile.h"
#include "corhlprpriv.h"
#include "ngen.h"
@@ -115,22 +112,20 @@ class Zapper
BOOL m_failed;
CorInfoRegionKind m_currentRegionKind;
-#if defined(FEATURE_CORECLR) || defined(CROSSGEN_COMPILE)
SString m_platformAssembliesPaths;
SString m_trustedPlatformAssemblies;
SString m_platformResourceRoots;
SString m_appPaths;
SString m_appNiPaths;
SString m_platformWinmdPaths;
-#endif // FEATURE_CORECLR || CROSSGEN_COMPILE
-#if defined(FEATURE_CORECLR) && !defined(FEATURE_MERGE_JIT_AND_ENGINE)
+#if !defined(FEATURE_MERGE_JIT_AND_ENGINE)
SString m_CLRJITPath;
bool m_fDontLoadJit;
-#endif // defined(FEATURE_CORECLR) && !defined(FEATURE_MERGE_JIT_AND_ENGINE)
-#if defined(FEATURE_CORECLR) && !defined(NO_NGENPDB)
+#endif // !defined(FEATURE_MERGE_JIT_AND_ENGINE)
+#if !defined(NO_NGENPDB)
SString m_DiasymreaderPath;
-#endif // defined(FEATURE_CORECLR) && !defined(NO_NGENPDB)
+#endif // !defined(NO_NGENPDB)
bool m_fForceFullTrust;
SString m_outputFilename;
@@ -270,65 +265,6 @@ class Zapper
}
} m_assemblyDependencies;
-#ifndef FEATURE_CORECLR // No load lists on CoreCLR
- struct loadLists
- {
- loadLists() :
- m_loadAlwaysList(NULL),
- m_loadSometimesList(NULL),
- m_loadNeverList(NULL)
- {
- }
-
- SAFEARRAY *m_loadAlwaysList;
- SAFEARRAY *m_loadSometimesList;
- SAFEARRAY *m_loadNeverList;
-
- void SetLoadLists(SAFEARRAY *loadAlwaysList, SAFEARRAY *loadSometimesList, SAFEARRAY *loadNeverList)
- {
- m_loadAlwaysList = loadAlwaysList;
- m_loadSometimesList = loadSometimesList;
- m_loadNeverList = loadNeverList;
- }
-
- } m_loadLists;
-
- void SetLoadLists(SAFEARRAY *loadAlwaysList, SAFEARRAY *loadSometimesList, SAFEARRAY *loadNeverList)
- {
- m_loadLists.SetLoadLists(loadAlwaysList, loadSometimesList, loadNeverList);
- }
-
- void SetAssemblyHardBindList()
- {
- SAFEARRAY *loadAlwaysList = m_loadLists.m_loadAlwaysList;
- if (loadAlwaysList == NULL)
- {
- return;
- }
-
- LONG ubound = 0;
- IfFailThrow(SafeArrayGetUBound(loadAlwaysList, 1, &ubound));
-
- BSTR *pArrBstr = NULL;
- IfFailThrow(SafeArrayAccessData(loadAlwaysList, reinterpret_cast<void **>(&pArrBstr)));
-
- EX_TRY
- {
- _ASSERTE((ubound + 1) >= 0);
- m_pEECompileInfo->SetAssemblyHardBindList(reinterpret_cast<LPWSTR *>(pArrBstr), ubound + 1);
- }
- EX_CATCH
- {
- // If something went wrong, try to unlock the OLE array
- // Do not verify the outcome, as we can do nothing about it
- SafeArrayUnaccessData(loadAlwaysList);
- EX_RETHROW;
- }
- EX_END_CATCH_UNREACHABLE;
-
- IfFailThrow(SafeArrayUnaccessData(loadAlwaysList));
- }
-#endif // !FEATURE_CORECLR
public:
@@ -355,30 +291,6 @@ class Zapper
void InitEE(BOOL fForceDebug, BOOL fForceProfile, BOOL fForceInstrument);
void LoadAndInitializeJITForNgen(LPCWSTR pwzJitName, OUT HINSTANCE* phJit, OUT ICorJitCompiler** ppICorJitCompiler);
-#ifdef FEATURE_FUSION
- HRESULT TryEnumerateFusionCache(LPCWSTR assemblyName, bool fPrint, bool fDelete);
- int EnumerateFusionCache(LPCWSTR assemblyName, bool fPrint, bool fDelete,
- CORCOMPILE_NGEN_SIGNATURE * pNativeImageSig = NULL);
- void PrintFusionCacheEntry(CorSvcLogLevel logLevel, IAssemblyName *pZapAssemblyName);
- void DeleteFusionCacheEntry(IAssemblyName *pZapAssemblyName);
- void DeleteFusionCacheEntry(LPCWSTR assemblyName, CORCOMPILE_NGEN_SIGNATURE *pNativeImageSig);
-
- void PrintDependencies(
- IMetaDataAssemblyImport * pAssemblyImport,
- CORCOMPILE_DEPENDENCY * pDependencies,
- COUNT_T cDependencies,
- SString &s);
- BOOL VerifyDependencies(
- IMDInternalImport * pAssemblyImport,
- CORCOMPILE_DEPENDENCY * pDependencies,
- COUNT_T cDependencies);
-
- void PrintAssemblyVersionInfo(IAssemblyName *pZapAssemblyName, SString &s);
-
- IAssemblyName *GetAssemblyFusionName(IMetaDataAssemblyImport *pImport);
- IAssemblyName *GetAssemblyRefFusionName(IMetaDataAssemblyImport *pImport,
- mdAssemblyRef ar);
-#endif //FEATURE_FUSION
BOOL IsAssembly(LPCWSTR path);
@@ -398,14 +310,6 @@ class Zapper
void CompileAssembly(CORCOMPILE_NGEN_SIGNATURE * pNativeImageSig);
ZapImage * CompileModule(CORINFO_MODULE_HANDLE hModule,
IMetaDataAssemblyEmit *pEmit);
-#ifdef FEATURE_MULTIMODULE_ASSEMBLIES
- void CompileNonManifestModules(ULONG hashAlgId, SArray<HANDLE> &hFiles);
- static void * GetMapViewOfFile(
- HANDLE hFile,
- DWORD * pdwFileLen);
- static void ComputeHashValue(HANDLE hFile, int hashAlg,
- BYTE **ppHashValue, DWORD *cbHashValue);
-#endif // FEATURE_MULTIMODULE_ASSEMBLIES
void InstallCompiledAssembly(LPCWSTR szAssemblyName, LPCWSTR szNativeImagePath, HANDLE hFile, SArray<HANDLE> &hFiles);
HRESULT GetExceptionHR();
@@ -442,7 +346,6 @@ class Zapper
void GetOutputFolder();
-#if defined(FEATURE_CORECLR) || defined(CROSSGEN_COMPILE)
void SetPlatformAssembliesPaths(LPCWSTR pwzPlatformAssembliesPaths);
void SetTrustedPlatformAssemblies(LPCWSTR pwzTrustedPlatformAssemblies);
void SetPlatformResourceRoots(LPCWSTR pwzPlatformResourceRoots);
@@ -450,16 +353,15 @@ class Zapper
void SetAppNiPaths(LPCWSTR pwzAppNiPaths);
void SetPlatformWinmdPaths(LPCWSTR pwzPlatformWinmdPaths);
void SetForceFullTrust(bool val);
-#endif // FEATURE_CORECLR || CROSSGEN_COMPILE
-#if defined(FEATURE_CORECLR) && !defined(FEATURE_MERGE_JIT_AND_ENGINE)
+#if !defined(FEATURE_MERGE_JIT_AND_ENGINE)
void SetCLRJITPath(LPCWSTR pwszCLRJITPath);
void SetDontLoadJit();
-#endif // defined(FEATURE_CORECLR) && !defined(FEATURE_MERGE_JIT_AND_ENGINE)
+#endif // !defined(FEATURE_MERGE_JIT_AND_ENGINE)
-#if defined(FEATURE_CORECLR) && !defined(NO_NGENPDB)
+#if !defined(NO_NGENPDB)
void SetDiasymreaderPath(LPCWSTR pwzDiasymreaderPath);
-#endif // defined(FEATURE_CORECLR) && !defined(NO_NGENPDB)
+#endif // !defined(NO_NGENPDB)
void SetOutputFilename(LPCWSTR pwszOutputFilename);
SString GetOutputFileName();
@@ -544,9 +446,7 @@ class ZapperOptions
bool m_legacyMode; // true if the zapper was invoked using legacy mode
-#ifdef FEATURE_CORECLR
bool m_fNoMetaData; // Do not copy metadata and IL to native image
-#endif
ZapperOptions();
~ZapperOptions();