Skip to content

Move unmanaged APIs for Metadata to /core folder #46991

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 37 commits into from
Jul 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
5ea5af8
Initial plan
Copilot Jun 26, 2025
47b51fc
Move metadata and hosting APIs from framework to core folder
Copilot Jun 26, 2025
cf91c30
Fix cross-references to moved metadata and hosting APIs
Copilot Jun 26, 2025
9e84548
Fix linting issues and finalize API move
Copilot Jun 26, 2025
4dc6065
Fix invalid link warnings in moved API documentation
Copilot Jun 26, 2025
98c008d
Fix invalid link warnings in all 723 moved API documentation files
Copilot Jun 26, 2025
a635021
Fix invalid file links in moved unmanaged API documentation
Copilot Jun 26, 2025
987c709
human edits
gewarren Jun 26, 2025
ad67a4c
more human edits
gewarren Jun 26, 2025
2430742
more human edits
gewarren Jun 26, 2025
aa85d44
more human edits
gewarren Jun 26, 2025
b0895af
undo separate changes
gewarren Jun 26, 2025
6bc9ea2
undo strong naming changes
gewarren Jun 26, 2025
b9f0e6f
resets for hosting
gewarren Jun 26, 2025
80b88fa
reset index and toc for hosting
gewarren Jun 26, 2025
0c4dcc1
reset hosting files
gewarren Jun 26, 2025
7ee39f0
fix invalid links
gewarren Jun 26, 2025
e596d05
add redirects
gewarren Jun 27, 2025
d3201b5
final touchups
gewarren Jun 27, 2025
98f9cee
fix build warnings
gewarren Jun 27, 2025
22bfa4f
undo non-imetadata moves
gewarren Jul 22, 2025
93d7f89
undo move of imetadata* apis
gewarren Jul 22, 2025
005a38b
update TOCs, add imetadata interfaces index
gewarren Jul 23, 2025
a4207de
fix build errors
gewarren Jul 23, 2025
84ef0bb
fix more build errors
gewarren Jul 23, 2025
886363b
move more enums to .net core
gewarren Jul 23, 2025
e22cf15
build fixes
gewarren Jul 23, 2025
98dde3f
more organization
gewarren Jul 24, 2025
373c038
add redirects
gewarren Jul 24, 2025
6b6c441
more fixes
gewarren Jul 24, 2025
e6ab459
more fixes
gewarren Jul 24, 2025
79a1fc3
more fixes
gewarren Jul 24, 2025
814fe4f
more fixes
gewarren Jul 24, 2025
5e874b4
fix typo
gewarren Jul 24, 2025
045111a
reset unrelated files
gewarren Jul 24, 2025
3b7b7d0
respond to feedback
gewarren Jul 28, 2025
505c80a
fix build warnings
gewarren Jul 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1,164 changes: 1,164 additions & 0 deletions .openpublishing.redirection.framework.json

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions docs/core/unmanaged-api/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
description: "Learn more about unmanaged APIs for .NET"
title: .NET unmanaged API reference
ms.date: 09/19/2023
---
# .NET unmanaged API reference

This section includes information on unmanaged APIs that can be used by managed-code-related applications, such as runtime hosts, compilers, disassemblers, obfuscators, debuggers, and profilers.

These articles describe APIs that were introduced in .NET Core 2.0 and later versions, or APIs that can be used with both .NET Framework and .NET.

For .NET Framework-specific unmanaged APIs, see [.NET Framework unmanaged API reference](../../framework/unmanaged-api/index.md).

## In this section

[Debugging](./debugging/index.md)\
Describes the debugging API, which enables a debugger to debug code that runs in the common language runtime (CLR) environment.

[Metadata](./metadata/interfaces/metadata-interfaces.md)\
Describes the metadata interfaces, which enable a client such as a compiler to generate or access a component's metadata without the types being loaded by the CLR.

[Profiling](./profiling/index.md)\
Describes the profiling API, which enables a profiler to monitor a program's execution by the CLR.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
description: "Learn more about: AssemblyRefFlags Enumeration"
title: "AssemblyRefFlags Enumeration"
ms.date: "03/30/2017"
api_name:
- "AssemblyRefFlags"
api_location:
- "mscoree.dll"
api_type:
- "COM"
f1_keywords:
- "AssemblyRefFlags"
topic_type:
- "apiref"
---
# AssemblyRefFlags Enumeration

Contains values that describe features of an assembly reference.

## Syntax

```cpp
typedef enum {
arfFullOriginator = 0x0001
} AssemblyRefFlags;
```

## Members

|Member|Description|
|------------|-----------------|
|`arfFullOriginator`|Specifies that the assembly reference contains full, unhashed information about the publisher of the assembly.|

## Requirements

