mirror of
https://github.com/VSadov/Satori.git
synced 2025-06-09 17:44:48 +09:00
CoreCLR versions cleanup (#35327)
- Use current version numbers everywhere - Use product version (e.g. 5.0.0) for all user facing versions - Use file version (e.g. 5.0.20.21010) only when the exact version information is required - Reduce number of layers of version macro definitions
This commit is contained in:
parent
890fab0a64
commit
ab7ef9b292
55 changed files with 210 additions and 846 deletions
|
@ -12,4 +12,6 @@
|
|||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="versioning.targets" />
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -95,7 +95,8 @@ build_native()
|
|||
if [[ "$__SkipGenerateVersion" == 0 ]]; then
|
||||
"$__RepoRootDir/eng/common/msbuild.sh" /clp:nosummary "$__ArcadeScriptArgs" "$__RepoRootDir"/eng/empty.csproj \
|
||||
/p:NativeVersionFile="$__versionSourceFile" \
|
||||
/t:GenerateNativeVersionFile /restore \
|
||||
/p:RuntimeVersionFile="$intermediatesDir/../runtime_version.h" \
|
||||
/t:GenerateRuntimeVersionFile /restore \
|
||||
$__CommonMSBuildArgs $__binlogArg $__UnprocessedBuildArgs
|
||||
local exit_code="$?"
|
||||
if [[ "$exit_code" != 0 ]]; then
|
||||
|
|
|
@ -97,4 +97,38 @@
|
|||
<FileWrites Include="$(AssemblyInfoFile)" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateRuntimeVersionFile"
|
||||
DependsOnTargets="GenerateNativeVersionFile">
|
||||
|
||||
<PropertyGroup>
|
||||
<RuntimeVersionFile Condition="'$(RuntimeVersionFile)' == ''">$(ArtifactsObjDir)runtime_version.h</RuntimeVersionFile>
|
||||
|
||||
<_RuntimeVersionFileContents>
|
||||
<![CDATA[
|
||||
#define RuntimeAssemblyMajorVersion $(MajorVersion)
|
||||
#define RuntimeAssemblyMinorVersion $(MinorVersion)
|
||||
|
||||
#define RuntimeFileMajorVersion $(FileVersion.Split('.')[0])
|
||||
#define RuntimeFileMinorVersion $(FileVersion.Split('.')[1])
|
||||
#define RuntimeFileBuildVersion $(FileVersion.Split('.')[2])
|
||||
#define RuntimeFileRevisionVersion $(FileVersion.Split('.')[3])
|
||||
|
||||
#define RuntimeProductMajorVersion $(Version.Split(".-")[0])
|
||||
#define RuntimeProductMinorVersion $(Version.Split(".-")[1])
|
||||
#define RuntimeProductPatchVersion $(Version.Split(".-")[2])
|
||||
|
||||
#define RuntimeProductVersion $(Version)
|
||||
]]>
|
||||
</_RuntimeVersionFileContents>
|
||||
</PropertyGroup>
|
||||
|
||||
<MakeDir Directories="$([System.IO.Path]::GetDirectoryName($(RuntimeVersionFile)))" />
|
||||
|
||||
<WriteLinesToFile
|
||||
File="$(RuntimeVersionFile)"
|
||||
Lines="$(_RuntimeVersionFileContents)"
|
||||
Overwrite="true" />
|
||||
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
|
@ -324,8 +324,9 @@ if %__SkipGenerateVersion% EQU 0 (
|
|||
echo %__MsgPrefix%Generating native version headers
|
||||
set "__BinLog=%__LogsDir%\GenerateVersionHeaders_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog"
|
||||
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\msbuild.ps1" /clp:nosummary %__ArcadeScriptArgs%^
|
||||
%__RepoRootDir%\eng\empty.csproj /p:NativeVersionFile="%__RootBinDir%\obj\coreclr\_version.h"^
|
||||
/t:GenerateNativeVersionFile /restore^
|
||||
%__RepoRootDir%\eng\empty.csproj /t:GenerateRuntimeVersionFile /restore^
|
||||
/p:NativeVersionFile="%__RootBinDir%\obj\coreclr\_version.h"^
|
||||
/p:RuntimeVersionFile="%__RootBinDir%\obj\coreclr\runtime_version.h"^
|
||||
%__CommonMSBuildArgs% %__UnprocessedBuildArgs% /bl:!__BinLog!
|
||||
if not !errorlevel! == 0 (
|
||||
set __exitCode=!errorlevel!
|
||||
|
|
|
@ -374,8 +374,9 @@ REM ============================================================================
|
|||
echo %__MsgPrefix%Generating native version headers
|
||||
set "__BinLog=%__LogsDir%\GenerateVersionHeaders_%__TargetOS%__%__BuildArch%__%__BuildType%.binlog"
|
||||
powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\msbuild.ps1" /clp:nosummary %__ArcadeScriptArgs%^
|
||||
%__RepoRootDir%\eng\empty.csproj /p:NativeVersionFile="%__RootBinDir%\obj\coreclr\_version.h"^
|
||||
/t:GenerateNativeVersionFile /restore^
|
||||
%__RepoRootDir%\eng\empty.csproj /t:GenerateRuntimeVersionFile /restore^
|
||||
/p:NativeVersionFile="%__RootBinDir%\obj\coreclr\_version.h"^
|
||||
/p:RuntimeVersionFile="%__RootBinDir%\obj\coreclr\runtime_version.h"^
|
||||
%__CommonMSBuildArgs% %__UnprocessedBuildArgs% /bl:!__BinLog!
|
||||
if not !errorlevel! == 0 (
|
||||
echo %__ErrMsgPrefix%%__MsgPrefix%Error: Failed to generate version headers.
|
||||
|
|
|
@ -473,40 +473,6 @@ STDAPI GetRequestedRuntimeInfo(LPCWSTR pExe,
|
|||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Replacement for legacy shim API GetCORRequiredVersion(...) used in linked libraries.
|
||||
// Used in code:TiggerStorage::GetDefaultVersion#CallTo_CLRRuntimeHostInternal_GetImageVersionString.
|
||||
//
|
||||
// Notes:
|
||||
// Mscordbi does not statically link to mscoree.dll.
|
||||
// This is used in EnC for IMetadataEmit2::GetSaveSize to computer size of header.
|
||||
// see code:TiggerStorage::GetDefaultVersion.
|
||||
//
|
||||
// Implemented by returning the version we're built for. Mscordbi.dll has a tight coupling with
|
||||
// the CLR version, so this will match exactly the build version we're debugging.
|
||||
// One potential caveat is that the build version doesn't necessarily match the install string
|
||||
// (eg. we may install as "v4.0.x86chk" but that's not captured in the build version). But this should
|
||||
// be internal scenarios only, and shouldn't actually matter here. If it did, we could instead get
|
||||
// the last components of the directory name the current mscordbi.dll is located in.
|
||||
//
|
||||
HRESULT
|
||||
CLRRuntimeHostInternal_GetImageVersionString(
|
||||
__out_ecount_part(*pcchBuffer, *pcchBuffer) LPWSTR wszBuffer,
|
||||
DWORD *pcchBuffer)
|
||||
{
|
||||
// Construct the cannoncial version string we're built as - eg. "v4.0.1234"
|
||||
const WCHAR k_wszBuiltFor[] = W("v") VER_PRODUCTVERSION_NO_QFE_STR_L;
|
||||
|
||||
// Copy our buffer in
|
||||
HRESULT hr = HRESULT_FROM_WIN32(wcscpy_s(wszBuffer, *pcchBuffer, k_wszBuiltFor));
|
||||
|
||||
// Hand out length regardless of success - like GetCORRequiredVersion
|
||||
*pcchBuffer = _countof(k_wszBuiltFor);
|
||||
|
||||
return hr;
|
||||
} // CLRRuntimeHostInternal_GetImageVersionString
|
||||
|
||||
|
||||
#ifdef TARGET_ARM
|
||||
BOOL
|
||||
DbiGetThreadContext(HANDLE hThread,
|
||||
|
|
|
@ -8981,10 +8981,10 @@ CordbProcess::GetVersion(COR_VERSION* pVersion)
|
|||
//
|
||||
// Because we require a matching version of mscordbi.dll to debug a certain version of the runtime,
|
||||
// we can just use constants found in this particular mscordbi.dll to determine the version of the left side.
|
||||
pVersion->dwMajor = CLR_MAJOR_VERSION;
|
||||
pVersion->dwMinor = CLR_MINOR_VERSION;
|
||||
pVersion->dwBuild = CLR_BUILD_VERSION;
|
||||
pVersion->dwSubBuild = CLR_BUILD_VERSION_QFE;
|
||||
pVersion->dwMajor = RuntimeProductMajorVersion;
|
||||
pVersion->dwMinor = RuntimeProductMinorVersion;
|
||||
pVersion->dwBuild = RuntimeProductPatchVersion;
|
||||
pVersion->dwSubBuild = 0;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -241,8 +241,8 @@ HRESULT DebuggerIPCControlBlock::Init(
|
|||
memset( this, 0, sizeof( DebuggerIPCControlBlock) );
|
||||
|
||||
// Setup version checking info.
|
||||
m_verMajor = CLR_BUILD_VERSION;
|
||||
m_verMinor = CLR_BUILD_VERSION_QFE;
|
||||
m_verMajor = RuntimeFileBuildVersion;
|
||||
m_verMinor = RuntimeFileRevisionVersion;
|
||||
|
||||
#ifdef _DEBUG
|
||||
m_checkedBuild = true;
|
||||
|
|
|
@ -21,8 +21,7 @@
|
|||
|
||||
|
||||
// Get version numbers for IPCHeader stamp
|
||||
#include "ndpversion.h"
|
||||
|
||||
#include "clrversion.h"
|
||||
#include "dbgappdomain.h"
|
||||
|
||||
#include "./common.h"
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
#include "metadataexports.h"
|
||||
#include "ex.h"
|
||||
|
||||
#include "product_version.h"
|
||||
|
||||
#include <dbgenginemetrics.h>
|
||||
|
||||
// Globals
|
||||
|
@ -316,21 +314,6 @@ STDAPI ReOpenMetaDataWithMemoryEx(
|
|||
return hr;
|
||||
}
|
||||
|
||||
// Replacement for legacy shim API GetCORRequiredVersion(...) used in linked libraries.
|
||||
// Used in code:TiggerStorage::GetDefaultVersion#CallTo_CLRRuntimeHostInternal_GetImageVersionString.
|
||||
HRESULT
|
||||
CLRRuntimeHostInternal_GetImageVersionString(
|
||||
__out_ecount_opt(*pcchBuffer) LPWSTR wszBuffer,
|
||||
__inout DWORD *pcchBuffer)
|
||||
{
|
||||
// Simply forward the call to the ICLRRuntimeHostInternal implementation.
|
||||
STATIC_CONTRACT_WRAPPER;
|
||||
|
||||
HRESULT hr = GetCORVersionInternal(wszBuffer, *pcchBuffer, pcchBuffer);
|
||||
|
||||
return hr;
|
||||
} // CLRRuntimeHostInternal_GetImageVersionString
|
||||
|
||||
STDAPI GetCORSystemDirectoryInternaL(SString& pBuffer)
|
||||
{
|
||||
CONTRACTL {
|
||||
|
@ -364,67 +347,6 @@ STDAPI GetCORSystemDirectoryInternaL(SString& pBuffer)
|
|||
return hr;
|
||||
}
|
||||
|
||||
//
|
||||
// Returns version of the runtime (null-terminated).
|
||||
//
|
||||
// Arguments:
|
||||
// pBuffer - [out] Output buffer allocated by caller of size cchBuffer.
|
||||
// cchBuffer - Size of pBuffer in characters.
|
||||
// pdwLength - [out] Size of the version string in characters (incl. null-terminator). Will be filled
|
||||
// even if ERROR_INSUFFICIENT_BUFFER is returned.
|
||||
//
|
||||
// Return Value:
|
||||
// S_OK - Output buffer contains the version string.
|
||||
// HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER) - *pdwLength contains required size of the buffer in
|
||||
// characters.
|
||||
|
||||
STDAPI GetCORVersionInternal(
|
||||
__out_ecount_z_opt(cchBuffer) LPWSTR pBuffer,
|
||||
DWORD cchBuffer,
|
||||
__out DWORD *pdwLength)
|
||||
{
|
||||
CONTRACTL {
|
||||
NOTHROW;
|
||||
GC_NOTRIGGER;
|
||||
ENTRY_POINT;
|
||||
PRECONDITION(CheckPointer(pBuffer, NULL_OK));
|
||||
PRECONDITION(CheckPointer(pdwLength));
|
||||
} CONTRACTL_END;
|
||||
|
||||
HRESULT hr;
|
||||
BEGIN_ENTRYPOINT_NOTHROW;
|
||||
|
||||
if ((pBuffer != NULL) && (cchBuffer > 0))
|
||||
{ // Initialize the output for case the function fails
|
||||
*pBuffer = W('\0');
|
||||
}
|
||||
|
||||
#define VERSION_NUMBER_NOSHIM W("v") QUOTE_MACRO_L(CLR_MAJOR_VERSION.CLR_MINOR_VERSION.CLR_BUILD_VERSION)
|
||||
|
||||
DWORD length = (DWORD)(wcslen(VERSION_NUMBER_NOSHIM) + 1);
|
||||
if (length > cchBuffer)
|
||||
{
|
||||
hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pBuffer == NULL)
|
||||
{
|
||||
hr = E_POINTER;
|
||||
}
|
||||
else
|
||||
{
|
||||
CopyMemory(pBuffer, VERSION_NUMBER_NOSHIM, length * sizeof(WCHAR));
|
||||
hr = S_OK;
|
||||
}
|
||||
}
|
||||
*pdwLength = length;
|
||||
|
||||
END_ENTRYPOINT_NOTHROW;
|
||||
return hr;
|
||||
|
||||
}
|
||||
|
||||
static DWORD g_dwSystemDirectory = 0;
|
||||
static WCHAR * g_pSystemDirectory = NULL;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "ilasmpch.h"
|
||||
|
||||
#include "asmparse.h"
|
||||
#include "ndpversion.h"
|
||||
#include "clrversion.h"
|
||||
#include "shimload.h"
|
||||
|
||||
#include "strsafe.h"
|
||||
|
@ -149,7 +149,7 @@ extern "C" int _cdecl wmain(int argc, __in WCHAR **argv)
|
|||
#pragma warning(pop)
|
||||
#endif
|
||||
{
|
||||
printf("\nMicrosoft (R) .NET Framework IL Assembler version " VER_FILEVERSION_STR);
|
||||
printf("\nMicrosoft (R) .NET IL Assembler version " CLR_PRODUCT_VERSION);
|
||||
printf("\n%S\n\n", VER_LEGALCOPYRIGHT_LOGO_STR_L);
|
||||
goto PrintUsageAndExit;
|
||||
|
||||
|
@ -643,7 +643,7 @@ extern "C" int _cdecl wmain(int argc, __in WCHAR **argv)
|
|||
//======================================================================
|
||||
if(bLogo)
|
||||
{
|
||||
printf("\nMicrosoft (R) .NET Framework IL Assembler. Version " VER_FILEVERSION_STR);
|
||||
printf("\nMicrosoft (R) .NET IL Assembler. Version " CLR_PRODUCT_VERSION);
|
||||
printf("\n%S", VER_LEGALCOPYRIGHT_LOGO_STR_L);
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
//#define MAX_FILENAME_LENGTH 2048 //moved to dis.h
|
||||
|
||||
#include <corsym.h>
|
||||
#include <ndpversion.h>
|
||||
#include <clrversion.h>
|
||||
|
||||
// Disable the "initialization of static local vars is no thread safe" error
|
||||
#ifdef _MSC_VER
|
||||
|
@ -6955,7 +6955,7 @@ void DumpPreamble()
|
|||
else if(g_fDumpRTF)
|
||||
{
|
||||
}
|
||||
sprintf_s(szString,SZSTRING_SIZE,"// Microsoft (R) .NET Framework IL Disassembler. Version " VER_FILEVERSION_STR);
|
||||
sprintf_s(szString,SZSTRING_SIZE,"// Microsoft (R) .NET IL Disassembler. Version " CLR_PRODUCT_VERSION);
|
||||
printLine(g_pFile,COMMENT(szString));
|
||||
if(g_fDumpHTML)
|
||||
{
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#include "dasmenum.hpp"
|
||||
#include "dis.h"
|
||||
#include <ndpversion.h>
|
||||
#include <clrversion.h>
|
||||
#include "resource.h"
|
||||
|
||||
#include "new.hpp"
|
||||
|
@ -97,7 +97,7 @@ FILE* OpenOutput(__in __nullterminated const char* szFileName);
|
|||
|
||||
void PrintLogo()
|
||||
{
|
||||
printf("Microsoft (R) .NET Framework IL Disassembler. Version " VER_FILEVERSION_STR);
|
||||
printf("Microsoft (R) .NET IL Disassembler. Version " CLR_PRODUCT_VERSION);
|
||||
printf("\n%S\n\n", VER_LEGALCOPYRIGHT_LOGO_STR_L);
|
||||
}
|
||||
|
||||
|
|
30
src/coreclr/src/inc/clrversion.h
Normal file
30
src/coreclr/src/inc/clrversion.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
// 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.
|
||||
|
||||
#include "runtime_version.h"
|
||||
|
||||
#ifndef QUOTE_MACRO
|
||||
#define QUOTE_MACRO_HELPER(x) #x
|
||||
#define QUOTE_MACRO(x) QUOTE_MACRO_HELPER(x)
|
||||
#endif
|
||||
|
||||
#ifndef QUOTE_MACRO_L
|
||||
#define QUOTE_MACRO_L_HELPER(x) L###x
|
||||
#define QUOTE_MACRO_L(x) QUOTE_MACRO_L_HELPER(x)
|
||||
#endif
|
||||
|
||||
#define CLR_METADATA_VERSION "v4.0.30319"
|
||||
#define CLR_METADATA_VERSION_L W("v4.0.30319")
|
||||
|
||||
#define CLR_PRODUCT_VERSION QUOTE_MACRO(RuntimeProductVersion)
|
||||
#define CLR_PRODUCT_VERSION_L QUOTE_MACRO_L(RuntimeProductVersion)
|
||||
|
||||
#define VER_ASSEMBLYVERSION_STR QUOTE_MACRO(RuntimeAssemblyMajorVersion.RuntimeAssemblyMinorVersion.0.0)
|
||||
#define VER_ASSEMBLYVERSION_STR_L QUOTE_MACRO_L(RuntimeAssemblyMajorVersion.RuntimeAssemblyMinorVersion.0.0)
|
||||
|
||||
#define VER_FILEVERSION_STR QUOTE_MACRO(RuntimeFileMajorVersion.RuntimeFileMinorVersion.RuntimeFileBuildVersion.RuntimeFileRevisionVersion)
|
||||
#define VER_FILEVERSION_STR_L QUOTE_MACRO_L(RuntimeFileMajorVersion.RuntimeFileMinorVersion.RuntimeFileBuildVersion.RuntimeFileRevisionVersion)
|
||||
|
||||
#define VER_LEGALCOPYRIGHT_LOGO_STR "Copyright (c) Microsoft Corporation. All rights reserved."
|
||||
#define VER_LEGALCOPYRIGHT_LOGO_STR_L L"Copyright (c) Microsoft Corporation. All rights reserved."
|
|
@ -460,11 +460,6 @@ STDAPI GetCORSystemDirectoryInternal(
|
|||
__out_opt DWORD* pdwLength
|
||||
);
|
||||
|
||||
STDAPI GetCORVersionInternal(
|
||||
__out_ecount_z_opt(cchBuffer) LPWSTR pBuffer,
|
||||
DWORD cchBuffer,
|
||||
__out DWORD *pdwLength);
|
||||
|
||||
#endif // _CORPRIV_H_
|
||||
// EOF =======================================================================
|
||||
|
||||
|
|
|
@ -24,9 +24,6 @@
|
|||
#include "mscoree.h"
|
||||
#include "corhost.h"
|
||||
|
||||
#include <ndpversion.h>
|
||||
|
||||
|
||||
//********** Locals. **********************************************************
|
||||
HINSTANCE GetModuleInst();
|
||||
|
||||
|
|
|
@ -20,15 +20,7 @@
|
|||
#include "posterror.h"
|
||||
#include "mdfileformat.h"
|
||||
#include "sstring.h"
|
||||
|
||||
//#CLRRuntimeHostInternal_GetImageVersionString
|
||||
// External implementation of call to code:ICLRRuntimeHostInternal::GetImageVersionString.
|
||||
// Implemented in clr.dll and mscordbi.dll.
|
||||
HRESULT
|
||||
CLRRuntimeHostInternal_GetImageVersionString(
|
||||
__out_ecount(*pcchBuffer)
|
||||
LPWSTR wszBuffer,
|
||||
DWORD * pcchBuffer);
|
||||
#include "clrversion.h"
|
||||
|
||||
TiggerStorage::TiggerStorage() :
|
||||
m_pStgIO(0),
|
||||
|
@ -134,42 +126,7 @@ HRESULT
|
|||
TiggerStorage::GetDefaultVersion(
|
||||
LPCSTR *ppVersion)
|
||||
{
|
||||
static LPSTR g_pDefaultVersion;
|
||||
|
||||
if (g_pDefaultVersion == NULL)
|
||||
{
|
||||
#ifndef DACCESS_COMPILE
|
||||
HRESULT hr;
|
||||
|
||||
WCHAR wszVersion[_MAX_PATH];
|
||||
DWORD cchVersion = _MAX_PATH;
|
||||
//#CallTo_CLRRuntimeHostInternal_GetImageVersionString
|
||||
IfFailRet(CLRRuntimeHostInternal_GetImageVersionString(wszVersion, &cchVersion));
|
||||
|
||||
CHAR szVersion[_MAX_PATH];
|
||||
DWORD dwSize = WszWideCharToMultiByte(CP_UTF8, 0, wszVersion, -1, szVersion, _MAX_PATH, NULL, NULL);
|
||||
if (dwSize == 0)
|
||||
{
|
||||
_ASSERTE_MSG(FALSE, "WideCharToMultiByte conversion failed");
|
||||
szVersion[0] = 0;
|
||||
dwSize = 1;
|
||||
}
|
||||
|
||||
NewArrayHolder<CHAR> pVersion = new (nothrow) CHAR[dwSize];
|
||||
IfNullRet(pVersion);
|
||||
|
||||
memcpy(pVersion, szVersion, dwSize);
|
||||
|
||||
if (InterlockedCompareExchangeT<CHAR *>(&g_pDefaultVersion, pVersion, NULL) == NULL)
|
||||
{ // We won the initialization race
|
||||
pVersion.SuppressRelease();
|
||||
}
|
||||
#else
|
||||
DacNotImpl();
|
||||
#endif //DACCESS_COMPILE
|
||||
}
|
||||
|
||||
*ppVersion = g_pDefaultVersion;
|
||||
*ppVersion = CLR_METADATA_VERSION;
|
||||
return S_OK;
|
||||
} // TiggerStorage::GetDefaultVersion
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include "shimload.h"
|
||||
#include "metadataexports.h"
|
||||
#include "ex.h"
|
||||
#include "product_version.h"
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// %%Function: MetaDataGetDispenser
|
||||
|
@ -126,79 +125,3 @@ STDAPI DLLEXPORT GetMetaDataPublicInterfaceFromInternal(
|
|||
END_ENTRYPOINT_NOTHROW;
|
||||
return hr;
|
||||
}
|
||||
|
||||
//
|
||||
// Returns version of the runtime (null-terminated).
|
||||
//
|
||||
// Arguments:
|
||||
// pBuffer - [out] Output buffer allocated by caller of size cchBuffer.
|
||||
// cchBuffer - Size of pBuffer in characters.
|
||||
// pdwLength - [out] Size of the version string in characters (incl. null-terminator). Will be filled
|
||||
// even if ERROR_INSUFFICIENT_BUFFER is returned.
|
||||
//
|
||||
// Return Value:
|
||||
// S_OK - Output buffer contains the version string.
|
||||
// HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER) - *pdwLength contains required size of the buffer in
|
||||
// characters.
|
||||
|
||||
STDAPI GetCORVersionInternal(
|
||||
__out_ecount_z_opt(cchBuffer) LPWSTR pBuffer,
|
||||
DWORD cchBuffer,
|
||||
__out DWORD *pdwLength)
|
||||
{
|
||||
CONTRACTL {
|
||||
NOTHROW;
|
||||
GC_NOTRIGGER;
|
||||
ENTRY_POINT;
|
||||
PRECONDITION(CheckPointer(pBuffer, NULL_OK));
|
||||
PRECONDITION(CheckPointer(pdwLength));
|
||||
} CONTRACTL_END;
|
||||
|
||||
HRESULT hr;
|
||||
BEGIN_ENTRYPOINT_NOTHROW;
|
||||
|
||||
if ((pBuffer != NULL) && (cchBuffer > 0))
|
||||
{ // Initialize the output for case the function fails
|
||||
*pBuffer = W('\0');
|
||||
}
|
||||
|
||||
#define VERSION_NUMBER_NOSHIM W("v") QUOTE_MACRO_L(CLR_MAJOR_VERSION.CLR_MINOR_VERSION.CLR_BUILD_VERSION)
|
||||
|
||||
DWORD length = (DWORD)(wcslen(VERSION_NUMBER_NOSHIM) + 1);
|
||||
if (length > cchBuffer)
|
||||
{
|
||||
hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pBuffer == NULL)
|
||||
{
|
||||
hr = E_POINTER;
|
||||
}
|
||||
else
|
||||
{
|
||||
CopyMemory(pBuffer, VERSION_NUMBER_NOSHIM, length * sizeof(WCHAR));
|
||||
hr = S_OK;
|
||||
}
|
||||
}
|
||||
*pdwLength = length;
|
||||
|
||||
END_ENTRYPOINT_NOTHROW;
|
||||
return hr;
|
||||
|
||||
}
|
||||
|
||||
// Replacement for legacy shim API GetCORRequiredVersion(...) used in linked libraries.
|
||||
// Used in code:TiggerStorage::GetDefaultVersion#CallTo_CLRRuntimeHostInternal_GetImageVersionString.
|
||||
HRESULT
|
||||
CLRRuntimeHostInternal_GetImageVersionString(
|
||||
__out_ecount_opt(*pcchBuffer) LPWSTR wszBuffer,
|
||||
__inout DWORD *pcchBuffer)
|
||||
{
|
||||
// Simply forward the call to the ICLRRuntimeHostInternal implementation.
|
||||
STATIC_CONTRACT_WRAPPER;
|
||||
|
||||
HRESULT hr = GetCORVersionInternal(wszBuffer, *pcchBuffer, pcchBuffer);
|
||||
|
||||
return hr;
|
||||
} // CLRRuntimeHostInternal_GetImageVersionString
|
||||
|
|
|
@ -5,15 +5,7 @@
|
|||
#include "sigparser.h"
|
||||
#include "sigbuilder.h"
|
||||
#include "inc/adapter.h"
|
||||
|
||||
//#CLRRuntimeHostInternal_GetImageVersionString
|
||||
// External implementation of call to code:ICLRRuntimeHostInternal::GetImageVersionString.
|
||||
// Implemented in clr.dll and mscordbi.dll.
|
||||
HRESULT
|
||||
CLRRuntimeHostInternal_GetImageVersionString(
|
||||
__out_ecount(*pcchBuffer)
|
||||
LPWSTR wszBuffer,
|
||||
DWORD * pcchBuffer);
|
||||
#include "clrversion.h"
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// The name prefixes used by WinMD to hide/unhide WinRT and CLR versions of RuntimeClasses.
|
||||
|
@ -131,11 +123,7 @@ HRESULT CheckIfWinMDAdapterNeeded(IMDCommon *pRawMDCommon)
|
|||
{
|
||||
pNewAdapter->m_scenario = kWinMDNormal;
|
||||
#ifndef DACCESS_COMPILE
|
||||
WCHAR wszCorVersion[_MAX_PATH];
|
||||
DWORD cchWszCorVersion = _countof(wszCorVersion);
|
||||
IfFailGo(CLRRuntimeHostInternal_GetImageVersionString (wszCorVersion, &cchWszCorVersion));
|
||||
MAKE_UTF8PTR_FROMWIDE_NOTHROW(szCorVersion, wszCorVersion);
|
||||
IfNullGo(szCorVersion);
|
||||
LPCSTR szCorVersion = CLR_METADATA_VERSION;
|
||||
size_t nch = strlen(szCorVersion) + 1;
|
||||
pNewAdapter->m_pRedirectedVersionString = new (nothrow) char[nch];
|
||||
IfNullGo(pNewAdapter->m_pRedirectedVersionString);
|
||||
|
@ -1175,10 +1163,10 @@ void WinMDAdapter::GetExtraAssemblyRefProps(FrameworkAssemblyIndex index,
|
|||
{
|
||||
::memset(pContext, 0, sizeof(AssemblyMetaDataInternal));
|
||||
|
||||
pContext->usMajorVersion = VER_ASSEMBLYMAJORVERSION;
|
||||
pContext->usMinorVersion = VER_ASSEMBLYMINORVERSION;
|
||||
pContext->usBuildNumber = VER_ASSEMBLYBUILD;
|
||||
pContext->usRevisionNumber = VER_ASSEMBLYBUILD_QFE;
|
||||
pContext->usMajorVersion = 4;
|
||||
pContext->usMinorVersion = 0;
|
||||
pContext->usBuildNumber = 0;
|
||||
pContext->usRevisionNumber = 0;
|
||||
|
||||
pContext->szLocale = "";
|
||||
}
|
||||
|
|
|
@ -224,17 +224,16 @@ public:
|
|||
{
|
||||
_ASSERTE(TypeFromToken(mdar) == mdtAssemblyRef);
|
||||
|
||||
// The version of the mscorlib should be 4.0.0.0
|
||||
if (m_assemblyRefMscorlib == mdar)
|
||||
{
|
||||
if (pusMajorVersion != nullptr)
|
||||
*pusMajorVersion = VER_ASSEMBLYMAJORVERSION;
|
||||
*pusMajorVersion = 4;
|
||||
if (pusMinorVersion != nullptr)
|
||||
*pusMinorVersion = VER_ASSEMBLYMINORVERSION;
|
||||
*pusMinorVersion = 0;
|
||||
if (pusBuildNumber != nullptr)
|
||||
*pusBuildNumber = VER_ASSEMBLYBUILD;
|
||||
*pusBuildNumber = 0;
|
||||
if (pusRevisionNumber != nullptr)
|
||||
*pusRevisionNumber = VER_ASSEMBLYBUILD_QFE;
|
||||
*pusRevisionNumber = 0;
|
||||
|
||||
// Under CoreCLR, we replace the ECMA key in the mscorlib assembly ref with the CoreCLR platform public key token
|
||||
if (ppbPublicKeyOrToken != nullptr)
|
||||
|
@ -279,13 +278,13 @@ public:
|
|||
*pszName = GetExtraAssemblyRefName(mdar);
|
||||
|
||||
if (pusMajorVersion != nullptr)
|
||||
*pusMajorVersion = VER_ASSEMBLYMAJORVERSION;
|
||||
*pusMajorVersion = 4;
|
||||
if (pusMinorVersion != nullptr)
|
||||
*pusMinorVersion = VER_ASSEMBLYMINORVERSION;
|
||||
*pusMinorVersion = 0;
|
||||
if (pusBuildNumber != nullptr)
|
||||
*pusBuildNumber = VER_ASSEMBLYBUILD;
|
||||
*pusBuildNumber = 0;
|
||||
if (pusRevisionNumber != nullptr)
|
||||
*pusRevisionNumber = VER_ASSEMBLYBUILD_QFE;
|
||||
*pusRevisionNumber = 0;
|
||||
|
||||
if (ppbHashValue)
|
||||
*ppbHashValue = NULL;
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include <cor.h>
|
||||
#include <corpriv.h>
|
||||
|
||||
#include <ndpversion.h>
|
||||
#include "nsutilpriv.h"
|
||||
|
||||
#include "utsem.h"
|
||||
|
|
|
@ -1,22 +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.
|
||||
#if defined(SILVERLIGHT)
|
||||
#if defined(FEATURE_CORESYSTEM)
|
||||
#define asm_rmj 4
|
||||
#define asm_rmm 0
|
||||
#define asm_rup 0
|
||||
#define asm_rpt 0
|
||||
#else
|
||||
#define asm_rmj 5
|
||||
#define asm_rmm 0
|
||||
#define asm_rup 5
|
||||
#define asm_rpt 0
|
||||
#endif
|
||||
#else
|
||||
#define asm_rmj 4
|
||||
#define asm_rmm 0
|
||||
#define asm_rup 0
|
||||
#define asm_rpt 0
|
||||
#endif
|
||||
|
|
@ -1,23 +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.
|
||||
|
||||
#define BuildNumberMajor 30319
|
||||
#define BuildNumberMinor 0
|
||||
#define BuildNumberMajor_A "30319"
|
||||
#define BuildNumberMinor_A "00"
|
||||
#define BuildNumbers_A "30319.00"
|
||||
#define BuildNumbers_T TEXT("30319.00")
|
||||
|
||||
#define NDPBuildNumberMajor 30319
|
||||
#define NDPBuildNumberMinor 0
|
||||
#define NDPBuildNumbers_A "30319.00"
|
||||
#define NDPBuildNumbers_T TEXT("30319.00")
|
||||
|
||||
#define NDPFileVersionMinor 5
|
||||
#define NDPFileVersionBuild 30319
|
||||
#define NDPFileVersionRevision 0
|
||||
|
||||
#define NDPFileVersionMinor_A "5"
|
||||
#define NDPFileVersionBuild_A "30319"
|
||||
#define NDPFileVersionRevision_A "00"
|
|
@ -2,202 +2,28 @@
|
|||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
//
|
||||
// Insert just the #defines in winver.h, so that the
|
||||
// C# compiler can include this file after macro preprocessing.
|
||||
//
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifndef FXVER_H_
|
||||
#define FXVER_H_
|
||||
#define INCLUDE_FXVER_H
|
||||
#endif
|
||||
#else
|
||||
#define RC_INVOKED 1
|
||||
#define INCLUDE_FXVER_H
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_FXVER_H
|
||||
#undef INCLUDE_FXVER_H
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
#define FXVER_H_RC_INVOKED_ENABLED
|
||||
#define RC_INVOKED 1
|
||||
#endif
|
||||
|
||||
#include <verrsrc.h>
|
||||
|
||||
#ifdef FXVER_H_RC_INVOKED_ENABLED
|
||||
#undef RC_INVOKED
|
||||
#undef FXVER_H_RC_INVOKED_ENABLED
|
||||
#endif
|
||||
#define QUOTE_MACRO_HELPER(x) #x
|
||||
#define QUOTE_MACRO(x) QUOTE_MACRO_HELPER(x)
|
||||
|
||||
//
|
||||
// Include the definitions for rmj, rmm, rup, rpt
|
||||
//
|
||||
#define VER_PRODUCTNAME_STR L"Microsoft\256 .NET"
|
||||
|
||||
#include <product_version.h>
|
||||
|
||||
/*
|
||||
* Product version, name and copyright
|
||||
*/
|
||||
|
||||
#include "fxverstrings.h"
|
||||
|
||||
/*
|
||||
* File version, names, description.
|
||||
*/
|
||||
|
||||
// FX_VER_INTERNALNAME_STR is passed in by the build environment.
|
||||
#ifndef FX_VER_INTERNALNAME_STR
|
||||
#define FX_VER_INTERNALNAME_STR UNKNOWN_FILE
|
||||
#endif
|
||||
|
||||
#define VER_INTERNALNAME_STR QUOTE_MACRO(FX_VER_INTERNALNAME_STR)
|
||||
#define VER_ORIGINALFILENAME_STR QUOTE_MACRO(FX_VER_INTERNALNAME_STR)
|
||||
|
||||
// FX_VER_FILEDESCRIPTION_STR is defined in RC files that include fxver.h
|
||||
|
||||
#ifndef FX_VER_FILEDESCRIPTION_STR
|
||||
#define FX_VER_FILEDESCRIPTION_STR QUOTE_MACRO(FX_VER_INTERNALNAME_STR)
|
||||
#endif
|
||||
|
||||
#define VER_FILEDESCRIPTION_STR FX_VER_FILEDESCRIPTION_STR
|
||||
|
||||
#ifndef FX_VER_FILEVERSION_STR
|
||||
#define FX_VER_FILEVERSION_STR FX_FILEVERSION_STR
|
||||
#endif
|
||||
|
||||
#define VER_FILEVERSION_STR FX_VER_FILEVERSION_STR
|
||||
#define VER_FILEVERSION_STR_L VER_PRODUCTVERSION_STR_L
|
||||
|
||||
#ifndef FX_VER_FILEVERSION
|
||||
#define FX_VER_FILEVERSION VER_DOTFILEVERSION
|
||||
#endif
|
||||
|
||||
#define VER_FILEVERSION FX_VER_FILEVERSION
|
||||
|
||||
//URT_VFT passed in by the build environment.
|
||||
#ifndef FX_VFT
|
||||
#define FX_VFT VFT_UNKNOWN
|
||||
#endif
|
||||
|
||||
#define VER_FILETYPE FX_VFT
|
||||
#define VER_FILESUBTYPE VFT2_UNKNOWN
|
||||
|
||||
/* default is nodebug */
|
||||
#if DBG
|
||||
#define VER_DEBUG VS_FF_DEBUG
|
||||
#else
|
||||
#define VER_DEBUG 0
|
||||
#endif
|
||||
|
||||
#define VER_PRERELEASE 0
|
||||
|
||||
#define EXPORT_TAG
|
||||
|
||||
// Not setting the private build flag until
|
||||
// official builds can be detected from native projects
|
||||
//#if OFFICIAL_BUILD
|
||||
#define VER_PRIVATE 0
|
||||
//#else
|
||||
//#define VER_PRIVATE VS_FF_PRIVATEBUILD
|
||||
//#endif
|
||||
|
||||
#define VER_SPECIALBUILD 0
|
||||
#define VER_COMMENTS_STR "Flavor=" QUOTE_MACRO(URTBLDENV_FRIENDLY)
|
||||
|
||||
#define VER_FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
#define VER_FILEFLAGS (VER_PRERELEASE|VER_DEBUG|VER_PRIVATE|VER_SPECIALBUILD)
|
||||
#define VER_FILEFLAGS VER_DEBUG
|
||||
#define VER_FILEOS VOS__WINDOWS32
|
||||
|
||||
#define VER_COMPANYNAME_STR "Microsoft Corporation"
|
||||
#define VER_FILETYPE VFT_UNKNOWN
|
||||
#define VER_FILESUBTYPE VFT2_UNKNOWN
|
||||
|
||||
#ifdef VER_LANGNEUTRAL
|
||||
#define VER_VERSION_UNICODE_LANG "000004B0" /* LANG_NEUTRAL/SUBLANG_NEUTRAL, Unicode CP */
|
||||
#define VER_VERSION_ANSI_LANG "000004E4" /* LANG_NEUTRAL/SUBLANG_NEUTRAL, Ansi CP */
|
||||
#define VER_VERSION_TRANSLATION 0x0000, 0x04B0
|
||||
#else
|
||||
#define VER_VERSION_UNICODE_LANG "040904B0" /* LANG_ENGLISH/SUBLANG_ENGLISH_US, Unicode CP */
|
||||
#define VER_VERSION_ANSI_LANG "040904E4" /* LANG_ENGLISH/SUBLANG_ENGLISH_US, Ansi CP */
|
||||
#define VER_VERSION_TRANSLATION 0x0409, 0x04B0
|
||||
#endif
|
||||
|
||||
#if defined(CSC_INVOKED)
|
||||
#define VER_COMMENTS_STR "Flavor=" + QUOTE_MACRO(URTBLDENV_FRIENDLY)
|
||||
#else
|
||||
#define VER_COMMENTS_STR "Flavor=" QUOTE_MACRO(URTBLDENV_FRIENDLY)
|
||||
#endif
|
||||
|
||||
#if defined(__BUILDMACHINE__)
|
||||
#if defined(__BUILDDATE__)
|
||||
#define B2(x,y) " (" #x "." #y ")"
|
||||
#define B1(x,y) B2(x, y)
|
||||
#define BUILD_MACHINE_TAG B1(__BUILDMACHINE__, __BUILDDATE__)
|
||||
#else
|
||||
#define B2(x) " built by: " #x
|
||||
#define B1(x) B2(x)
|
||||
#define BUILD_MACHINE_TAG B1(__BUILDMACHINE__)
|
||||
#endif
|
||||
#if defined(__BUILDMACHINE_LEN__)
|
||||
#if __BUILDMACHINE_LEN__ >= 25
|
||||
#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG
|
||||
#elif __BUILDMACHINE_LEN__ == 24
|
||||
#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
|
||||
#elif __BUILDMACHINE_LEN__ == 23
|
||||
#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
|
||||
#elif __BUILDMACHINE_LEN__ == 22
|
||||
#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
|
||||
#elif __BUILDMACHINE_LEN__ == 21
|
||||
#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
|
||||
#elif __BUILDMACHINE_LEN__ == 20
|
||||
#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
|
||||
#elif __BUILDMACHINE_LEN__ == 19
|
||||
#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
|
||||
#elif __BUILDMACHINE_LEN__ == 18
|
||||
#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
|
||||
#elif __BUILDMACHINE_LEN__ == 17
|
||||
#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
|
||||
#elif __BUILDMACHINE_LEN__ == 16
|
||||
#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
|
||||
#elif __BUILDMACHINE_LEN__ == 15
|
||||
#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
|
||||
#elif __BUILDMACHINE_LEN__ == 14
|
||||
#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
|
||||
#elif __BUILDMACHINE_LEN__ == 13
|
||||
#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
|
||||
#elif __BUILDMACHINE_LEN__ == 12
|
||||
#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
|
||||
#elif __BUILDMACHINE_LEN__ == 11
|
||||
#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
|
||||
#elif __BUILDMACHINE_LEN__ == 10
|
||||
#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
|
||||
#elif __BUILDMACHINE_LEN__ == 9
|
||||
#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
|
||||
#elif __BUILDMACHINE_LEN__ == 8
|
||||
#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
|
||||
#elif __BUILDMACHINE_LEN__ == 7
|
||||
#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
|
||||
#elif __BUILDMACHINE_LEN__ == 6
|
||||
#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
|
||||
#elif __BUILDMACHINE_LEN__ == 5
|
||||
#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
|
||||
#elif __BUILDMACHINE_LEN__ == 4
|
||||
#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
|
||||
#elif __BUILDMACHINE_LEN__ == 3
|
||||
#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
|
||||
#elif __BUILDMACHINE_LEN__ == 2
|
||||
#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
|
||||
#elif __BUILDMACHINE_LEN__ == 1
|
||||
#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
|
||||
#else
|
||||
#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG
|
||||
#endif
|
||||
#else
|
||||
#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG
|
||||
#endif
|
||||
#else
|
||||
#define BUILD_MACHINE_TAG
|
||||
#define BUILD_MACHINE_TAG_PADDED
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -2,35 +2,6 @@
|
|||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
/*---------------------------------------------------------------*/
|
||||
/* */
|
||||
/* The following section actually creates the version structure. */
|
||||
/* They are ignored if we are not being invoked by RC. */
|
||||
/* */
|
||||
/* ntverp.H must be included before including this file */
|
||||
/* */
|
||||
/* If VER_LEGALCOPYRIGHT_STR is not defined, it will be */
|
||||
/* constructed using VER_LEGALCOPYRIGHT_YEARS, so at least one */
|
||||
/* these macros must be defined before including this file. */
|
||||
/* */
|
||||
/* VER_FILETYPE, VER_FILESUBTYPE, VER_FILEDESCRIPTION_STR, and */
|
||||
/* VER_INTERNALNAME_STR must be defined before including this */
|
||||
/* file. */
|
||||
/* */
|
||||
/* If VER_FILEVERSION is not defined, VER_PRODUCTVERSION will be */
|
||||
/* used instead. If VER_FILEVERSION_STR is not defined, */
|
||||
/* VER_PRODUCTVERSION_STR will be used instead. */
|
||||
/* */
|
||||
/* If VER_ORIGINALFILENAME_STR is not defined, it is set to */
|
||||
/* the value in VER_INTERNALNAME_STR. */
|
||||
/* */
|
||||
/* If INTL is defined, then this is assumed to be an */
|
||||
/* an international build; two string blocks will be created, */
|
||||
/* (since all version resources must have English), and the */
|
||||
/* second one can be localized */
|
||||
/* */
|
||||
/*---------------------------------------------------------------*/
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <_version.h>
|
||||
#endif //_WIN32
|
||||
|
@ -51,44 +22,15 @@ BEGIN
|
|||
BLOCK VER_VERSION_UNICODE_LANG
|
||||
BEGIN
|
||||
VALUE "CompanyName", VER_COMPANYNAME_STR
|
||||
VALUE "FileDescription", VER_FILEDESCRIPTION_STR EXPORT_TAG
|
||||
VALUE "FileVersion", VER_FILEVERSION_STR BUILD_MACHINE_TAG_PADDED
|
||||
VALUE "InternalName", VER_INTERNALNAME_STR
|
||||
VALUE "LegalCopyright", VER_LEGALCOPYRIGHT_STR
|
||||
VALUE "OriginalFilename",VER_ORIGINALFILENAME_STR
|
||||
VALUE "ProductName", VER_PRODUCTNAME_STR
|
||||
VALUE "ProductVersion", VER_FILEVERSION_STR
|
||||
#ifdef VER_OLESELFREGISTER
|
||||
VALUE "OleSelfRegister", "\0"
|
||||
#endif
|
||||
VALUE "Comments", VER_COMMENTS_STR
|
||||
#ifdef VER_EXTRA_VALUES
|
||||
VER_EXTRA_VALUES
|
||||
#endif
|
||||
|
||||
END
|
||||
|
||||
|
||||
#ifdef VER_ANSICP /* Some apps are hard coded to look for ANSI CP. */
|
||||
BLOCK VER_VERSION_ANSI_LANG
|
||||
BEGIN
|
||||
VALUE "CompanyName", VER_COMPANYNAME_STR
|
||||
VALUE "FileDescription", VER_FILEDESCRIPTION_STR EXPORT_TAG
|
||||
VALUE "FileDescription", VER_FILEDESCRIPTION_STR
|
||||
VALUE "FileVersion", VER_FILEVERSION_STR
|
||||
VALUE "InternalName", VER_INTERNALNAME_STR
|
||||
VALUE "LegalCopyright", VER_LEGALCOPYRIGHT_STR
|
||||
VALUE "OriginalFilename",VER_ORIGINALFILENAME_STR
|
||||
VALUE "ProductName", VER_PRODUCTNAME_STR
|
||||
VALUE "ProductVersion", VER_FILEVERSION_STR
|
||||
#ifdef VER_OLESELFREGISTER
|
||||
VALUE "OleSelfRegister", "\0"
|
||||
#endif
|
||||
VALUE "Comments", VER_COMMENTS_STR
|
||||
#ifdef VER_EXTRA_VALUES
|
||||
VER_EXTRA_VALUES
|
||||
#endif
|
||||
END
|
||||
#endif
|
||||
END
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -1,17 +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 VER_PRODUCTNAME_STR
|
||||
#define VER_PRODUCTNAME_STR L"Microsoft\256 .NET"
|
||||
#endif
|
||||
|
||||
#ifndef VER_LEGALCOPYRIGHT_STR
|
||||
#define VER_LEGALCOPYRIGHT_STR "\251 Microsoft Corporation. All rights reserved."
|
||||
#define VER_LEGALCOPYRIGHT_STR_L L"\251 Microsoft Corporation. All rights reserved."
|
||||
#endif
|
||||
|
||||
#ifndef VER_LEGALCOPYRIGHT_LOGO_STR
|
||||
#define VER_LEGALCOPYRIGHT_LOGO_STR "Copyright (c) Microsoft Corporation. All rights reserved."
|
||||
#define VER_LEGALCOPYRIGHT_LOGO_STR_L L"Copyright (c) Microsoft Corporation. All rights reserved."
|
||||
#endif
|
|
@ -1,4 +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.
|
||||
#include <fxver.h>
|
|
@ -1,15 +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.
|
||||
|
||||
#if 0
|
||||
/**** Generated Based on d:\ProjectK\src\InternalApis\Version\buildnumber.settings.targets
|
||||
One can't put comments in this file (without the #if)
|
||||
because this header is preprocessed in non-C++ context (xml, perl, etc.). *****/
|
||||
#endif
|
||||
#define NDPVersionNumberMajor 4
|
||||
#define NDPVersionNumberMinor 0
|
||||
#define NDPVersionNumberMajor_A "4"
|
||||
#define NDPVersionNumberMinor_A "00"
|
||||
#define NDPVersionNumbers_A "4.00"
|
||||
#include "buildnumber.h"
|
|
@ -1,113 +0,0 @@
|
|||
|
||||
#if 0
|
||||
Version strings for product keys... no comments can be allowed in this
|
||||
file due to some usage of this in the build process.
|
||||
// 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.
|
||||
#endif
|
||||
|
||||
#include <version.h>
|
||||
#ifdef USE_CLR20_VERSION
|
||||
#include <asm_version20.h>
|
||||
#else
|
||||
#include <asm_version.h>
|
||||
#endif
|
||||
|
||||
#ifdef CLR_MAJOR_VERSION
|
||||
#undef CLR_MAJOR_VERSION
|
||||
#endif
|
||||
|
||||
#ifdef CLR_MINOR_VERSION
|
||||
#undef CLR_MINOR_VERSION
|
||||
#endif
|
||||
|
||||
#ifdef CLR_BUILD_VERSION
|
||||
#undef CLR_BUILD_VERSION
|
||||
#endif
|
||||
|
||||
#ifdef CLR_BUILD_VERSION_QFE
|
||||
#undef CLR_BUILD_VERSION_QFE
|
||||
#endif
|
||||
|
||||
#ifdef VER_FILEVERSIONMINOR
|
||||
#undef VER_FILEVERSIONMINOR
|
||||
#endif
|
||||
|
||||
#ifdef VER_FILEVERSIONBUILD
|
||||
#undef VER_FILEVERSIONBUILD
|
||||
#endif
|
||||
|
||||
#ifdef VER_FILEVERSIONREVISION
|
||||
#undef VER_FILEVERSIONREVISION
|
||||
#endif
|
||||
|
||||
#define CLR_MAJOR_VERSION rmj
|
||||
#define CLR_MINOR_VERSION rmm
|
||||
#define CLR_BUILD_VERSION rup
|
||||
#define CLR_BUILD_VERSION_QFE rpt
|
||||
|
||||
#define VER_FILEVERSIONMINOR fvn
|
||||
#define VER_FILEVERSIONBUILD fvb
|
||||
#define VER_FILEVERSIONREVISION fvr
|
||||
|
||||
#define VER_ASSEMBLYMAJORVERSION asm_rmj
|
||||
#define VER_ASSEMBLYMINORVERSION asm_rmm
|
||||
#define VER_ASSEMBLYBUILD asm_rup
|
||||
#define VER_ASSEMBLYBUILD_QFE asm_rpt
|
||||
|
||||
#define QUOTE_MACRO_HELPER(x) #x
|
||||
#define QUOTE_MACRO(x) QUOTE_MACRO_HELPER(x)
|
||||
|
||||
#ifndef QUOTE_MACRO_L
|
||||
#define QUOTE_MACRO_L_HELPER(x) L###x
|
||||
#define QUOTE_MACRO_L(x) QUOTE_MACRO_L_HELPER(x)
|
||||
#endif
|
||||
|
||||
#define CONCAT_MACRO_HELPER(x, y) x ## y
|
||||
#define CONCAT_MACRO(x, y) CONCAT_MACRO_HELPER(x, y)
|
||||
|
||||
#define VER_PRODUCTVERSION CLR_MAJOR_VERSION,CLR_MINOR_VERSION,CLR_BUILD_VERSION,CLR_BUILD_VERSION_QFE
|
||||
#define VER_DOTFILEVERSION CLR_MAJOR_VERSION,VER_FILEVERSIONMINOR,VER_FILEVERSIONBUILD,VER_FILEVERSIONREVISION
|
||||
#define VER_MANAGED_DOTFILEVERSION CLR_MAJOR_VERSION.VER_FILEVERSIONMINOR.VER_FILEVERSIONBUILD.VER_FILEVERSIONREVISION
|
||||
|
||||
#define VER_DOTPRODUCTVERSION CLR_MAJOR_VERSION.CLR_MINOR_VERSION.CLR_BUILD_VERSION.CLR_BUILD_VERSION_QFE
|
||||
#define VER_DOTPRODUCTMAJORMINOR CLR_MAJOR_VERSION.CLR_MINOR_VERSION
|
||||
#define VER_DOTPRODUCTVERSIONNOQFE CLR_MAJOR_VERSION.CLR_MINOR_VERSION.CLR_BUILD_VERSION
|
||||
#define VER_DOTPRODUCTVERSIONZEROQFE CLR_MAJOR_VERSION.CLR_MINOR_VERSION.CLR_BUILD_VERSION.0
|
||||
#define VER_DOTASSEMBLYVERSION VER_ASSEMBLYMAJORVERSION.VER_ASSEMBLYMINORVERSION.VER_ASSEMBLYBUILD.VER_ASSEMBLYBUILD_QFE
|
||||
#define VER_DOTASSEMBLYVERSION3PART VER_ASSEMBLYMAJORVERSION.VER_ASSEMBLYMINORVERSION.VER_ASSEMBLYBUILD
|
||||
|
||||
#define VER_UNDERSCORE_PRODUCTVERSION_STR3 CONCAT_MACRO(_, CLR_BUILD_VERSION)
|
||||
#define VER_UNDERSCORE_PRODUCTVERSION_STR2 CONCAT_MACRO(CLR_MINOR_VERSION, VER_UNDERSCORE_PRODUCTVERSION_STR3)
|
||||
#define VER_UNDERSCORE_PRODUCTVERSION_STR1 CONCAT_MACRO(_, VER_UNDERSCORE_PRODUCTVERSION_STR2)
|
||||
#define VER_UNDERSCORE_PRODUCTVERSION CONCAT_MACRO(CLR_MAJOR_VERSION, VER_UNDERSCORE_PRODUCTVERSION_STR1)
|
||||
|
||||
#define VER_UNDERSCORE_PRODUCTVERSION_STR QUOTE_MACRO(VER_UNDERSCORE_PRODUCTVERSION)
|
||||
#define VER_UNDERSCORE_PRODUCTVERSION_STR_L QUOTE_MACRO_L(VER_UNDERSCORE_PRODUCTVERSION)
|
||||
|
||||
#define FX_FILEVERSION_STR QUOTE_MACRO(VER_MANAGED_DOTFILEVERSION)
|
||||
#define VER_PRODUCTVERSION_STR QUOTE_MACRO(VER_DOTPRODUCTVERSION)
|
||||
#define VER_PRODUCTVERSION_STR_L QUOTE_MACRO_L(VER_DOTPRODUCTVERSION)
|
||||
|
||||
#define VER_PRODUCTMAJORMINOR_STR QUOTE_MACRO(VER_DOTPRODUCTMAJORMINOR)
|
||||
#define VER_PRODUCTMAJORMINOR_STR_L QUOTE_MACRO_L(VER_DOTPRODUCTMAJORMINOR)
|
||||
|
||||
#define VER_PRODUCTVERSION_NO_QFE_STR QUOTE_MACRO(VER_DOTPRODUCTVERSIONNOQFE)
|
||||
#define VER_PRODUCTVERSION_NO_QFE_STR_L QUOTE_MACRO_L(VER_DOTPRODUCTVERSIONNOQFE)
|
||||
|
||||
#define VER_PRODUCTVERSION_ZERO_QFE_STR QUOTE_MACRO(VER_DOTPRODUCTVERSIONZEROQFE)
|
||||
#define VER_PRODUCTVERSION_ZERO_QFE_STR_L QUOTE_MACRO_L(VER_DOTPRODUCTVERSIONZEROQFE)
|
||||
|
||||
#define VER_PRODUCTVERSION_NO_QFE_STR QUOTE_MACRO(VER_DOTPRODUCTVERSIONNOQFE)
|
||||
#define VER_PRODUCTVERSION_NO_QFE_STR_L QUOTE_MACRO_L(VER_DOTPRODUCTVERSIONNOQFE)
|
||||
|
||||
#define VER_ASSEMBLYVERSION_STR QUOTE_MACRO(VER_DOTASSEMBLYVERSION)
|
||||
#define VER_ASSEMBLYVERSION_STR_L QUOTE_MACRO_L(VER_DOTASSEMBLYVERSION)
|
||||
|
||||
#define VER_ASSEMBLYVERSION3PART_STR QUOTE_MACRO(VER_DOTASSEMBLYVERSION3PART)
|
||||
#define VER_ASSEMBLYVERSION3PART_STR_L QUOTE_MACRO_L(VER_DOTASSEMBLYVERSION3PART)
|
||||
|
||||
#define VER_ECMA_PUBLICKEY b77a5c561934e089
|
||||
#define ECMA_PUBLICKEY_STR QUOTE_MACRO(VER_ECMA_PUBLICKEY)
|
||||
#define ECMA_PUBLICKEY_STR_L QUOTE_MACRO_L(VER_ECMA_PUBLICKEY)
|
|
@ -1,17 +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.
|
||||
|
||||
#include <ndpversion_generated.h>
|
||||
|
||||
#define rmj NDPVersionNumberMajor
|
||||
#define rmm NDPVersionNumberMinor
|
||||
#define rup NDPBuildNumberMajor
|
||||
#define rpt NDPBuildNumberMinor
|
||||
|
||||
#define fvn NDPFileVersionMinor
|
||||
#define fvb NDPFileVersionBuild
|
||||
#define fvr NDPFileVersionRevision
|
||||
|
||||
#define szVerName ""
|
||||
#define szVerUser ""
|
|
@ -11,7 +11,7 @@
|
|||
#include <io.h>
|
||||
|
||||
#include <windows.h>
|
||||
#include <fxver.h>
|
||||
#include <clrversion.h>
|
||||
#include <mscorsvc.h>
|
||||
|
||||
#include "palclr.h"
|
||||
|
@ -93,7 +93,7 @@ void ErrorWin32(DWORD err)
|
|||
void PrintLogoHelper()
|
||||
{
|
||||
Output(W("Microsoft (R) CoreCLR Native Image "));
|
||||
Outputf(W("Generator - Version %S\n"), VER_FILEVERSION_STR);
|
||||
Outputf(W("Generator - Version %S\n"), CLR_PRODUCT_VERSION);
|
||||
Outputf(W("%S\n"), VER_LEGALCOPYRIGHT_LOGO_STR);
|
||||
Output(W("\n"));
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include <crtdbg.h>
|
||||
#include <utilcode.h>
|
||||
#include "mdinfo.h"
|
||||
#include <ndpversion.h>
|
||||
|
||||
// Global variables
|
||||
bool g_bSchema = false;
|
||||
|
@ -26,7 +25,7 @@ void DisplayArchive(__in_z __in WCHAR* szFile, ULONG DumpFilter, __in_z __in_opt
|
|||
|
||||
void PrintLogo()
|
||||
{
|
||||
printf("Microsoft (R) .NET Frameworks Runtime Meta Data Dump Utility Version %s\n", VER_FILEVERSION_STR);
|
||||
printf("Microsoft (R) .NET Runtime Meta Data Dump Utility Version %s\n", CLR_PRODUCT_VERSION);
|
||||
printf("%S", VER_LEGALCOPYRIGHT_LOGO_STR_L);
|
||||
printf("\n");
|
||||
}// PrintLogo
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include "stdafx.h" // Standard header.
|
||||
#include <utilcode.h> // Utility helpers.
|
||||
#include <corerror.h>
|
||||
#include "ndpversion.h"
|
||||
|
||||
#include "../dlls/mscorrc/resource.h"
|
||||
#ifdef HOST_UNIX
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
#include <wininet.h>
|
||||
#include <urlmon.h>
|
||||
#include <version.h>
|
||||
|
||||
DWORD
|
||||
GetFileVersionInfoSizeW_NoThrow(
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "stdafx.h" // Standard header.
|
||||
#include <utilcode.h> // Utility helpers.
|
||||
#include <corerror.h>
|
||||
#include "ndpversion.h"
|
||||
#include "clrversion.h"
|
||||
#include "../dlls/mscorrc/resource.h"
|
||||
#include "ex.h"
|
||||
#if !defined(FEATURE_CORESYSTEM)
|
||||
|
@ -203,7 +203,7 @@ int UtilMessageBoxNonLocalizedVA(
|
|||
{
|
||||
StackSString message;
|
||||
|
||||
message.Printf(W(".NET Runtime version : %s - "), VER_FILEVERSION_STR_L);
|
||||
message.Printf(W(".NET Runtime version : %s - "), CLR_PRODUCT_VERSION_L);
|
||||
if (lpTitle)
|
||||
message.Append(lpTitle);
|
||||
if (!formattedMessage.IsEmpty())
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include "winwrap.h" // Header for macros and functions.
|
||||
#include "utilcode.h"
|
||||
#include "holder.h"
|
||||
#include "ndpversion.h"
|
||||
#include "pedecoder.h"
|
||||
|
||||
|
||||
|
|
|
@ -25,8 +25,6 @@
|
|||
#define g_CollectionsGenericReadOnlyCollectionItfName "System.Collections.Generic.IReadOnlyCollection`1"
|
||||
|
||||
#ifdef FEATURE_COMINTEROP
|
||||
#define g_ECMAKeyToken "B77A5C561934E089" // The ECMA key used by some framework assemblies: mscorlib, system, etc.
|
||||
#define g_FXKeyToken "b03f5f7f11d50a3a" // The FX key used by other framework assemblies: System.Web, System.Drawing, etc.
|
||||
#define g_CorelibAsmName "System.Private.CoreLib"
|
||||
#define g_SystemAsmName "System"
|
||||
#define g_SystemRuntimeAsmName "System.Runtime"
|
||||
|
|
|
@ -990,21 +990,21 @@ struct WinRtHR_to_ExceptionKind_Map
|
|||
enum WinRtOnly_ExceptionKind {
|
||||
#define DEFINE_EXCEPTION_HR_WINRT_ONLY(ns, reKind, ...) kWinRtEx##reKind,
|
||||
#define DEFINE_EXCEPTION(ns, reKind, bHRformessage, ...)
|
||||
#define DEFINE_EXCEPTION_IN_OTHER_FX_ASSEMBLY(ns, reKind, assemblySimpleName, publicKeyToken, bHRformessage, ...)
|
||||
#define DEFINE_EXCEPTION_IN_OTHER_FX_ASSEMBLY(ns, reKind, assemblySimpleName, bHRformessage, ...)
|
||||
#include "rexcep.h"
|
||||
kWinRtExLastException
|
||||
};
|
||||
|
||||
#define DEFINE_EXCEPTION_HR_WINRT_ONLY(ns, reKind, ...) static const HRESULT s_##reKind##WinRtOnlyHRs[] = { __VA_ARGS__ };
|
||||
#define DEFINE_EXCEPTION(ns, reKind, bHRformessage, ...)
|
||||
#define DEFINE_EXCEPTION_IN_OTHER_FX_ASSEMBLY(ns, reKind, assemblySimpleName, publicKeyToken, bHRformessage, ...)
|
||||
#define DEFINE_EXCEPTION_IN_OTHER_FX_ASSEMBLY(ns, reKind, assemblySimpleName, bHRformessage, ...)
|
||||
#include "rexcep.h"
|
||||
|
||||
static const
|
||||
WinRtHR_to_ExceptionKind_Map gWinRtHR_to_ExceptionKind_Maps[] = {
|
||||
#define DEFINE_EXCEPTION_HR_WINRT_ONLY(ns, reKind, ...) { k##reKind, sizeof(s_##reKind##WinRtOnlyHRs) / sizeof(HRESULT), s_##reKind##WinRtOnlyHRs },
|
||||
#define DEFINE_EXCEPTION(ns, reKind, bHRformessage, ...)
|
||||
#define DEFINE_EXCEPTION_IN_OTHER_FX_ASSEMBLY(ns, reKind, assemblySimpleName, publicKeyToken, bHRformessage, ...)
|
||||
#define DEFINE_EXCEPTION_IN_OTHER_FX_ASSEMBLY(ns, reKind, assemblySimpleName, bHRformessage, ...)
|
||||
#include "rexcep.h"
|
||||
};
|
||||
|
||||
|
@ -1018,14 +1018,14 @@ struct ExceptionHRInfo
|
|||
|
||||
#define DEFINE_EXCEPTION(ns, reKind, bHRformessage, ...) static const HRESULT s_##reKind##HRs[] = { __VA_ARGS__ };
|
||||
#define DEFINE_EXCEPTION_HR_WINRT_ONLY(ns, reKind, ...)
|
||||
#define DEFINE_EXCEPTION_IN_OTHER_FX_ASSEMBLY(ns, reKind, assemblySimpleName, publicKeyToken, bHRformessage, ...) DEFINE_EXCEPTION(ns, reKind, bHRformessage, __VA_ARGS__)
|
||||
#define DEFINE_EXCEPTION_IN_OTHER_FX_ASSEMBLY(ns, reKind, assemblySimpleName, bHRformessage, ...) DEFINE_EXCEPTION(ns, reKind, bHRformessage, __VA_ARGS__)
|
||||
#include "rexcep.h"
|
||||
|
||||
static const
|
||||
ExceptionHRInfo gExceptionHRInfos[] = {
|
||||
#define DEFINE_EXCEPTION(ns, reKind, bHRformessage, ...) {sizeof(s_##reKind##HRs) / sizeof(HRESULT), s_##reKind##HRs},
|
||||
#define DEFINE_EXCEPTION_HR_WINRT_ONLY(ns, reKind, ...)
|
||||
#define DEFINE_EXCEPTION_IN_OTHER_FX_ASSEMBLY(ns, reKind, assemblySimpleName, publicKeyToken, bHRformessage, ...) DEFINE_EXCEPTION(ns, reKind, bHRformessage, __VA_ARGS__)
|
||||
#define DEFINE_EXCEPTION_IN_OTHER_FX_ASSEMBLY(ns, reKind, assemblySimpleName, bHRformessage, ...) DEFINE_EXCEPTION(ns, reKind, bHRformessage, __VA_ARGS__)
|
||||
#include "rexcep.h"
|
||||
};
|
||||
|
||||
|
@ -1035,7 +1035,7 @@ bool gShouldDisplayHR[] =
|
|||
{
|
||||
#define DEFINE_EXCEPTION(ns, reKind, bHRformessage, ...) bHRformessage,
|
||||
#define DEFINE_EXCEPTION_HR_WINRT_ONLY(ns, reKind, ...)
|
||||
#define DEFINE_EXCEPTION_IN_OTHER_FX_ASSEMBLY(ns, reKind, assemblySimpleName, publicKeyToken, bHRformessage, ...) DEFINE_EXCEPTION(ns, reKind, bHRformessage, __VA_ARGS__)
|
||||
#define DEFINE_EXCEPTION_IN_OTHER_FX_ASSEMBLY(ns, reKind, assemblySimpleName, bHRformessage, ...) DEFINE_EXCEPTION(ns, reKind, bHRformessage, __VA_ARGS__)
|
||||
#include "rexcep.h"
|
||||
};
|
||||
|
||||
|
@ -2595,7 +2595,7 @@ ArrayReference<const HRESULT> GetHRESULTsForExceptionKind(RuntimeExceptionKind k
|
|||
return ArrayReference<const HRESULT>(s_##reKind##HRs); \
|
||||
break;
|
||||
#define DEFINE_EXCEPTION_HR_WINRT_ONLY(ns, reKind, ...)
|
||||
#define DEFINE_EXCEPTION_IN_OTHER_FX_ASSEMBLY(ns, reKind, assemblySimpleName, publicKeyToken, bHRformessage, ...) DEFINE_EXCEPTION(ns, reKind, bHRformessage, __VA_ARGS__)
|
||||
#define DEFINE_EXCEPTION_IN_OTHER_FX_ASSEMBLY(ns, reKind, assemblySimpleName, bHRformessage, ...) DEFINE_EXCEPTION(ns, reKind, bHRformessage, __VA_ARGS__)
|
||||
#include "rexcep.h"
|
||||
|
||||
default:
|
||||
|
|
|
@ -98,7 +98,6 @@
|
|||
|
||||
#define POISONC ((UINT_PTR)((sizeof(int *) == 4)?0xCCCCCCCCL:I64(0xCCCCCCCCCCCCCCCC)))
|
||||
|
||||
#include "ndpversion.h"
|
||||
#include "switches.h"
|
||||
#include "holder.h"
|
||||
#include "classnames.h"
|
||||
|
|
|
@ -1685,10 +1685,10 @@ void DomainAssembly::GetCurrentVersionInfo(CORCOMPILE_VERSION_INFO *pNativeVersi
|
|||
|
||||
pNativeVersionInfo->wMachine = IMAGE_FILE_MACHINE_NATIVE_NI;
|
||||
|
||||
pNativeVersionInfo->wVersionMajor = CLR_MAJOR_VERSION;
|
||||
pNativeVersionInfo->wVersionMinor = CLR_MINOR_VERSION;
|
||||
pNativeVersionInfo->wVersionBuildNumber = CLR_BUILD_VERSION;
|
||||
pNativeVersionInfo->wVersionPrivateBuildNumber = CLR_BUILD_VERSION_QFE;
|
||||
pNativeVersionInfo->wVersionMajor = RuntimeFileMajorVersion;
|
||||
pNativeVersionInfo->wVersionMinor = RuntimeFileMinorVersion;
|
||||
pNativeVersionInfo->wVersionBuildNumber = RuntimeFileBuildVersion;
|
||||
pNativeVersionInfo->wVersionPrivateBuildNumber = RuntimeFileRevisionVersion;
|
||||
|
||||
GetNGenCpuInfo(&pNativeVersionInfo->cpuInfo);
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "ex.h"
|
||||
#include "dbginterface.h"
|
||||
#include "finalizerthread.h"
|
||||
#include "clrversion.h"
|
||||
|
||||
#define Win32EventWrite EventWrite
|
||||
|
||||
|
@ -4934,17 +4935,17 @@ VOID ETW::InfoLog::RuntimeInformation(INT32 type)
|
|||
PathString dllPath;
|
||||
UINT8 Sku = ETW::InfoLog::InfoStructs::CoreCLR;
|
||||
|
||||
//version info for clr.dll
|
||||
USHORT vmMajorVersion = CLR_MAJOR_VERSION;
|
||||
USHORT vmMinorVersion = CLR_MINOR_VERSION;
|
||||
USHORT vmBuildVersion = CLR_BUILD_VERSION;
|
||||
USHORT vmQfeVersion = CLR_BUILD_VERSION_QFE;
|
||||
//version info for coreclr.dll
|
||||
USHORT vmMajorVersion = RuntimeFileMajorVersion;
|
||||
USHORT vmMinorVersion = RuntimeFileMinorVersion;
|
||||
USHORT vmBuildVersion = RuntimeFileBuildVersion;
|
||||
USHORT vmRevisionVersion = RuntimeFileRevisionVersion;
|
||||
|
||||
//version info for mscorlib.dll
|
||||
USHORT bclMajorVersion = VER_ASSEMBLYMAJORVERSION;
|
||||
USHORT bclMinorVersion = VER_ASSEMBLYMINORVERSION;
|
||||
USHORT bclBuildVersion = VER_ASSEMBLYBUILD;
|
||||
USHORT bclQfeVersion = VER_ASSEMBLYBUILD_QFE;
|
||||
//version info for System.Private.CoreLib.dll
|
||||
USHORT bclMajorVersion = RuntimeProductMajorVersion;
|
||||
USHORT bclMinorVersion = RuntimeProductMinorVersion;
|
||||
USHORT bclBuildVersion = RuntimeProductPatchVersion;
|
||||
USHORT bclRevisionVersion = 0;
|
||||
|
||||
LPCGUID comGUID=&IID_NULL;
|
||||
|
||||
|
@ -4964,11 +4965,11 @@ VOID ETW::InfoLog::RuntimeInformation(INT32 type)
|
|||
bclMajorVersion,
|
||||
bclMinorVersion,
|
||||
bclBuildVersion,
|
||||
bclQfeVersion,
|
||||
bclRevisionVersion,
|
||||
vmMajorVersion,
|
||||
vmMinorVersion,
|
||||
vmBuildVersion,
|
||||
vmQfeVersion,
|
||||
vmRevisionVersion,
|
||||
startupFlags,
|
||||
startupMode,
|
||||
lpwszCommandLine,
|
||||
|
@ -4982,11 +4983,11 @@ VOID ETW::InfoLog::RuntimeInformation(INT32 type)
|
|||
bclMajorVersion,
|
||||
bclMinorVersion,
|
||||
bclBuildVersion,
|
||||
bclQfeVersion,
|
||||
bclRevisionVersion,
|
||||
vmMajorVersion,
|
||||
vmMinorVersion,
|
||||
vmBuildVersion,
|
||||
vmQfeVersion,
|
||||
vmRevisionVersion,
|
||||
startupFlags,
|
||||
startupMode,
|
||||
lpwszCommandLine,
|
||||
|
|
|
@ -16,16 +16,14 @@ struct ExceptionLocationData
|
|||
LPCUTF8 Namespace;
|
||||
LPCUTF8 Name;
|
||||
LPCUTF8 AssemblySimpleName;
|
||||
LPCUTF8 PublicKeyToken;
|
||||
};
|
||||
|
||||
static const
|
||||
ExceptionLocationData g_ExceptionLocationData[] = {
|
||||
#define DEFINE_EXCEPTION(ns, reKind, bHRformessage, ...)
|
||||
#define DEFINE_EXCEPTION_HR_WINRT_ONLY(ns, reKind, ...)
|
||||
#define DEFINE_EXCEPTION_IN_OTHER_FX_ASSEMBLY(ns, reKind, assemblySimpleName, publicKeyToken, bHRformessage, ...) { ns, PTR_CSTR((TADDR) # reKind), assemblySimpleName, publicKeyToken },
|
||||
#define DEFINE_EXCEPTION_IN_OTHER_FX_ASSEMBLY(ns, reKind, assemblySimpleName, bHRformessage, ...) { ns, PTR_CSTR((TADDR) # reKind), assemblySimpleName },
|
||||
#include "rexcep.h"
|
||||
{NULL, NULL, NULL, NULL} // On Silverlight, this table may be empty. This dummy entry allows us to compile.
|
||||
};
|
||||
|
||||
|
||||
|
@ -39,7 +37,7 @@ MethodTable* FrameworkExceptionLoader::GetException(RuntimeExceptionKind kind)
|
|||
GC_TRIGGERS;
|
||||
|
||||
PRECONDITION(kind > kLastExceptionInMscorlib);
|
||||
PRECONDITION(kind - (kLastExceptionInMscorlib + 1) < COUNTOF(g_ExceptionLocationData) - 1);
|
||||
PRECONDITION(kind - (kLastExceptionInMscorlib + 1) < COUNTOF(g_ExceptionLocationData));
|
||||
}
|
||||
CONTRACTL_END;
|
||||
|
||||
|
@ -48,7 +46,7 @@ MethodTable* FrameworkExceptionLoader::GetException(RuntimeExceptionKind kind)
|
|||
// Note that some assemblies, like System.Runtime.WindowsRuntime, might not be installed on pre-Windows 8 machines.
|
||||
int index = kind - (kLastExceptionInMscorlib + 1);
|
||||
ExceptionLocationData exData = g_ExceptionLocationData[index];
|
||||
_ASSERTE(exData.Name != NULL && exData.AssemblySimpleName != NULL && exData.PublicKeyToken != NULL); // Was the exception defined in mscorlib instead?
|
||||
_ASSERTE(exData.Name != NULL && exData.AssemblySimpleName != NULL); // Was the exception defined in mscorlib instead?
|
||||
StackSString assemblyQualifiedName;
|
||||
_ASSERTE(exData.Namespace != NULL); // If we need to support stuff in a global namespace, fix this.
|
||||
assemblyQualifiedName.SetUTF8(exData.Namespace);
|
||||
|
@ -56,11 +54,6 @@ MethodTable* FrameworkExceptionLoader::GetException(RuntimeExceptionKind kind)
|
|||
assemblyQualifiedName.AppendUTF8(exData.Name);
|
||||
assemblyQualifiedName.AppendUTF8(", ");
|
||||
assemblyQualifiedName.AppendUTF8(exData.AssemblySimpleName);
|
||||
assemblyQualifiedName.AppendUTF8(", PublicKeyToken=");
|
||||
assemblyQualifiedName.AppendUTF8(exData.PublicKeyToken);
|
||||
assemblyQualifiedName.AppendUTF8(", Version=");
|
||||
assemblyQualifiedName.AppendUTF8(VER_ASSEMBLYVERSION_STR);
|
||||
assemblyQualifiedName.AppendUTF8(", Culture=neutral");
|
||||
|
||||
MethodTable* pMT = NULL;
|
||||
// Loading will either succeed or throw a FileLoadException. Catch & swallow that exception.
|
||||
|
@ -95,7 +88,7 @@ void FrameworkExceptionLoader::GetExceptionName(RuntimeExceptionKind kind, SStri
|
|||
MODE_ANY;
|
||||
|
||||
PRECONDITION(kind > kLastExceptionInMscorlib);
|
||||
PRECONDITION(kind - (kLastExceptionInMscorlib + 1) < COUNTOF(g_ExceptionLocationData) - 1);
|
||||
PRECONDITION(kind - (kLastExceptionInMscorlib + 1) < COUNTOF(g_ExceptionLocationData));
|
||||
} CONTRACTL_END;
|
||||
|
||||
exceptionName.SetUTF8(g_ExceptionLocationData[kind].Namespace);
|
||||
|
|
|
@ -288,17 +288,17 @@ static const BinderMethodID s_stubsDisposableToClosable[] =
|
|||
METHOD__IDISPOSABLE_TO_ICLOSABLE_ADAPTER__CLOSE
|
||||
};
|
||||
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(NCCWINRT_ASM_QUAL_TYPE_NAME, g_INotifyCollectionChanged_WinRTName, g_SystemRuntimeWindowsRuntimeAsmName, VER_ASSEMBLYVERSION_STR, g_ECMAKeyToken);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(NCCMA_ASM_QUAL_TYPE_NAME, g_NotifyCollectionChangedToManagedAdapterName, g_SystemRuntimeWindowsRuntimeAsmName, VER_ASSEMBLYVERSION_STR, g_ECMAKeyToken);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(NCCWA_ASM_QUAL_TYPE_NAME, g_NotifyCollectionChangedToWinRTAdapterName, g_SystemRuntimeWindowsRuntimeAsmName, VER_ASSEMBLYVERSION_STR, g_ECMAKeyToken);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(NPCWINRT_ASM_QUAL_TYPE_NAME, g_INotifyPropertyChanged_WinRTName, g_SystemRuntimeWindowsRuntimeAsmName, VER_ASSEMBLYVERSION_STR, g_ECMAKeyToken);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(NPCMA_ASM_QUAL_TYPE_NAME, g_NotifyPropertyChangedToManagedAdapterName, g_SystemRuntimeWindowsRuntimeAsmName, VER_ASSEMBLYVERSION_STR, g_ECMAKeyToken);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(NPCWA_ASM_QUAL_TYPE_NAME, g_NotifyPropertyChangedToWinRTAdapterName, g_SystemRuntimeWindowsRuntimeAsmName, VER_ASSEMBLYVERSION_STR, g_ECMAKeyToken);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(CMDWINRT_ASM_QUAL_TYPE_NAME, g_ICommand_WinRTName, g_SystemRuntimeWindowsRuntimeAsmName, VER_ASSEMBLYVERSION_STR, g_ECMAKeyToken);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(CMDMA_ASM_QUAL_TYPE_NAME, g_ICommandToManagedAdapterName, g_SystemRuntimeWindowsRuntimeAsmName, VER_ASSEMBLYVERSION_STR, g_ECMAKeyToken);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(CMDWA_ASM_QUAL_TYPE_NAME, g_ICommandToWinRTAdapterName, g_SystemRuntimeWindowsRuntimeAsmName, VER_ASSEMBLYVERSION_STR, g_ECMAKeyToken);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(NCCEHWINRT_ASM_QUAL_TYPE_NAME, g_NotifyCollectionChangedEventHandler_WinRT, g_SystemRuntimeWindowsRuntimeAsmName, VER_ASSEMBLYVERSION_STR, g_ECMAKeyToken);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(PCEHWINRT_ASM_QUAL_TYPE_NAME, g_PropertyChangedEventHandler_WinRT_Name, g_SystemRuntimeWindowsRuntimeAsmName, VER_ASSEMBLYVERSION_STR, g_ECMAKeyToken);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(NCCWINRT_ASM_QUAL_TYPE_NAME, g_INotifyCollectionChanged_WinRTName, g_SystemRuntimeWindowsRuntimeAsmName);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(NCCMA_ASM_QUAL_TYPE_NAME, g_NotifyCollectionChangedToManagedAdapterName, g_SystemRuntimeWindowsRuntimeAsmName);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(NCCWA_ASM_QUAL_TYPE_NAME, g_NotifyCollectionChangedToWinRTAdapterName, g_SystemRuntimeWindowsRuntimeAsmName);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(NPCWINRT_ASM_QUAL_TYPE_NAME, g_INotifyPropertyChanged_WinRTName, g_SystemRuntimeWindowsRuntimeAsmName);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(NPCMA_ASM_QUAL_TYPE_NAME, g_NotifyPropertyChangedToManagedAdapterName, g_SystemRuntimeWindowsRuntimeAsmName);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(NPCWA_ASM_QUAL_TYPE_NAME, g_NotifyPropertyChangedToWinRTAdapterName, g_SystemRuntimeWindowsRuntimeAsmName);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(CMDWINRT_ASM_QUAL_TYPE_NAME, g_ICommand_WinRTName, g_SystemRuntimeWindowsRuntimeAsmName);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(CMDMA_ASM_QUAL_TYPE_NAME, g_ICommandToManagedAdapterName, g_SystemRuntimeWindowsRuntimeAsmName);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(CMDWA_ASM_QUAL_TYPE_NAME, g_ICommandToWinRTAdapterName, g_SystemRuntimeWindowsRuntimeAsmName);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(NCCEHWINRT_ASM_QUAL_TYPE_NAME, g_NotifyCollectionChangedEventHandler_WinRT, g_SystemRuntimeWindowsRuntimeAsmName);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(PCEHWINRT_ASM_QUAL_TYPE_NAME, g_PropertyChangedEventHandler_WinRT_Name, g_SystemRuntimeWindowsRuntimeAsmName);
|
||||
|
||||
const WinRTInterfaceRedirector::NonMscorlibRedirectedInterfaceInfo WinRTInterfaceRedirector::s_rNonMscorlibInterfaceInfos[3] =
|
||||
{
|
||||
|
|
|
@ -479,7 +479,7 @@ public:
|
|||
IUnknown* MarshalObjectToInterface(OBJECTREF* ppObject, MethodTable* pItfMT, MethodTable* pClassMT, DWORD dwFlags);
|
||||
void UnmarshalObjectFromInterface(OBJECTREF *ppObjectDest, IUnknown **ppUnkSrc, MethodTable *pItfMT, MethodTable *pClassMT, DWORD dwFlags);
|
||||
|
||||
#define DEFINE_ASM_QUAL_TYPE_NAME(varname, typename, asmname, version, publickeytoken) static const char varname##[] = { typename##", "##asmname##", Culture=neutral, PublicKeyToken="##publickeytoken##", Version="##version };
|
||||
#define DEFINE_ASM_QUAL_TYPE_NAME(varname, typename, asmname) static const char varname##[] = { typename##", "##asmname## };
|
||||
|
||||
class ICOMInterfaceMarshalerCallback;
|
||||
void GetNativeWinRTFactoryObject(MethodTable *pMT, Thread *pThread, MethodTable *pFactoryIntfMT, BOOL bNeedUniqueRCW, ICOMInterfaceMarshalerCallback *pCallback, OBJECTREF *prefFactory);
|
||||
|
|
|
@ -39,24 +39,22 @@
|
|||
|
||||
|
||||
#ifdef FEATURE_COMINTEROP
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(ENUMERATOR_TO_ENUM_VARIANT_CM_NAME, g_EnumeratorToEnumClassName, g_CorelibAsmName, VER_ASSEMBLYVERSION_STR, g_ECMAKeyToken);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(ENUMERATOR_TO_ENUM_VARIANT_CM_NAME, g_EnumeratorToEnumClassName, g_CorelibAsmName);
|
||||
|
||||
static const int ENUMERATOR_TO_ENUM_VARIANT_CM_NAME_LEN = lengthof(ENUMERATOR_TO_ENUM_VARIANT_CM_NAME);
|
||||
static const char ENUMERATOR_TO_ENUM_VARIANT_CM_COOKIE[] = {""};
|
||||
static const int ENUMERATOR_TO_ENUM_VARIANT_CM_COOKIE_LEN = lengthof(ENUMERATOR_TO_ENUM_VARIANT_CM_COOKIE);
|
||||
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(COLOR_TRANSLATOR_ASM_QUAL_TYPE_NAME, g_ColorTranslatorClassName, g_DrawingAsmName, VER_ASSEMBLYVERSION_STR, g_FXKeyToken);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(COLOR_ASM_QUAL_TYPE_NAME, g_ColorClassName, g_DrawingAsmName, VER_ASSEMBLYVERSION_STR, g_FXKeyToken);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(COLOR_TRANSLATOR_ASM_QUAL_TYPE_NAME, g_ColorTranslatorClassName, g_DrawingAsmName);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(COLOR_ASM_QUAL_TYPE_NAME, g_ColorClassName, g_DrawingAsmName);
|
||||
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(URI_ASM_QUAL_TYPE_NAME, g_SystemUriClassName, g_SystemRuntimeAsmName, VER_ASSEMBLYVERSION_STR, g_FXKeyToken);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(URI_ASM_QUAL_TYPE_NAME, g_SystemUriClassName, g_SystemRuntimeAsmName);
|
||||
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(NCCEVENTARGS_ASM_QUAL_TYPE_NAME, g_NotifyCollectionChangedEventArgsName, g_ObjectModelAsmName, VER_ASSEMBLYVERSION_STR, g_FXKeyToken);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(NCCEVENTARGS_MARSHALER_ASM_QUAL_TYPE_NAME, g_NotifyCollectionChangedEventArgsMarshalerName, g_SystemRuntimeWindowsRuntimeAsmName, VER_ASSEMBLYVERSION_STR, g_ECMAKeyToken);
|
||||
|
||||
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(PCEVENTARGS_ASM_QUAL_TYPE_NAME, g_PropertyChangedEventArgsName, g_ObjectModelAsmName, VER_ASSEMBLYVERSION_STR, g_FXKeyToken);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(PCEVENTARGS_MARSHALER_ASM_QUAL_TYPE_NAME, g_PropertyChangedEventArgsMarshalerName, g_SystemRuntimeWindowsRuntimeAsmName, VER_ASSEMBLYVERSION_STR, g_ECMAKeyToken);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(NCCEVENTARGS_ASM_QUAL_TYPE_NAME, g_NotifyCollectionChangedEventArgsName, g_ObjectModelAsmName);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(NCCEVENTARGS_MARSHALER_ASM_QUAL_TYPE_NAME, g_NotifyCollectionChangedEventArgsMarshalerName, g_SystemRuntimeWindowsRuntimeAsmName);
|
||||
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(PCEVENTARGS_ASM_QUAL_TYPE_NAME, g_PropertyChangedEventArgsName, g_ObjectModelAsmName);
|
||||
DEFINE_ASM_QUAL_TYPE_NAME(PCEVENTARGS_MARSHALER_ASM_QUAL_TYPE_NAME, g_PropertyChangedEventArgsMarshalerName, g_SystemRuntimeWindowsRuntimeAsmName);
|
||||
|
||||
#define OLECOLOR_TO_SYSTEMCOLOR_METH_NAME "FromOle"
|
||||
#define SYSTEMCOLOR_TO_OLECOLOR_METH_NAME "ToOle"
|
||||
|
|
|
@ -130,16 +130,14 @@ void MngStdItfBase::InitHelper(
|
|||
pUComItfType->GetMethodTable()->CheckRunClassInitThrowing();
|
||||
|
||||
// Retrieve the custom marshaler type handle.
|
||||
SString sstrCMTypeName(SString::Utf8, strCMTypeName);
|
||||
*pCustomMarshalerType = TypeName::GetTypeFromAsmQualifiedName(sstrCMTypeName.GetUnicode());
|
||||
*pCustomMarshalerType = ClassLoader::LoadTypeByNameThrowing(SystemDomain::SystemAssembly(), NULL, strCMTypeName);
|
||||
|
||||
// Run the <clinit> for the marshaller.
|
||||
pCustomMarshalerType->GetMethodTable()->EnsureInstanceActive();
|
||||
pCustomMarshalerType->GetMethodTable()->CheckRunClassInitThrowing();
|
||||
|
||||
// Load the managed view.
|
||||
SString sstrManagedViewName(SString::Utf8, strManagedViewName);
|
||||
*pManagedViewType = TypeName::GetTypeFromAsmQualifiedName(sstrManagedViewName.GetUnicode());
|
||||
*pManagedViewType = ClassLoader::LoadTypeByNameThrowing(SystemDomain::SystemAssembly(), NULL, strManagedViewName);
|
||||
|
||||
// Run the <clinit> for the managed view.
|
||||
pManagedViewType->GetMethodTable()->EnsureInstanceActive();
|
||||
|
|
|
@ -30,9 +30,6 @@
|
|||
#define MNGSTDITF_DEFINE_METH3(FriendlyName, MethName, MethSig, FcallDecl) \
|
||||
MNGSTDITF_DEFINE_METH_IMPL(FriendlyName, MethName##_3, MethName, MethSig, FcallDecl)
|
||||
|
||||
#define CUSTOM_MARSHALER_ASM ", System.Private.CoreLib, Version=" VER_ASSEMBLYVERSION_STR ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
|
@ -83,7 +80,7 @@
|
|||
#define MNGSTDITF_IREFLECT_DECL__INVOKEMEMBER FCDECL9(Object*, InvokeMember, Object* refThisUNSAFE, Object* refNameUNSAFE, INT32 enumBindingAttr, Object* refBinderUNSAFE, Object* refTargetUNSAFE, Object* refArgsArrayUNSAFE, Object* refModifiersArrayUNSAFE, Object* refCultureUNSAFE, Object* refNamedParamsArrayUNSAFE)
|
||||
#define MNGSTDITF_IREFLECT_DECL__GET_UNDERLYING_SYSTEM_TYPE FCDECL1(Object*, get_UnderlyingSystemType, Object* refThisUNSAFE)
|
||||
|
||||
MNGSTDITF_BEGIN_INTERFACE(StdMngIReflect, g_ReflectionReflectItfName, "System.Runtime.InteropServices.ComTypes.IReflect", g_CMExpandoToDispatchExMarshaler CUSTOM_MARSHALER_ASM, "IReflect", g_CMExpandoViewOfDispatchEx CUSTOM_MARSHALER_ASM, IID_IDispatchEx, TRUE)
|
||||
MNGSTDITF_BEGIN_INTERFACE(StdMngIReflect, g_ReflectionReflectItfName, "System.Runtime.InteropServices.ComTypes.IReflect", g_CMExpandoToDispatchExMarshaler, "IReflect", g_CMExpandoViewOfDispatchEx, IID_IDispatchEx, TRUE)
|
||||
MNGSTDITF_DEFINE_METH(StdMngIReflect, GetMethod, &gsig_IM_Str_BindingFlags_Binder_ArrType_ArrParameterModifier_RetMethodInfo, MNGSTDITF_IREFLECT_DECL__GETMETHOD)
|
||||
MNGSTDITF_DEFINE_METH2(StdMngIReflect,GetMethod, &gsig_IM_Str_BindingFlags_RetMethodInfo, MNGSTDITF_IREFLECT_DECL__GETMETHOD_2)
|
||||
MNGSTDITF_DEFINE_METH(StdMngIReflect, GetMethods, &gsig_IM_BindingFlags_RetArrMethodInfo, MNGSTDITF_IREFLECT_DECL__GETMETHODS)
|
||||
|
@ -108,7 +105,7 @@ MNGSTDITF_END_INTERFACE(StdMngIReflect)
|
|||
#define MNGSTDITF_IEXPANDO_DECL__ADD_METHOD FCDECL3(Object*, AddMethod, Object* refThisUNSAFE, StringObject* refNameUNSAFE, Object* refDelegateUNSAFE)
|
||||
#define MNGSTDITF_IEXPANDO_DECL__REMOVE_MEMBER FCDECL2(void, RemoveMember, Object* refThisUNSAFE, Object* refMemberInfoUNSAFE)
|
||||
|
||||
MNGSTDITF_BEGIN_INTERFACE(StdMngIExpando, g_ReflectionExpandoItfName, "System.Runtime.InteropServices.ComTypes.IExpando", g_CMExpandoToDispatchExMarshaler CUSTOM_MARSHALER_ASM, "IExpando", g_CMExpandoViewOfDispatchEx CUSTOM_MARSHALER_ASM, IID_IDispatchEx, TRUE)
|
||||
MNGSTDITF_BEGIN_INTERFACE(StdMngIExpando, g_ReflectionExpandoItfName, "System.Runtime.InteropServices.ComTypes.IExpando", g_CMExpandoToDispatchExMarshaler, "IExpando", g_CMExpandoViewOfDispatchEx, IID_IDispatchEx, TRUE)
|
||||
MNGSTDITF_DEFINE_METH(StdMngIExpando, AddField, &gsig_IM_Str_RetFieldInfo, MNGSTDITF_IEXPANDO_DECL__ADD_FIELD)
|
||||
MNGSTDITF_DEFINE_METH(StdMngIExpando, AddProperty, &gsig_IM_Str_RetPropertyInfo, MNGSTDITF_IEXPANDO_DECL__ADD_PROPERTY)
|
||||
MNGSTDITF_DEFINE_METH(StdMngIExpando, AddMethod, &gsig_IM_Str_Delegate_RetMethodInfo,MNGSTDITF_IEXPANDO_DECL__ADD_METHOD)
|
||||
|
@ -123,7 +120,7 @@ MNGSTDITF_END_INTERFACE(StdMngIExpando)
|
|||
#define MNGSTDITF_IENUMERATOR_DECL__GET_CURRENT FCDECL1(Object*, get_Current, Object* refThisUNSAFE)
|
||||
#define MNGSTDITF_IENUMERATOR_DECL__RESET FCDECL1(void, Reset, Object* refThisUNSAFE)
|
||||
|
||||
MNGSTDITF_BEGIN_INTERFACE(StdMngIEnumerator, g_CollectionsEnumeratorClassName, "System.Runtime.InteropServices.ComTypes.IEnumerator", g_EnumeratorToEnumClassName CUSTOM_MARSHALER_ASM, "", "System.Runtime.InteropServices.CustomMarshalers.EnumeratorViewOfEnumVariant" CUSTOM_MARSHALER_ASM, IID_IEnumVARIANT, TRUE)
|
||||
MNGSTDITF_BEGIN_INTERFACE(StdMngIEnumerator, g_CollectionsEnumeratorClassName, "System.Runtime.InteropServices.ComTypes.IEnumerator", g_EnumeratorToEnumClassName, "", "System.Runtime.InteropServices.CustomMarshalers.EnumeratorViewOfEnumVariant", IID_IEnumVARIANT, TRUE)
|
||||
MNGSTDITF_DEFINE_METH(StdMngIEnumerator, MoveNext, &gsig_IM_RetBool, MNGSTDITF_IENUMERATOR_DECL__MOVE_NEXT)
|
||||
MNGSTDITF_DEFINE_METH(StdMngIEnumerator, get_Current, &gsig_IM_RetObj, MNGSTDITF_IENUMERATOR_DECL__GET_CURRENT)
|
||||
MNGSTDITF_DEFINE_METH(StdMngIEnumerator, Reset, &gsig_IM_RetVoid, MNGSTDITF_IENUMERATOR_DECL__RESET)
|
||||
|
@ -135,6 +132,6 @@ MNGSTDITF_END_INTERFACE(StdMngIEnumerator)
|
|||
|
||||
#define MNGSTDITF_IENUMERABLE_DECL__GETENUMERATOR FCDECL1(Object*, GetEnumerator, Object* refThisUNSAFE)
|
||||
|
||||
MNGSTDITF_BEGIN_INTERFACE(StdMngIEnumerable, g_CollectionsEnumerableItfName, "System.Runtime.InteropServices.ComTypes.IEnumerable", "System.Runtime.InteropServices.CustomMarshalers.EnumerableToDispatchMarshaler" CUSTOM_MARSHALER_ASM, "", "System.Runtime.InteropServices.CustomMarshalers.EnumerableViewOfDispatch" CUSTOM_MARSHALER_ASM, IID_IDispatch, FALSE)
|
||||
MNGSTDITF_BEGIN_INTERFACE(StdMngIEnumerable, g_CollectionsEnumerableItfName, "System.Runtime.InteropServices.ComTypes.IEnumerable", "System.Runtime.InteropServices.CustomMarshalers.EnumerableToDispatchMarshaler", "", "System.Runtime.InteropServices.CustomMarshalers.EnumerableViewOfDispatch", IID_IDispatch, FALSE)
|
||||
MNGSTDITF_DEFINE_METH(StdMngIEnumerable, GetEnumerator, &gsig_IM_RetIEnumerator, MNGSTDITF_IENUMERABLE_DECL__GETENUMERATOR)
|
||||
MNGSTDITF_END_INTERFACE(StdMngIEnumerable)
|
||||
|
|
|
@ -347,7 +347,7 @@ const MscorlibClassDescription c_rgMscorlibClassDescriptions[] =
|
|||
// Include all exception types here that are defined in mscorlib. Omit exceptions defined elsewhere.
|
||||
#define DEFINE_EXCEPTION(ns, reKind, bHRformessage, ...) { ns , # reKind },
|
||||
#define DEFINE_EXCEPTION_HR_WINRT_ONLY(ns, reKind, ...)
|
||||
#define DEFINE_EXCEPTION_IN_OTHER_FX_ASSEMBLY(ns, reKind, assemblySimpleName, publicKeyToken, bHRformessage, ...)
|
||||
#define DEFINE_EXCEPTION_IN_OTHER_FX_ASSEMBLY(ns, reKind, assemblySimpleName, bHRformessage, ...)
|
||||
#include "rexcep.h"
|
||||
};
|
||||
const USHORT c_nMscorlibClassDescriptions = NumItems(c_rgMscorlibClassDescriptions);
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include "pefile.h"
|
||||
#include "eecontract.h"
|
||||
#include "eeconfig.h"
|
||||
#include "product_version.h"
|
||||
#include "eventtrace.h"
|
||||
#include "dbginterface.h"
|
||||
#include "peimagelayout.inl"
|
||||
|
@ -1122,10 +1121,10 @@ BOOL RuntimeVerifyNativeImageVersion(const CORCOMPILE_VERSION_INFO *info, PEAsse
|
|||
// Check that the EE version numbers are the same.
|
||||
//
|
||||
|
||||
if (info->wVersionMajor != CLR_MAJOR_VERSION
|
||||
|| info->wVersionMinor != CLR_MINOR_VERSION
|
||||
|| info->wVersionBuildNumber != CLR_BUILD_VERSION
|
||||
|| info->wVersionPrivateBuildNumber != CLR_BUILD_VERSION_QFE)
|
||||
if (info->wVersionMajor != RuntimeFileMajorVersion
|
||||
|| info->wVersionMinor != RuntimeFileMinorVersion
|
||||
|| info->wVersionBuildNumber != RuntimeFileBuildVersion
|
||||
|| info->wVersionPrivateBuildNumber != RuntimeFileRevisionVersion)
|
||||
{
|
||||
RuntimeVerifyLog(LL_ERROR, pLogAsm, W("CLR version recorded in native image doesn't match the current CLR."));
|
||||
return FALSE;
|
||||
|
|
|
@ -9217,30 +9217,44 @@ HRESULT ProfToEEInterfaceImpl::GetRuntimeInformation(USHORT * pClrInstanceId,
|
|||
|
||||
if (pcchVersionString != NULL)
|
||||
{
|
||||
HRESULT hr = GetCORVersionInternal(szVersionString, (DWORD)cchVersionString, (DWORD *)pcchVersionString);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
PCWSTR pczVersionString = CLR_PRODUCT_VERSION_L;
|
||||
|
||||
// Get the module file name
|
||||
ULONG trueLen = (ULONG)(wcslen(pczVersionString) + 1);
|
||||
|
||||
// Return name of module as required.
|
||||
if (szVersionString && cchVersionString > 0)
|
||||
{
|
||||
ULONG copyLen = trueLen;
|
||||
|
||||
if (copyLen >= cchVersionString)
|
||||
{
|
||||
copyLen = cchVersionString - 1;
|
||||
}
|
||||
|
||||
wcsncpy_s(szVersionString, cchVersionString, pczVersionString, copyLen);
|
||||
}
|
||||
|
||||
*pcchVersionString = trueLen;
|
||||
}
|
||||
|
||||
if (pClrInstanceId != NULL)
|
||||
*pClrInstanceId = static_cast<USHORT>(GetClrInstanceId());
|
||||
|
||||
if (pRuntimeType != NULL)
|
||||
{
|
||||
*pRuntimeType = COR_PRF_CORE_CLR;
|
||||
}
|
||||
|
||||
if (pMajorVersion != NULL)
|
||||
*pMajorVersion = CLR_MAJOR_VERSION;
|
||||
*pMajorVersion = RuntimeProductMajorVersion;
|
||||
|
||||
if (pMinorVersion != NULL)
|
||||
*pMinorVersion = CLR_MINOR_VERSION;
|
||||
*pMinorVersion = RuntimeProductMinorVersion;
|
||||
|
||||
if (pBuildNumber != NULL)
|
||||
*pBuildNumber = CLR_BUILD_VERSION;
|
||||
*pBuildNumber = RuntimeProductPatchVersion;
|
||||
|
||||
if (pQFEVersion != NULL)
|
||||
*pQFEVersion = CLR_BUILD_VERSION_QFE;
|
||||
*pQFEVersion = 0;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -319,10 +319,10 @@ DEFINE_EXCEPTION(g_SystemNS, ArgumentNullException, false, E
|
|||
|
||||
#ifdef FEATURE_COMINTEROP
|
||||
// Jupiter needs some HRESULTs mapped to exceptions in .NET Framework assemblies other than mscorlib.
|
||||
DEFINE_EXCEPTION_IN_OTHER_FX_ASSEMBLY(g_MarkupNS, XamlParseException, "System.Runtime.WindowsRuntime.UI.Xaml", ECMA_PUBLICKEY_STR, false, E_XAMLPARSEFAILED)
|
||||
DEFINE_EXCEPTION_IN_OTHER_FX_ASSEMBLY(g_AutomationNS, ElementNotAvailableException, "System.Runtime.WindowsRuntime.UI.Xaml", ECMA_PUBLICKEY_STR, false, E_ELEMENTNOTAVAILABLE)
|
||||
DEFINE_EXCEPTION_IN_OTHER_FX_ASSEMBLY(g_AutomationNS, ElementNotEnabledException, "System.Runtime.WindowsRuntime.UI.Xaml", ECMA_PUBLICKEY_STR, false, E_ELEMENTNOTENABLED)
|
||||
DEFINE_EXCEPTION_IN_OTHER_FX_ASSEMBLY(g_DirectUINS, LayoutCycleException, "System.Runtime.WindowsRuntime.UI.Xaml", ECMA_PUBLICKEY_STR, false, E_LAYOUTCYCLE)
|
||||
DEFINE_EXCEPTION_IN_OTHER_FX_ASSEMBLY(g_MarkupNS, XamlParseException, "System.Runtime.WindowsRuntime.UI.Xaml", false, E_XAMLPARSEFAILED)
|
||||
DEFINE_EXCEPTION_IN_OTHER_FX_ASSEMBLY(g_AutomationNS, ElementNotAvailableException, "System.Runtime.WindowsRuntime.UI.Xaml", false, E_ELEMENTNOTAVAILABLE)
|
||||
DEFINE_EXCEPTION_IN_OTHER_FX_ASSEMBLY(g_AutomationNS, ElementNotEnabledException, "System.Runtime.WindowsRuntime.UI.Xaml", false, E_ELEMENTNOTENABLED)
|
||||
DEFINE_EXCEPTION_IN_OTHER_FX_ASSEMBLY(g_DirectUINS, LayoutCycleException, "System.Runtime.WindowsRuntime.UI.Xaml", false, E_LAYOUTCYCLE)
|
||||
#endif // FEATURE_COMINTEROP
|
||||
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
enum RuntimeExceptionKind {
|
||||
#define DEFINE_EXCEPTION(ns, reKind, bHRformessage, ...) k##reKind,
|
||||
#define DEFINE_EXCEPTION_HR_WINRT_ONLY(ns, reKind, ...)
|
||||
#define DEFINE_EXCEPTION_IN_OTHER_FX_ASSEMBLY(ns, reKind, assemblySimpleName, publicKeyToken, bHRformessage, ...) DEFINE_EXCEPTION(ns, reKind, bHRformessage, __VA_ARGS__)
|
||||
#define DEFINE_EXCEPTION_IN_OTHER_FX_ASSEMBLY(ns, reKind, assemblySimpleName, bHRformessage, ...) DEFINE_EXCEPTION(ns, reKind, bHRformessage, __VA_ARGS__)
|
||||
#include "rexcep.h"
|
||||
kLastException
|
||||
};
|
||||
|
|
|
@ -52,7 +52,7 @@ typedef unsigned int TARGET_POINTER_TYPE;
|
|||
#include "guidfromname.h"
|
||||
#include "../dlls/mscorrc/resource.h"
|
||||
#include "zaplog.h"
|
||||
#include "ndpversion.h"
|
||||
#include "clrversion.h"
|
||||
|
||||
#include "loaderheap.h"
|
||||
|
||||
|
|
|
@ -220,7 +220,7 @@ void ZapImage::InitializeSectionsForReadyToRun()
|
|||
{
|
||||
#define COMPILER_NAME "CoreCLR"
|
||||
|
||||
const char * pCompilerIdentifier = COMPILER_NAME " " FX_FILEVERSION_STR " " QUOTE_MACRO(__BUILDMACHINE__);
|
||||
const char* pCompilerIdentifier = COMPILER_NAME " " VER_FILEVERSION_STR;
|
||||
ZapBlob * pCompilerIdentifierBlob = new (GetHeap()) ZapBlobPtr((PVOID)pCompilerIdentifier, strlen(pCompilerIdentifier) + 1);
|
||||
|
||||
GetReadyToRunHeader()->RegisterSection(ReadyToRunSectionType::CompilerIdentifier, pCompilerIdentifierBlob);
|
||||
|
@ -1361,7 +1361,7 @@ void ZapImage::Open(CORINFO_MODULE_HANDLE hModule,
|
|||
{
|
||||
// Hardwire the metadata version to be the current runtime version so that the ngen image
|
||||
// does not change when the directory runtime is installed in different directory (e.g. v2.0.x86chk vs. v2.0.80826).
|
||||
BSTRHolder strVersion(SysAllocString(W("v")VER_PRODUCTVERSION_NO_QFE_STR_L));
|
||||
BSTRHolder strVersion(SysAllocString(CLR_METADATA_VERSION_L));
|
||||
VARIANT versionOption;
|
||||
V_VT(&versionOption) = VT_BSTR;
|
||||
V_BSTR(&versionOption) = strVersion;
|
||||
|
|
|
@ -1114,7 +1114,7 @@ IMetaDataAssemblyEmit * Zapper::CreateAssemblyEmitter()
|
|||
|
||||
// Hardwire the metadata version to be the current runtime version so that the ngen image
|
||||
// does not change when the directory runtime is installed in different directory (e.g. v2.0.x86chk vs. v2.0.80826).
|
||||
BSTRHolder strVersion(SysAllocString(W("v")VER_PRODUCTVERSION_NO_QFE_STR_L));
|
||||
BSTRHolder strVersion(SysAllocString(CLR_METADATA_VERSION_L));
|
||||
VARIANT versionOption;
|
||||
V_VT(&versionOption) = VT_BSTR;
|
||||
V_BSTR(&versionOption) = strVersion;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue