Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElinor Fung <elfung@microsoft.com>2021-04-07 07:11:04 +0300
committerGitHub <noreply@github.com>2021-04-07 07:11:04 +0300
commitf6b344b64a367ad71df11782122716b2e616d88f (patch)
tree9e452003657cf2967a809fef840a50ec52e1b783 /src/coreclr/inc
parent52f986706dc96b4b146c6657e6bcce1f5d29cc55 (diff)
Remove IAssemblyName (and various fusion remnants) (#50755)
Diffstat (limited to 'src/coreclr/inc')
-rw-r--r--src/coreclr/inc/bbsweep.h4
-rw-r--r--src/coreclr/inc/clrprivbinding.idl7
-rw-r--r--src/coreclr/inc/corpriv.h1
-rw-r--r--src/coreclr/inc/fusion.idl137
-rw-r--r--src/coreclr/inc/peinformation.h74
-rw-r--r--src/coreclr/inc/readme.md9
6 files changed, 11 insertions, 221 deletions
diff --git a/src/coreclr/inc/bbsweep.h b/src/coreclr/inc/bbsweep.h
index a65e9a94cbe..03702f816f3 100644
--- a/src/coreclr/inc/bbsweep.h
+++ b/src/coreclr/inc/bbsweep.h
@@ -22,6 +22,10 @@
#include <aclapi.h>
#endif // !TARGET_UNIX
+#ifndef ARRAYSIZE
+#define ARRAYSIZE(x) (sizeof(x)/sizeof(x[0]))
+#endif // !ARRAYSIZE
+
// The CLR headers don't allow us to use methods like SetEvent directly (instead
// we need to use the host APIs). However, this file is included both in the CLR
// and in the BBSweep tool, and the host API is not available in the tool. Moreover,
diff --git a/src/coreclr/inc/clrprivbinding.idl b/src/coreclr/inc/clrprivbinding.idl
index 08743d215cc..9f4ee2f3d6f 100644
--- a/src/coreclr/inc/clrprivbinding.idl
+++ b/src/coreclr/inc/clrprivbinding.idl
@@ -3,14 +3,11 @@
import "unknwn.idl";
import "objidl.idl";
-import "fusion.idl";
// Forward declarations
interface ICLRPrivBinder;
interface ICLRPrivAssembly;
-typedef LPCSTR LPCUTF8;
-
/**************************************************************************************
** This IDL file defines the assembly binding host interfaces. Some things to keep
** in mind:
@@ -35,11 +32,11 @@ interface ICLRPrivBinder : IUnknown
** BindAssemblyByName -- Binds an assembly by name.
** NOTE: This method is required to be idempotent. See general comment above.
**
- ** pAssemblyName - name of the assembly for which a bind is being requested.
+ ** pAssemblyFullName - name of the assembly for which a bind is being requested.
** ppAssembly - upon success, receives the bound assembly.
**********************************************************************************/
HRESULT BindAssemblyByName(
- [in] IAssemblyName * pAssemblyName,
+ [in] struct AssemblyNameData* pAssemblyNameData,
[out, retval] ICLRPrivAssembly ** ppAssembly);
/**********************************************************************************
diff --git a/src/coreclr/inc/corpriv.h b/src/coreclr/inc/corpriv.h
index 495440c93fc..e480706e3d5 100644
--- a/src/coreclr/inc/corpriv.h
+++ b/src/coreclr/inc/corpriv.h
@@ -19,7 +19,6 @@
#include "corimage.h"
#include "metadata.h"
#include <sstring.h>
-#include "peinformation.h"
//
interface IAssemblyName;
diff --git a/src/coreclr/inc/fusion.idl b/src/coreclr/inc/fusion.idl
deleted file mode 100644
index 7ffa9837bbd..00000000000
--- a/src/coreclr/inc/fusion.idl
+++ /dev/null
@@ -1,137 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-//+---------------------------------------------------------------------------
-//
-// Microsoft Windows
-// File: fusion.idl
-//
-// Contents: Fusion Interfaces
-//
-// Classes:
-//
-// Functions:
-//
-//
-//----------------------------------------------------------------------------
-
-cpp_quote("")
-cpp_quote("#ifdef _MSC_VER")
-cpp_quote("#pragma comment(lib,\"uuid.lib\")")
-cpp_quote("#endif")
-cpp_quote("")
-cpp_quote("//---------------------------------------------------------------------------=")
-cpp_quote("// Fusion Interfaces.")
-cpp_quote("")
-
-import "objidl.idl";
-
-cpp_quote("#ifdef _MSC_VER")
-cpp_quote("#pragma once")
-cpp_quote("#endif")
-
-
-typedef enum _tagAssemblyContentType
-{
- AssemblyContentType_Default = 0x00000000,
- AssemblyContentType_WindowsRuntime = 0x00000001,
- AssemblyContentType_Invalid = 0xffffffff
-} AssemblyContentType;
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// IAssemblyName
-//
-///////////////////////////////////////////////////////////////////////////////
-
-cpp_quote("// {CD193BC0-B4BC-11d2-9833-00C04FC31D2E}")
-cpp_quote("EXTERN_GUID(IID_IAssemblyName, 0xCD193BC0, 0xB4BC, 0x11d2, 0x98, 0x33, 0x00, 0xC0, 0x4F, 0xC3, 0x1D, 0x2E);")
-
-
-[
- local,
- object,
- uuid(CD193BC0-B4BC-11d2-9833-00C04FC31D2E),
- pointer_default(unique)
-]
-interface IAssemblyName: IUnknown
-{
- typedef [unique] IAssemblyName *LPASSEMBLYNAME;
-
- typedef enum
- {
- ASM_NAME_PUBLIC_KEY = 0, // 0
- ASM_NAME_PUBLIC_KEY_TOKEN, // 1
- ASM_NAME_HASH_VALUE, // 2
- ASM_NAME_NAME, // 3
- ASM_NAME_MAJOR_VERSION, // 4
- ASM_NAME_MINOR_VERSION, // 5
- ASM_NAME_BUILD_NUMBER, // 6
- ASM_NAME_REVISION_NUMBER, // 7
- ASM_NAME_CULTURE, // 8
- ASM_NAME_PROCESSOR_ID_ARRAY, // 9
- ASM_NAME_OSINFO_ARRAY, // 10 ... 0x0a
- ASM_NAME_HASH_ALGID, // 11 ... 0x0b
- ASM_NAME_ALIAS, // 12 ... 0x0c
- ASM_NAME_CODEBASE_URL, // 13 ... 0x0d
- ASM_NAME_CODEBASE_LASTMOD, // 14 ... 0x0e
- ASM_NAME_NULL_PUBLIC_KEY, // 15 ... 0x0f
- ASM_NAME_NULL_PUBLIC_KEY_TOKEN, // 16 ... 0x10
- ASM_NAME_CUSTOM, // 17 ... 0x11
- ASM_NAME_NULL_CUSTOM, // 18 ... 0x12
- ASM_NAME_MVID, // 19 ... 0x13
- ASM_NAME_FILE_MAJOR_VERSION, // 20 ... 0x14
- ASM_NAME_FILE_MINOR_VERSION, // 21 ... 0x15
- ASM_NAME_FILE_BUILD_NUMBER, // 22 ... 0x16
- ASM_NAME_FILE_REVISION_NUMBER, // 23 ... 0x17
- ASM_NAME_RETARGET, // 24 ... 0x18
- ASM_NAME_SIGNATURE_BLOB, // 25 ... 0x19
- ASM_NAME_CONFIG_MASK, // 26 ... 0x1a
- ASM_NAME_ARCHITECTURE, // 27 ... 0x1b
- ASM_NAME_CONTENT_TYPE, // 28 ... 0x1c
- ASM_NAME_MAX_PARAMS // 29 ... 0x1d
- } ASM_NAME;
-
- typedef enum
- {
- ASM_DISPLAYF_VERSION = 0x1,
- ASM_DISPLAYF_CULTURE = 0x2,
- ASM_DISPLAYF_PUBLIC_KEY_TOKEN = 0x4,
- ASM_DISPLAYF_PUBLIC_KEY = 0x8,
- ASM_DISPLAYF_CUSTOM = 0x10,
- ASM_DISPLAYF_PROCESSORARCHITECTURE = 0x20,
- ASM_DISPLAYF_LANGUAGEID = 0x40,
- ASM_DISPLAYF_RETARGET = 0x80,
- ASM_DISPLAYF_CONFIG_MASK = 0x100,
- ASM_DISPLAYF_MVID = 0x200,
- ASM_DISPLAYF_CONTENT_TYPE = 0x400,
-
-
- // ASM_DISPLAYF_FULL shows the full identity of the assembly.
- // It should be used when you are working with APIs taking
- // assembly full identity, such as GAC APIs.
- //
- // WARNING!!! ASM_DISPLAYF_FULL will change in the future,
- // when we introduce new attributes. This means the identity returned
- // will change from CLR version to version. Don't ever assume
- // the identity will not change. !!!
- ASM_DISPLAYF_FULL = ASM_DISPLAYF_VERSION
- | ASM_DISPLAYF_CULTURE
- | ASM_DISPLAYF_PUBLIC_KEY_TOKEN
- | ASM_DISPLAYF_RETARGET
- | ASM_DISPLAYF_PROCESSORARCHITECTURE
- | ASM_DISPLAYF_CONTENT_TYPE,
- } ASM_DISPLAY_FLAGS;
-
- HRESULT SetProperty(
- [in] DWORD PropertyId,
- [in] void const * pvProperty,
- [in] DWORD cbProperty);
-
- HRESULT GetProperty(
- [in] DWORD PropertyId,
- [out] LPVOID pvProperty,
- [in, out] LPDWORD pcbProperty);
-}
-
diff --git a/src/coreclr/inc/peinformation.h b/src/coreclr/inc/peinformation.h
deleted file mode 100644
index 48039fd9fe1..00000000000
--- a/src/coreclr/inc/peinformation.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// --------------------------------------------------------------------------------
-// PEInformation.h
-//
-
-// --------------------------------------------------------------------------------
-
-#ifndef PEINFORMATION_H
-#define PEINFORMATION_H
-
-#ifndef PEKIND_ENUM_DEFINED
-#define PEKIND_ENUM_DEFINED
-// This must match the definition of pekind in fusion.idl
-typedef enum _tagPEKIND
-{
- peNone = 0x00000000,
- peMSIL = 0x00000001,
- peI386 = 0x00000002,
- peIA64 = 0x00000003,
- peAMD64 = 0x00000004,
- peARM = 0x00000005,
- peARM64 = 0x00000006,
- peInvalid = 0xffffffff
-} PEKIND;
-
-#endif
-
-
-inline bool IsPE64(PEKIND x)
-{
- return ( (x == peIA64) || (x == peAMD64) || (x == peARM64) );
-}
-
-inline bool IsPE32(PEKIND x)
-{
- return ( (x == peI386) || (x == peARM) );
-}
-
-inline bool IsPEMSIL(PEKIND x)
-{
- return ( (x == peMSIL) );
-}
-
-#ifdef HOST_64BIT
-inline bool IsProcess32() { return false; }
-#else
-inline bool IsProcess32() { return true; }
-#endif
-
-#if defined(TARGET_X86)
-inline PEKIND TargetNativePEKIND() { return peI386; }
-#elif defined(TARGET_AMD64)
-inline PEKIND TargetNativePEKIND() { return peAMD64; }
-#elif defined(TARGET_ARM)
-inline PEKIND TargetNativePEKIND() { return peARM; }
-#elif defined(TARGET_ARM64)
-inline PEKIND TargetNativePEKIND() { return peARM64; }
-#else
-#error Need to define valid TargetNativePEKIND()
-#endif
-
-STDAPI RuntimeIsValidAssemblyOnThisPlatform_CheckProcessorArchitecture(PEKIND processorArchitecture, BOOL bForInstall);
-
-//*****************************************************************************
-// Intreprets CLRPeKind and dwImageType to get PeKind as per the CLRBitness
-// API, CLRPeKind and dwImageType can be recoved from GetPEKind() if you
-// have the metadata, or retrieved directly from the headers as per the
-// implementation in shim.cpp:_CorValidateImage.
-//*****************************************************************************
-HRESULT TranslatePEToArchitectureType(CorPEKind CLRPeKind, DWORD dwImageType, PEKIND * PeKind);
-HRESULT TranslatePEToArchitectureType(CorPEKind CLRPeKind, DWORD dwImageType, DWORD dwAssemblyFlags, PEKIND * PeKind);
-
-#endif // PEINFORMATION_H
diff --git a/src/coreclr/inc/readme.md b/src/coreclr/inc/readme.md
index ee47be8e514..bb685385d02 100644
--- a/src/coreclr/inc/readme.md
+++ b/src/coreclr/inc/readme.md
@@ -4,9 +4,10 @@ This directory has a variety of .idl files (such as corprof.idl) that need a lit
the build rules would automatically convert the idls into corresponding .h/.c files and include them in compilations. On non-windows platforms we don't have an equivalent
for midl.exe which did that conversion so we work around the issue by doing:
-- Build on Windows as normal, which will generate files in artifacts\obj\windows.x64.Debug\src\inc\idls_out\
-- Copy any updated headers into src\pal\prebuilt\inc\
-- If needed, adjust any of the .cpp files in src\pal\prebuilt\idl\ by hand, using the corresponding artifacts\obj\windows.x64.Debug\src\inc\idls_out\*_i.c as a guide. Typically
-this is just adding MIDL_DEFINE_GUID(...) for any new classes/interfaces that have been added to the idl file.
+- Build on Windows as normal, which will generate files in `artifacts\obj\windows.x64.Debug\inc\idls_out\`
+- Copy any updated headers into `src\coreclr\pal\prebuilt\inc\`
+- If needed, adjust any of the .cpp files in `src\coreclr\pal\prebuilt\idl\` by hand, using the corresponding `artifacts\obj\windows.x64.Debug\inc\idls_out\*_i.c` as a guide.
+ - Typically
+this is just adding `MIDL_DEFINE_GUID(...)` for any new classes/interfaces that have been added to the idl file.
Include these src changes with the remainder of your work when you submit a PR.