diff options
Diffstat (limited to 'src/inc/corhost.h')
-rw-r--r-- | src/inc/corhost.h | 697 |
1 files changed, 2 insertions, 695 deletions
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; |