**Platforms:** See [.NET supported operating systems](https://github.com/dotnet/core/blob/main/os-lifecycle-policy.md).

**Header:** Cor.h

## See also

- [IMetaDataAssemblyEmit Interface](../interfaces/imetadataassemblyemit-interface.md)
- [DefineAssemblyRef Method](../interfaces/imetadataassemblyemit-defineassemblyref-method.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
description: "Learn more about: CorAssemblyFlags Enumeration"
title: "CorAssemblyFlags Enumeration"
ms.date: "03/30/2017"
api_name:
- "CorAssemblyFlags"
api_location:
- "mscoree.dll"
api_type:
- "COM"
f1_keywords:
- "CorAssemblyFlags"
topic_type:
- "apiref"
---
# CorAssemblyFlags Enumeration

Contains values that describe the metadata applied to an assembly compilation.

## Syntax

```cpp
typedef enum CorAssemblyFlags {

afPublicKey = 0x0001,
afPA_None = 0x0000,
afPA_MSIL = 0x0010,
afPA_x86 = 0x0020,
afPA_IA64 = 0x0030,
afPA_AMD64 = 0x0040,
afPA_ARM = 0x0050,
afPA_ARM64 = 0x0060,
afPA_NoPlatform = 0x0070,
afPA_Specified = 0x0080,
afPA_Mask = 0x0070,
afPA_FullMask = 0x00F0,
afPA_Shift = 0x0004,

afEnableJITcompileTracking = 0x8000,
afDisableJITcompileOptimizer= 0x4000,

afRetargetable = 0x0100,
afContentType_Default = 0x0000,
afContentType_WindowsRuntime = 0x0200,
afContentType_Mask = 0x0E00,

} CorAssemblyFlags;
```

## Members

| Member | Description |
|---------------|----------------------------------------------------------------------------|
| `afPublicKey` | Indicates that the assembly reference holds the full, unhashed public key. |
| `afPA_None` | Indicates that the processor architecture is unspecified. |
| `afPA_MSIL` | Indicates that the processor architecture is neutral (PE32). |
| `afPA_x86` | Indicates that the processor architecture is x86 (PE32). |
| `afPA_IA64` | Indicates that the processor architecture is Itanium (PE32+). |
| `afPA_AMD64` | Indicates that the processor architecture is x86-64 (PE32+). |
| `afPA_ARM` | Indicates that the processor architecture is ARM (PE32). |
| `afPA_ARM64` | Indicates that the processor architecture is ARM64 (PE32+). |
|`afPA_NoPlatform`|Indicates that the assembly is a reference assembly; that is, it applies to any architecture but cannot run on any architecture. Thus, the flag is the same as `afPA_Mask`.|
|`afPA_Specified`|Indicates that the processor architecture flags should be propagated to the `AssemblyRef` record.|
|`afPA_Mask`|A mask that describes the processor architecture.|
|`afPA_FullMask`|Specifies that the processor architecture description is included.|
|`afPA_Shift`|Indicates a shift count in the processor architecture flags to and from the index.|
|`afEnableJITcompileTracking`|Indicates the corresponding value from the <xref:System.Diagnostics.DebuggableAttribute.DebuggingModes> of the <xref:System.Diagnostics.DebuggableAttribute>.|
|`afDisableJITcompileOptimizer`|Indicates the corresponding value from the <xref:System.Diagnostics.DebuggableAttribute.DebuggingModes> of the <xref:System.Diagnostics.DebuggableAttribute>.|
|`afRetargetable`|Indicates that the assembly can be retargeted at run time to an assembly from a different publisher.|
|`afContentType_Mask`|A mask that describes the content type.|
|`afContentType_Default`|Indicates the default content type.|
|`afContentType_WindowsRuntime`|Indicates the Windows Runtime content type.|

## Requirements

**Platforms:** See [.NET supported operating systems](https://github.com/dotnet/core/blob/main/os-lifecycle-policy.md).

**Header:** CorHdr.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
description: "Learn more about: CorCheckDuplicatesFor Enumeration"
title: "CorCheckDuplicatesFor Enumeration"
ms.date: "03/30/2017"
api_name:
- "CorCheckDuplicatesFor"
api_location:
- "mscoree.dll"
api_type:
- "COM"
f1_keywords:
- "CorCheckDuplicatesFor"
topic_type:
- "apiref"
---
# CorCheckDuplicatesFor Enumeration

Specifies the metadata tokens that will be checked for duplicates.

## Syntax

```cpp
typedef enum CorCheckDuplicatesFor {

MDDupAll = 0xffffffff,
MDDupENC = MDDupAll,
MDNoDupChecks = 0x00000000,
MDDupTypeDef = 0x00000001,
MDDupInterfaceImpl = 0x00000002,
MDDupMethodDef = 0x00000004,
MDDupTypeRef = 0x00000008,
MDDupMemberRef = 0x00000010,
MDDupCustomAttribute = 0x00000020,
MDDupParamDef = 0x00000040,
MDDupPermission = 0x00000080,
MDDupProperty = 0x00000100,
MDDupEvent = 0x00000200,
MDDupFieldDef = 0x00000400,
MDDupSignature = 0x00000800,
MDDupModuleRef = 0x00001000,
MDDupTypeSpec = 0x00002000,
MDDupImplMap = 0x00004000,
MDDupAssemblyRef = 0x00008000,
MDDupFile = 0x00010000,
MDDupExportedType = 0x00020000,
MDDupManifestResource = 0x00040000,
MDDupGenericParam = 0x00080000,
MDDupMethodSpec = 0x00100000,
MDDupGenericParamConstraint = 0x00200000,

MDDupAssembly = 0x10000000,

MDDupDefault =
MDNoDupChecks | MDDupTypeRef | MDDupMemberRef |
MDDupSignature | MDDupTypeSpec | MDDupMethodSpec

} CorCheckDuplicatesFor;
```

## Members

| Member | Description |
|-------------------------------|------------------------------------------------------------|
| `MDDupAll` | Check all metadata tokens for duplicates. |
| `MDDupENC` | Not used. |
| `MDNoDupChecks` | Do not check metadata tokens for duplicates. |
| `MDDupTypeDef` | Check for duplicates of `mdTypeDef` tokens. |
| `MDDupInterfaceImpl` | Check for duplicates of `mdInterfaceImpl` tokens. |
| `MDDupMethodDef` | Check for duplicates of `mdMethodDef` tokens. |
| `MDDupTypeRef` | Check for duplicates of `mdTypeRef` tokens. |
| `MDDupMemberRef` | Check for duplicates of `mdMemberRef` tokens. |
| `MDDupCustomAttribute` | Check for duplicates of `mdCustomAttribute` tokens. |
| `MDDupParamDef` | Check for duplicates of `mdParamDef` tokens. |
| `MDDupPermission` | Check for duplicates of `mdPermission` tokens. |
| `MDDupProperty` | Check for duplicates of `mdProperty` tokens. |
| `MDDupEvent` | Check for duplicates of `mdEvent` tokens. |
| `MDDupFieldDef` | Check for duplicates of `mdFieldDef` tokens. |
| `MDDupSignature` | Check for duplicates of `mdSignature` tokens. |
| `MDDupModuleRef` | Check for duplicates of `mdModuleRef` tokens. |
| `MDDupTypeSpec` | Check for duplicates of `mdTypeSpec` tokens. |
| `MDDupImplMap` | Check for duplicates of `mdImplMap` tokens. |
| `MDDupAssemblyRef` | Check for duplicates of `mdAssemblyRef` tokens. |
| `MDDupFile` | Check for duplicates of `mdFile` tokens. |
| `MDDupExportedType` | Check for duplicates of `mdExportedType` tokens. |
| `MDDupManifestResource` | Check for duplicates of `mdManifestResource` tokens. |
| `MDDupGenericParam` | Check for duplicates of `mdGenericParam` tokens. |
| `MDDupMethodSpec` | Check for duplicates of `mdMethodSpec` tokens. |
| `MDDupGenericParamConstraint` | Check for duplicates of `mdGenericParamConstraint` tokens. |
| `MDDupAssembly` | Check for duplicates of `mdAssembly` tokens. |
| `MDDupDefault` | Check for duplicates of `mdMemberRef`, `mdTypeRef`, `mdSignature`, `mdTypeSpec`, and `mdMethodSpec` tokens. |

## Requirements

**Platforms:** See [.NET supported operating systems](https://github.com/dotnet/core/blob/main/os-lifecycle-policy.md).

**Header:** CorHdr.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
description: "Learn more about: CorDeclSecurity Enumeration"
title: "CorDeclSecurity Enumeration"
ms.date: "03/30/2017"
api_name:
- "CorDeclSecurity"
api_location:
- "mscoree.dll"
api_type:
- "COM"
f1_keywords:
- "CorDeclSecurity"
topic_type:
- "apiref"
---
# CorDeclSecurity Enumeration

Specifies the security actions that can be performed using declarative security.

## Syntax

```cpp
typedef enum CorDeclSecurity {

dclActionMask = 0x001f,
dclActionNil = 0x0000,
dclRequest = 0x0001,
dclDemand = 0x0002,
dclAssert = 0x0003,
dclDeny = 0x0004,
dclPermitOnly = 0x0005,
dclLinktimeCheck = 0x0006,
dclInheritanceCheck = 0x0007,
dclRequestMinimum = 0x0008,
dclRequestOptional = 0x0009,
dclRequestRefuse = 0x000a,
dclPrejitGrant = 0x000b,
dclPrejitDenied = 0x000c,
dclNonCasDemand = 0x000d,
dclNonCasLinkDemand = 0x000e,
dclNonCasInheritance = 0x000f,
dclLinkDemandChoice = 0x0010,
dclInheritanceDemandChoice = 0x0011,
dclDemandChoice = 0x0012,
dclMaximumValue = 0x0012

} CorDeclSecurity;
```

## Members

|Member|Description|
|------------|-----------------|
|`dclActionMask`|Reserved.|
|`dclActionNil`|Reserved.|
|`dclRequest`|Reserved.|
|`dclDemand`|All callers higher in the call stack are required to have been granted the permission specified by the current permission object.|
|`dclAssert`|The calling code can access the resource identified by the current permission object, even if callers higher in the stack have not been granted permission to access the resource|
|`dclDeny`|The ability to access the resource specified by the current permission object is denied to callers, even if they have been granted permission to access it.|
|`dclPermitOnly`|Only the resources specified by this permission object can be accessed, even if the code has been granted permission to access other resources.|
|`dclLinktimeCheck`|The immediate caller is required to have been granted the specified permission for a given period of time.|
|`dclInheritanceCheck`|The derived class inheriting another class or overriding a method is required to have been granted the specified permission.|
|`dclRequestMinimum`|The caller can request for the minimum permissions required for code to run. This action can only be used within the scope of the assembly.|
|`dclRequestOptional`|The caller can request for additional permissions that are optional (not required to run). This request implicitly refuses all other permissions not specifically requested. This action can only be used within the scope of the assembly.|
|`dclRequestRefuse`|The caller's request for permissions that might be misused will not be granted. This action can only be used within the scope of the assembly.|
|`dclPrejitGrant`|Reserved.|
|`dclPrejitDenied`|Reserved.|
|`dclNonCasDemand`|Reserved.|
|`dclNonCasLinkDemand`|The immediate caller is required to have been granted the specified permission.|
|`dclNonCasInheritance`|Reserved.|
|`dclLinkDemandChoice`|Reserved.|
|`dclInheritanceDemandChoice`|Reserved.|
|`dclDemandChoice`|Reserved.|
|`dclMaximumValue`|Reserved.|

## Requirements

**Platforms:** See [.NET supported operating systems](https://github.com/dotnet/core/blob/main/os-lifecycle-policy.md).

**Header:** CorHdr.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
description: "Learn more about: CorErrorIfEmitOutOfOrder Enumeration"
title: "CorErrorIfEmitOutOfOrder Enumeration"
ms.date: "03/30/2017"
api_name:
- "CorErrorIfEmitOutOfOrder"
api_location:
- "mscoree.dll"
api_type:
- "COM"
f1_keywords:
- "CorErrorIfEmitOutOfOrder"
topic_type:
- "apiref"
---
# CorErrorIfEmitOutOfOrder Enumeration

Contains flag values that indicate the conditions under which an error message should be generated when metadata is emitted out of order.

## Syntax

```cpp
typedef enum CorErrorIfEmitOutOfOrder {

MDErrorOutOfOrderDefault = 0x00000000,
MDErrorOutOfOrderNone = 0x00000000,
MDErrorOutOfOrderAll = 0xffffffff,
MDMethodOutOfOrder = 0x00000001,
MDFieldOutOfOrder = 0x00000002,
MDParamOutOfOrder = 0x00000004,
MDPropertyOutOfOrder = 0x00000008,
MDEventOutOfOrder = 0x00000010

} CorErrorIfEmitOutOfOrder;
```

## Members

|Member|Description|
|------------|-----------------|
|`MDErrorOutOfOrderDefault`|Indicates the default behavior, which does not generate error messages.|
|`MDErrorOutOfOrderNone`|Indicates that the compiler should not generate error messages.|
|`MDErrorOutOfOrderAll`|Indicates that the compiler should generate an error message when a field, property, event, method, or parameter is emitted out of order.|
|`MDMethodOutOfOrder`|Indicates that the compiler should generate an error message when a method is emitted out of order.|
|`MDFieldOutOfOrder`|Indicates that the compiler should generate an error message when a field is emitted out of order.|
|`MDParamOutOfOrder`|Indicates that the compiler should generate an error message when a parameter is emitted out of order.|
|`MDPropertyOutOfOrder`|Indicates that the compiler should generate an error message when a property is emitted out of order.|
|`MDEventOutOfOrder`|Indicates that the compiler should generate an error message when an event is emitted out of order.|

## Requirements

**Platforms:** See [.NET supported operating systems](https://github.com/dotnet/core/blob/main/os-lifecycle-policy.md).

**Header:** CorHdr.h
Loading
Loading