summaryrefslogtreecommitdiff
path: root/src/vm/clrprivbinderutil.cpp
diff options
context:
space:
mode:
authordanmosemsft <danmose@microsoft.com>2017-02-12 16:51:48 -0800
committerdanmosemsft <danmose@microsoft.com>2017-02-12 17:00:53 -0800
commitb9f410b7b85d3948aece3aa009885df244f11e41 (patch)
tree4adbb4ae045896b11f373794e79b572e26d2def1 /src/vm/clrprivbinderutil.cpp
parent206b6a7efbc2e947eff900f448b86573b77ae392 (diff)
downloadcoreclr-b9f410b7b85d3948aece3aa009885df244f11e41.tar.gz
coreclr-b9f410b7b85d3948aece3aa009885df244f11e41.tar.bz2
coreclr-b9f410b7b85d3948aece3aa009885df244f11e41.zip
Remove never defined FEATURE_FUSION
Diffstat (limited to 'src/vm/clrprivbinderutil.cpp')
-rw-r--r--src/vm/clrprivbinderutil.cpp364
1 files changed, 0 insertions, 364 deletions
diff --git a/src/vm/clrprivbinderutil.cpp b/src/vm/clrprivbinderutil.cpp
index 46d50f1552..0eccf508c5 100644
--- a/src/vm/clrprivbinderutil.cpp
+++ b/src/vm/clrprivbinderutil.cpp
@@ -39,327 +39,6 @@ LPWSTR CopyStringThrowing(
namespace CLRPrivBinderUtil
{
-#ifdef FEATURE_FUSION
- //-----------------------------------------------------------------------------------------------------------------
- CLRPrivAssemblyBindResultWrapper::CLRPrivAssemblyBindResultWrapper(
- IAssemblyName *pIAssemblyName,
- PCWSTR wzAssemblyPath,
- IILFingerprintFactory *pILFingerprintFactory
- ) :
- m_wzAssemblyPath(DuplicateStringThrowing(wzAssemblyPath)),
- m_pIAssemblyName(clr::SafeAddRef(pIAssemblyName)),
- m_bIBindResultNISet(false),
- m_pIBindResultNI(nullptr),
- m_pIILFingerprint(nullptr),
- m_pILFingerprintFactory(clr::SafeAddRef(pILFingerprintFactory)),
- m_lock(CrstLeafLock)
- {
- STANDARD_VM_CONTRACT;
- VALIDATE_ARG_THROW(pIAssemblyName != nullptr && wzAssemblyPath != nullptr);
- }
-
- //-----------------------------------------------------------------------------------------------------------------
- CLRPrivAssemblyBindResultWrapper::~CLRPrivAssemblyBindResultWrapper()
- {
- clr::SafeRelease(m_pIAssemblyName);
- clr::SafeRelease(m_pIILFingerprint);
- clr::SafeRelease(m_pIBindResultNI);
- }
-
- //=================================================================================================================
- // IBindResult methods
-
- //-----------------------------------------------------------------------------------------------------------------
- HRESULT CLRPrivAssemblyBindResultWrapper::GetAssemblyNameDef(
- /*out*/ IAssemblyName **ppIAssemblyNameDef)
- {
- LIMITED_METHOD_CONTRACT;
-
- VALIDATE_ARG_RET(ppIAssemblyNameDef != nullptr);
- *ppIAssemblyNameDef = clr::SafeAddRef(m_pIAssemblyName);
- return S_OK;
- }
-
- //-----------------------------------------------------------------------------------------------------------------
- HRESULT CLRPrivAssemblyBindResultWrapper::GetNextAssemblyModuleName(
- /*in*/ DWORD dwNIndex,
- __inout_ecount(*pdwCCModuleName) LPWSTR pwzModuleName,
- /*in, out, annotation("__inout")*/ LPDWORD pdwCCModuleName)
- {
- STANDARD_BIND_CONTRACT;
- _ASSERTE(!("E_NOTIMPL: " __FUNCTION__));
- return E_NOTIMPL;
- }
-
- //-----------------------------------------------------------------------------------------------------------------
- HRESULT CLRPrivAssemblyBindResultWrapper::GetAssemblyLocation(
- /*out*/ IAssemblyLocation **ppIAssemblyLocation)
- {
- STANDARD_BIND_CONTRACT;
- VALIDATE_ARG_RET(ppIAssemblyLocation != nullptr);
- return this->QueryInterface(ppIAssemblyLocation);
- }
-
- //-----------------------------------------------------------------------------------------------------------------
- HRESULT CLRPrivAssemblyBindResultWrapper::GetNativeImage(
- /*out*/ IBindResult **ppIBindResultNI,
- /*out*/ BOOL *pfIBindResultNIProbed)
- {
- LIMITED_METHOD_CONTRACT;
-
- // m_bIBindResultNISet must always be read *before* m_pIBindResultNI
- bool bIBindResultNISet = m_bIBindResultNISet;
-
- if (pfIBindResultNIProbed != nullptr)
- *pfIBindResultNIProbed = bIBindResultNISet;
-
- if (bIBindResultNISet && ppIBindResultNI != nullptr)
- *ppIBindResultNI = clr::SafeAddRef(m_pIBindResultNI);
-
- return S_OK;
- }
-
- //-----------------------------------------------------------------------------------------------------------------
- HRESULT CLRPrivAssemblyBindResultWrapper::SetNativeImage(
- /*in*/ IBindResult *pIBindResultNI,
- /*out*/ IBindResult **ppIBindResultNIFinal)
- {
- STANDARD_BIND_CONTRACT;
- HRESULT hr = S_OK;
-
- EX_TRY
- {
- // Native Binder needs S_FALSE returned if it loses the race.
- hr = S_FALSE;
-
- if (!m_bIBindResultNISet)
- {
- CrstHolder lock(&m_lock);
- if (!m_bIBindResultNISet)
- {
- m_pIBindResultNI = clr::SafeAddRef(pIBindResultNI);
- m_bIBindResultNISet = true;
-
- // Won the race!
- hr = S_OK;
- }
- }
- }
- EX_CATCH_HRESULT(hr);
-
- if (ppIBindResultNIFinal != nullptr)
- *ppIBindResultNIFinal = clr::SafeAddRef(m_pIBindResultNI);
-
- return hr;
- }
-
- //-----------------------------------------------------------------------------------------------------------------
- HRESULT CLRPrivAssemblyBindResultWrapper::IsEqual(
- /*in*/ IUnknown *pIUnk)
- {
- STANDARD_BIND_CONTRACT;
- HRESULT hr = S_OK;
-
- VALIDATE_ARG_RET(pIUnk != nullptr);
-
- ReleaseHolder<IBindResult> pIBindResult;
-
- hr = pIUnk->QueryInterface(__uuidof(IBindResult), (void **)&pIBindResult);
- if (SUCCEEDED(hr))
- {
- hr = pIBindResult == static_cast<IBindResult*>(this) ? S_OK : S_FALSE;
- }
- else if (hr == E_NOINTERFACE)
- {
- hr = S_FALSE;
- }
-
- return hr;
- }
-
- //-----------------------------------------------------------------------------------------------------------------
- HRESULT CLRPrivAssemblyBindResultWrapper::GetNextAssemblyNameRef(
- /*in*/ DWORD dwNIndex,
- /*out*/ IAssemblyName **ppIAssemblyNameRef)
- {
- STANDARD_BIND_CONTRACT;
- _ASSERTE(!("E_UNEXPECTED: " __FUNCTION__));
- return E_UNEXPECTED;
- }
-
- //-----------------------------------------------------------------------------------------------------------------
- HRESULT CLRPrivAssemblyBindResultWrapper::GetNextDependentAssembly(
- /*in*/ DWORD dwNIndex,
- /*out*/ IUnknown **ppIUnknownAssembly)
- {
- STANDARD_BIND_CONTRACT;
- _ASSERTE(!("E_UNEXPECTED: " __FUNCTION__));
- return E_UNEXPECTED;
- }
-
- //-----------------------------------------------------------------------------------------------------------------
- HRESULT CLRPrivAssemblyBindResultWrapper::GetAssemblyLocationOfILImage(
- /*out*/ IAssemblyLocation **ppAssemblyLocation)
- {
- LIMITED_METHOD_CONTRACT;
- return this->QueryInterface(ppAssemblyLocation);
- }
-
- //-----------------------------------------------------------------------------------------------------------------
- HRESULT CLRPrivAssemblyBindResultWrapper::GetILFingerprint(
- /*out*/ IILFingerprint **ppFingerprint)
- {
- STANDARD_BIND_CONTRACT;
- HRESULT hr = S_OK;
-
- VALIDATE_ARG_RET(ppFingerprint != nullptr);
-
- EX_TRY
- {
- *ppFingerprint = m_pIILFingerprint;
- if (*ppFingerprint == nullptr)
- {
- ReleaseHolder<IILFingerprint> pFingerprint;
- if (SUCCEEDED(hr = m_pILFingerprintFactory->GetILFingerprintForPath(GetILAssemblyPath(), &pFingerprint)))
- {
- if (InterlockedCompareExchangeT<IILFingerprint>(&m_pIILFingerprint, pFingerprint, nullptr) == nullptr)
- {
- pFingerprint.SuppressRelease();
- }
- }
- }
- *ppFingerprint = clr::SafeAddRef(m_pIILFingerprint);
- }
- EX_CATCH_HRESULT(hr);
-
- return hr;
- }
-
- //-----------------------------------------------------------------------------------------------------------------
- HRESULT CLRPrivAssemblyBindResultWrapper::GetSourceILTimestamp(
- /*out*/ FILETIME* pFileTime)
- {
- STANDARD_BIND_CONTRACT;
- HRESULT hr = S_OK;
-
- VALIDATE_ARG_RET(pFileTime != nullptr);
-
- EX_TRY
- {
- WIN32_FILE_ATTRIBUTE_DATA wfd;
- if (!WszGetFileAttributesEx(GetILAssemblyPath(), GetFileExInfoStandard, &wfd))
- ThrowLastError();
- *pFileTime = wfd.ftLastWriteTime;
- }
- EX_CATCH_HRESULT(hr);
-
- return hr;
- }
-
- //-----------------------------------------------------------------------------------------------------------------
- HRESULT CLRPrivAssemblyBindResultWrapper::GetSourceILSize(
- /*out*/ DWORD* pSize)
- {
- STANDARD_BIND_CONTRACT;
- HRESULT hr = S_OK;
-
- VALIDATE_ARG_RET(pSize != nullptr);
-
- EX_TRY
- {
- WIN32_FILE_ATTRIBUTE_DATA wfd;
- if (!WszGetFileAttributesEx(GetILAssemblyPath(), GetFileExInfoStandard, &wfd))
- ThrowLastError();
- if(wfd.nFileSizeHigh != 0)
- ThrowHR(COR_E_OVERFLOW);
- *pSize = wfd.nFileSizeLow;
- }
- EX_CATCH_HRESULT(hr);
-
- return hr;
- }
-
- //-----------------------------------------------------------------------------------------------------------------
- HRESULT CLRPrivAssemblyBindResultWrapper::GetNIInfo(
- /*out*/ INativeImageInstallInfo** pInfo)
- {
- STANDARD_BIND_CONTRACT;
- _ASSERTE(!("E_UNEXPECTED: " __FUNCTION__));
- return E_UNEXPECTED;
- }
-
- //-----------------------------------------------------------------------------------------------------------------
- HRESULT CLRPrivAssemblyBindResultWrapper::GetFlags(
- /*out*/ DWORD * pdwFlags)
- {
- STANDARD_BIND_CONTRACT;
- PRECONDITION(CheckPointer(pdwFlags));
- if (pdwFlags == nullptr)
- {
- return E_POINTER;
- }
-
- // Currently, no effort is made to open assemblies and build a full IAssemblyName - this currently
- // only contains the simple name. Since AppX packages cannot be in-place updated we can be confident
- // that the binding environment will remain unchanged between NGEN and runtime. As such, return the
- // flag to indicate that the native image binder should skip self assembly definition validation.
- *pdwFlags = IBindResultFlag_AssemblyNameDefIncomplete;
-
- return S_OK;
- }
-
- //-----------------------------------------------------------------------------------------------------------------
- HRESULT CLRPrivAssemblyBindResultWrapper::GetLocationType(
- /*out*/DWORD *pdwLocationType)
- {
- LIMITED_METHOD_CONTRACT;
- VALIDATE_ARG_RET(pdwLocationType != nullptr);
-
- if (pdwLocationType == nullptr)
- return E_INVALIDARG;
- *pdwLocationType = ASSEMBLY_LOCATION_PATH;
- return S_OK;
- }
-
- //-----------------------------------------------------------------------------------------------------------------
- HRESULT CLRPrivAssemblyBindResultWrapper::GetPath(
- __inout_ecount(*pdwccAssemblyPath) LPWSTR pwzAssemblyPath,
- /*in, annotation("__inout")*/ LPDWORD pdwccAssemblyPath)
- {
- STANDARD_BIND_CONTRACT;
- HRESULT hr = S_OK;
-
- VALIDATE_ARG_RET(pdwccAssemblyPath != nullptr);
-
- EX_TRY
- {
- DWORD cchILAssemblyPath = static_cast<DWORD>(wcslen(GetILAssemblyPath())) + 1;
- if (pwzAssemblyPath != nullptr && cchILAssemblyPath <= *pdwccAssemblyPath)
- {
- IfFailThrow(StringCchCopy(pwzAssemblyPath, *pdwccAssemblyPath, GetILAssemblyPath()));
- *pdwccAssemblyPath = cchILAssemblyPath;
- hr = S_OK;
- }
- else
- {
- *pdwccAssemblyPath = cchILAssemblyPath;
- hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER);
- }
- }
- EX_CATCH_HRESULT(hr);
-
- return hr;
- }
-
- //-----------------------------------------------------------------------------------------------------------------
- HRESULT CLRPrivAssemblyBindResultWrapper::GetHostID(
- /*out*/ UINT64 *puiHostID)
- {
- STANDARD_BIND_CONTRACT;
- _ASSERTE(!("E_UNEXPECTED: " __FUNCTION__));
- return E_UNEXPECTED;
- }
-#endif //FEATURE_FUSION
//-----------------------------------------------------------------------------------------------------------------
HRESULT VerifyBind(
@@ -661,49 +340,6 @@ namespace CLRPrivBinderUtil
return hr;
}
-#ifdef FEATURE_FUSION
- //=====================================================================================================================
- HRESULT AssemblyIdentity::Initialize(
- AssemblySpec * pSpec)
- {
- CONTRACTL
- {
- NOTHROW;
- GC_NOTRIGGER;
- FORBID_FAULT;
- MODE_ANY;
- CAN_TAKE_LOCK;
- }
- CONTRACTL_END
-
- HRESULT hr = S_OK;
-
- if (0 == WszMultiByteToWideChar(
- CP_UTF8, 0 /*flags*/, pSpec->GetName(), -1, Name, (int) (sizeof(Name) / sizeof(Name[0]))))
- {
- return HRESULT_FROM_GetLastError();
- }
-
- AssemblyMetaDataInternal * pAMDI = pSpec->GetContext();
- if (pAMDI != nullptr)
- {
- Version.wMajor = pAMDI->usMajorVersion;
- Version.wMinor = pAMDI->usMinorVersion;
- Version.wBuild = pAMDI->usBuildNumber;
- Version.wRevision = pAMDI->usRevisionNumber;
- }
-
- if (pSpec->HasPublicKeyToken())
- {
- PBYTE pbKey;
- DWORD cbKey;
- pSpec->GetPublicKeyToken(&pbKey, &cbKey);
- IfFailRet(KeyToken.Initialize(pbKey, cbKey));
- }
-
- return hr;
- }
-#endif
//=====================================================================================================================