ClrDataAccess::GetApplicationBase(CLRDATA_ADDRESS appDomain, int count,
__out_z __inout_ecount(count) wchar_t *base, unsigned int *pNeeded)
{
- if (appDomain == NULL || (base == NULL && pNeeded == NULL) || (base != NULL && count == 0))
- {
- return E_INVALIDARG;
- }
-
- SOSDacEnter();
- AppDomain* pAppDomain = PTR_AppDomain(TO_TADDR(appDomain));
-
- // Turn from bytes to wide characters
- if ((PTR_BaseDomain(pAppDomain) == PTR_BaseDomain(SharedDomain::GetDomain())) ||
- (PTR_BaseDomain(pAppDomain) == PTR_BaseDomain(SystemDomain::System())))
- {
- // Shared domain and SystemDomain don't have this field.
- if (base)
- base[0] = 0;
-
- if (pNeeded)
- *pNeeded = 1;
- }
-
- if (!pAppDomain->m_applicationBase.IsEmpty())
- {
- if (!pAppDomain->m_applicationBase.
- DacGetUnicode(count, base, pNeeded))
- {
- hr = E_FAIL;
- }
- }
- else
- {
- if (base)
- base[0] = 0;
-
- if (pNeeded)
- *pNeeded = 1;
- }
+ // Method is not supported on CoreCLR
- SOSDacLeave();
- return hr;
+ return E_FAIL;
}
HRESULT
ClrDataAccess::GetPrivateBinPaths(CLRDATA_ADDRESS appDomain, int count,
__out_z __inout_ecount(count) wchar_t *paths, unsigned int *pNeeded)
{
- if (appDomain == NULL || (paths == NULL && pNeeded == NULL) || (paths != NULL && count == 0))
- return E_INVALIDARG;
-
- SOSDacEnter();
- AppDomain* pAppDomain = PTR_AppDomain(TO_TADDR(appDomain));
-
- // Turn from bytes to wide characters
- if ((PTR_BaseDomain(pAppDomain) == PTR_BaseDomain(SharedDomain::GetDomain())) ||
- (PTR_BaseDomain(pAppDomain) == PTR_BaseDomain(SystemDomain::System())))
- {
- // Shared domain and SystemDomain don't have this field.
- if (pNeeded)
- *pNeeded = 1;
-
- if (paths)
- paths[0] = 0;
-
- hr = S_OK;
- }
-
- if (!pAppDomain->m_privateBinPaths.IsEmpty())
- {
- if (!pAppDomain->m_privateBinPaths.DacGetUnicode(count, paths, pNeeded))
- {
- hr = E_FAIL;
- }
- }
- else
- {
- if (paths)
- paths[0] = 0;
-
- if (pNeeded)
- *pNeeded = 1;
- }
+ // Method is not supported on CoreCLR
- SOSDacLeave();
- return hr;
+ return E_FAIL;
}
HRESULT
ClrDataAccess::GetAppDomainConfigFile(CLRDATA_ADDRESS appDomain, int count,
__out_z __inout_ecount(count) wchar_t *configFile, unsigned int *pNeeded)
{
- if (appDomain == NULL || (configFile == NULL && pNeeded == NULL) || (configFile != NULL && count == 0))
- {
- return E_INVALIDARG;
- }
-
- SOSDacEnter();
- AppDomain* pAppDomain = PTR_AppDomain(TO_TADDR(appDomain));
-
- // Turn from bytes to wide characters
+ // Method is not supported on CoreCLR
- if ((PTR_BaseDomain(pAppDomain) == PTR_BaseDomain(SharedDomain::GetDomain())) ||
- (PTR_BaseDomain(pAppDomain) == PTR_BaseDomain(SystemDomain::System())))
- {
- // Shared domain and SystemDomain don't have this field.
- if (configFile)
- configFile[0] = 0;
-
- if (pNeeded)
- *pNeeded = 1;
- }
-
- if (!pAppDomain->m_configFile.IsEmpty())
- {
- if (!pAppDomain->m_configFile.DacGetUnicode(count, configFile, pNeeded))
- {
- hr = E_FAIL;
- }
- }
- else
- {
- if (configFile)
- configFile[0] = 0;
-
- if (pNeeded)
- *pNeeded = 1;
- }
-
- SOSDacLeave();
- return hr;
+ return E_FAIL;
}
HRESULT
#endif // DACCESS_COMPILE
-void AppDomain::CacheStringsForDAC()
-{
- CONTRACTL
- {
- THROWS;
- GC_TRIGGERS;
- MODE_ANY;
- }
- CONTRACTL_END;
-
- //
- // If the application base, private bin paths, and configuration file are
- // available, cache them so DAC can read them out of memory
- //
-}
-
#ifndef DACCESS_COMPILE
BOOL AppDomain::AddFileToCache(AssemblySpec* pSpec, PEAssembly *pFile, BOOL fAllowFailure)
setupDomain.Call(args);
}
GCPROTECT_END();
-
- CacheStringsForDAC();
#endif // CROSSGEN_COMPILE
}