summaryrefslogtreecommitdiff
path: root/src/binder
diff options
context:
space:
mode:
Diffstat (limited to 'src/binder')
-rw-r--r--src/binder/applicationcontext.cpp86
-rw-r--r--src/binder/assemblybinder.cpp63
-rw-r--r--src/binder/textualidentityparser.cpp13
-rw-r--r--src/binder/variables.cpp2
4 files changed, 5 insertions, 159 deletions
diff --git a/src/binder/applicationcontext.cpp b/src/binder/applicationcontext.cpp
index 8aadd409c0..d560a1d3d1 100644
--- a/src/binder/applicationcontext.cpp
+++ b/src/binder/applicationcontext.cpp
@@ -32,88 +32,6 @@
namespace BINDER_SPACE
{
- namespace
- {
- void CopyIntoBuffer(/* in */ SBuffer *pPropertyValue,
- /* in */ LPVOID pvValue,
- /* in */ DWORD cbValue)
- {
- _ASSERTE(pPropertyValue != NULL);
-
- BYTE *pRawBuffer = pPropertyValue->OpenRawBuffer(cbValue);
-
- memcpy(pRawBuffer, pvValue, cbValue);
- pPropertyValue->CloseRawBuffer();
- }
-
- const void *GetRawBuffer(SBuffer *pPropertyValue)
- {
- _ASSERTE(pPropertyValue != NULL);
-
- // SBuffer provides const void *() operator
- const void *pPropertyRawBuffer = *pPropertyValue;
-
- _ASSERTE(pPropertyRawBuffer != NULL);
- _ASSERTE(pPropertyRawBuffer != pPropertyValue);
-
- return pPropertyRawBuffer;
- }
-
- HRESULT CheckRequiredBufferSize(/* in */ SBuffer *pPropertyValue,
- /* in */ LPVOID pvValue,
- /* in, out */ LPDWORD pcbValue)
- {
- _ASSERTE(pPropertyValue != NULL);
-
- HRESULT hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER);
- DWORD cbPropertySize = static_cast<DWORD>(pPropertyValue->GetSize());
-
- if (pcbValue == NULL)
- {
- hr = E_INVALIDARG;
- }
- else if ((cbPropertySize <= *pcbValue) && (pvValue != NULL))
- {
- *pcbValue = cbPropertySize;
- hr = S_OK;
- }
- else
- {
- *pcbValue = cbPropertySize;
- }
-
- return hr;
- }
-
- HRESULT CopyTextPropertyIntoBuffer(/* in */ SBuffer *pPropertyValue,
- /* out */ LPWSTR wzPropertyBuffer,
- /* in, out */ DWORD *pdwPropertyBufferSize)
- {
- HRESULT hr = S_OK;
- void *pvValue = static_cast<void *>(wzPropertyBuffer);
- DWORD cbValue = *pdwPropertyBufferSize * sizeof(WCHAR);
-
- if ((hr = CheckRequiredBufferSize(pPropertyValue, pvValue, &cbValue)) == S_OK)
- {
- memcpy(pvValue, GetRawBuffer(pPropertyValue), cbValue);
- }
-
- // Adjust byte size to character count
- _ASSERTE(cbValue % sizeof(WCHAR) == 0);
- *pdwPropertyBufferSize = cbValue / sizeof(WCHAR);
-
- return hr;
- }
-
- BOOL EndsWithPathSeparator(/* in */ PathString &path)
- {
- SString winDirSeparor(SString::Literal, W("\\"));
- SString unixDirSeparor(SString::Literal, W("/"));
-
- return (path.EndsWith(winDirSeparor) || path.EndsWith(unixDirSeparor));
- }
- };
-
STDMETHODIMP ApplicationContext::QueryInterface(REFIID riid,
void **ppv)
{
@@ -407,8 +325,8 @@ namespace BINDER_SPACE
// we encounter a native image. Since we don't touch IL in the presence of
// native images, we replace the IL entry with the NI.
//
- if (pExistingEntry->m_wszILFileName != nullptr && !isNativeImage ||
- pExistingEntry->m_wszNIFileName != nullptr && isNativeImage)
+ if ((pExistingEntry->m_wszILFileName != nullptr && !isNativeImage) ||
+ (pExistingEntry->m_wszNIFileName != nullptr && isNativeImage))
{
BINDER_LOG_STRING(W("ApplicationContext::SetupBindingPaths: Skipping TPA entry because of already existing IL/NI entry for short name "), fileName.GetUnicode());
continue;
diff --git a/src/binder/assemblybinder.cpp b/src/binder/assemblybinder.cpp
index 308e1229df..89a3c0fb3f 100644
--- a/src/binder/assemblybinder.cpp
+++ b/src/binder/assemblybinder.cpp
@@ -469,66 +469,6 @@ namespace BINDER_SPACE
Exit:
return hr;
}
-
- // Host assembly "equivalence" relation
- HRESULT IsValidHostAssembly(AssemblyName *pProposedAssemblyName,
- AssemblyName *pRequestedAssemblyName,
- VersionMatchMode versionMatchMode,
- BOOL fRequireHigherSV,
- BOOL *pFIsValidHostAssembly)
- {
- HRESULT hr = S_OK;
-
- AssemblyVersion *pProposedVersion = pProposedAssemblyName->GetVersion();
- AssemblyVersion *pRequestedVersion = pRequestedAssemblyName->GetVersion();
-
- if (pProposedVersion->IsEqualFeatureVersion(pRequestedVersion))
- {
- if (fRequireHigherSV)
- {
- *pFIsValidHostAssembly =
- pProposedVersion->IsLargerServiceVersion(pRequestedVersion);
- }
- else if (versionMatchMode == kVersionExact)
- {
- *pFIsValidHostAssembly =
- pProposedVersion->IsEqualServiceVersion(pRequestedVersion);
- }
- else
- {
- *pFIsValidHostAssembly =
- (pProposedVersion->IsLargerServiceVersion(pRequestedVersion) ||
- pProposedVersion->IsEqualServiceVersion(pRequestedVersion));
- }
- }
- else if ((versionMatchMode == kVersionFeatureRollForward) &&
- (pProposedVersion->IsLargerFeatureVersion(pRequestedVersion)))
- {
- *pFIsValidHostAssembly = TRUE;
- }
- else
- {
- *pFIsValidHostAssembly = FALSE;
- }
-
- return hr;
- }
-
- inline DWORD BindingStoreEnumToDWORD(INT32 kBindingStore)
- {
- switch (kBindingStore)
- {
- case 0:
- return kBindingStoreGAC;
- case 1:
- return kBindingStoreManifest;
- case 2:
- return kBindingStoreHost;
- default:
- _ASSERTE(0);
- return 0;
- }
- }
};
/* static */
@@ -700,8 +640,7 @@ namespace BINDER_SPACE
#ifdef FEATURE_VERSIONING_LOG
hr = LogBindResult(pApplicationContext, hr, &bindResult);
#else // FEATURE_VERSIONING_LOG
- // Shut up GCC
- hr = hr;
+ ;
#endif // FEATURE_VERSIONING_LOG
#ifndef CROSSGEN_COMPILE
diff --git a/src/binder/textualidentityparser.cpp b/src/binder/textualidentityparser.cpp
index e1ca4a53f5..2162629d93 100644
--- a/src/binder/textualidentityparser.cpp
+++ b/src/binder/textualidentityparser.cpp
@@ -189,19 +189,6 @@ namespace BINDER_SPACE
return NULL;
}
- BOOL ValidateAndConvertContentType(
- SString & ssContentType,
- AssemblyContentType * pkContentType)
- {
- if (EqualsCaseInsensitive(ssContentType, W("WindowsRuntime")))
- {
- *pkContentType = AssemblyContentType_WindowsRuntime;
- return TRUE;
- }
-
- return FALSE;
- }
-
LPCWSTR ContentTypeToString(AssemblyContentType kContentType)
{
_ASSERTE(kContentType != AssemblyContentType_Default);
diff --git a/src/binder/variables.cpp b/src/binder/variables.cpp
index c2915244fc..b2c56550e1 100644
--- a/src/binder/variables.cpp
+++ b/src/binder/variables.cpp
@@ -19,6 +19,7 @@
namespace BINDER_SPACE
{
+#ifdef FEATURE_VERSIONING_LOG
namespace
{
HRESULT CheckFileExistence(LPCWSTR pwzFile, LPDWORD pdwAttrib)
@@ -51,6 +52,7 @@ namespace BINDER_SPACE
return hr;
}
};
+#endif // FEATURE_VERSIONING_LOG
Variables *g_BinderVariables = NULL;