Appendix B - Metadata Tables Reference

Appendix B

Metadata Tables Reference

Entry Types

BYTE

Unsigned 1-byte integer

SHORT

Signed 2-byte integer

USHORT

Unsigned 2-byte integer

ULONG

Unsigned 4-byte integer

RID: <table>

Record index to <table>

STRING

Offset in the #Strings stream

GUID

Offset in the #GUID stream

BLOB

Offset in the #Blob stream

<coded_token_type>

Coded token (see the Coded Token Types table at the end of the Appendix)

Module; RID type: 00; Token type: 0x00000000; Metadata (MD) streams: #~, #-

Entry Name

Entry Type

Comments

Generation

USHORT

For edit-and-continue

Name

STRING

No longer than 512 bytes

Mvid

GUID

Generated automatically

EncId

GUID

For edit-and-continue

EncBaseId

GUID

For edit-and-continue

TypeRef; RID type: 01; Token type: 0x01000000; MD streams: #~, #-

Entry Name

Entry Type

Comments

ResolutionScope

ResolutionScope

Name

STRING

Namespace

STRING

TypeDef; RID type: 02; Token type: 0x02000000; MD streams: #~, #-

Entry Name

Entry Type

Comments

Flags

ULONG

Validity mask: 0x001173DBF

Name

STRING

Namespace

STRING

Extends

TypeDefOrRef

Base type

FieldList

RID: Field

MethodList

RID: Method

FieldPtr; RID type: 03; Token type: none; MD stream: #-

Entry Name

Entry Type

Comments

Field

RID: Field

Field; RID type: 04; Token type: 0x04000000; MD streams: #~, #-

Entry Name

Entry Type

Comments

Flags

USHORT

Validity mask: 0xB7F7

Name

STRING

No longer than 1023 bytes

Signature

BLOB

Cannot be 0

MethodPtr; RID type: 05; Token type: none; MD stream:#-

Entry Name

Entry Type

Comments

Method

RID: Method

Method; RID type: 06; Token type: 0x06000000; MD streams: #~, #-  

Entry Name

Entry Type

Comments

RVA

ULONG

Must be 0 or point at read-only section

ImplFlags

USHORT

Validity mask: 0x10BF

Flags

USHORT

Validity mask: 0xFDF7

Name

STRING

No longer than 1023 bytes

Signature

BLOB

Cannot be 0

ParamList

RID: Param

ParamPtr; RID type: 07; Token type: none; MD stream: #-

Entry Name

Entry Type

Comments

Param

RID: Param

Param; RID type: 08; Token type: 0x08000000; MD streams: #~, #-

Entry Name

Entry Type

Comments

Flags

USHORT

Validity mask: 0x3013

Sequence

USHORT

0 means return value

Name

STRING

InterfaceImpl; RID type: 09; Token type: 0x09000000; MD streams: #~, #-

Entry Name

Entry Type

Comments

Class

RID: TypeDef

Class implementing the interface

Interface

TypeDefOrRef

Implemented interface

MemberRef; RID type: 10; Token type: 0x0A000000; MD streams: #~, #-

Entry Name

Entry Type

Comments

Class

MemberRefParent

Cannot be TypeDef

Name

STRING

No longer than 1023 bytes

Signature

BLOB

Cannot be 0

Constant; RID type: 11; Token type: none; MD streams: #~, #-

Entry Name

Entry Type

Comments

Type

BYTE

Parent

HasConstant

Value

BLOB

CustomAttribute; RID type: 12; Token type: 0x0C000000; MD streams: #~, #-

Entry Name

Entry Type

Comments

Parent

HasCustomAttribute

Type

CustomAttributeType

Value

BLOB

FieldMarshal; RID type: 13; Token type: none; MD streams: #~, #-

Entry Name

Entry Type

Comments

Parent

HasFieldMarshal

NativeType

BLOB

Cannot be 0

DeclSecurity; RID type: 14; Token type: 0x0E000000; MD streams: #~, #-

Entry Name

Entry Type

Comments

Action

SHORT

Parent

HasDeclSecurity

PermissionSet

BLOB

ClassLayout; RID type: 15; Token Type: none; MD streams: #~, #-

Entry Name

Entry Type

Comments

PackingSize

USHORT

Power of 2, from 1 through 128

ClassSize

ULONG

Parent

RID: TypeDef

FieldLayout; RID type: 16; Token type: none; MD streams: #~, #-

Entry Name

Entry Type

Comments

OffSet

ULONG

Offset in bytes or ordinal

Field

RID: Field

StandAloneSig; RID type: 17; Token type: 0x11000000; MD streams: #~, #-

Entry Name

Entry Type

Comments

Signature

BLOB

Cannot be 0

EventMap; RID type: 18; Token type: none; MD streams: #~, #-

Entry Name

Entry Type

Comments

Parent

RID: TypeDef

EventList

RID: Event

EventPtr; RID type: 19; Token type: none; MD stream: #-

Entry Name

Entry Type

Comments

Event

RID: Event

Event; RID type: 20; Token type: 0x14000000; MD streams: #~, #-

Entry Name

Entry Type

Comments

EventFlags

USHORT

0x0000, 0x0200, or 0x0600

Name

STRING

EventType

TypeDefOrRef

PropertyMap; RID type: 21; Token type: none; MD streams: #~, #-

Entry Name

Entry Type

Comments

Parent

RID: TypeDef

PropertyList

RID: Property

PropertyPtr; RID type: 22; Token type: none; MD stream: #-

Entry Name

Entry Type

Comments

Property

RID: Property

Property; RID type: 23; Token type: 0x17000000; MD streams: #~, #-

Entry Name

Entry Type

Comments

PropFlags

USHORT

Validity mask: 0x1600

Name

STRING

Type

BLOB

Property signature

MethodSemantics; RID type: 24; Token type: none; MD streams: #~, #-

Entry Name

Entry Type

Comments

Semantic

USHORT

Method

RID: Method

Association

HasSemantic

MethodImpl; RID type: 25; Token type: none; MD streams: #~, #-

Entry Name

Entry Type

Comments

Class

RID: TypeDef

MethodBody

MethodDefOrRef

Overriding method

MethodDeclaration

MethodDefOrRef

Overridden method

ModuleRef; RID type: 26; Token type: 0x1A000000; MD streams: #~, #-

Entry Name

Entry Type

Comments

Name

STRING

No longer than 512 bytes

TypeSpec; RID type: 27; Token type: 0x1B000000; MD streams: #~, #-

Entry Name

Entry Type

Comments

Signature

BLOB

Cannot be 0

Table: ENCLog; RID type: 28; Token type: none; MD stream: #-

Entry Name

Entry Type

Comments

Token

ULONG

FuncCode

ULONG

Table: ImplMap; RID type: 29; Token type: none; MD streams: #~, #-

Entry Name

Entry Type

Comments

MappingFlags

USHORT

Validity mask: 0x0747

MemberForwarded

MemberForwarded

Method only

ImportName

STRING

Entry point name

ImportScope

RID: ModuleRef

ModuleRef to unmanaged DLL

ENCMap; RID type: 30; Token type: none; MD stream: #-

Entry Name

Entry Type

Comments

Token

ULONG

FieldRVA; RID type: 31; Token type: none; MD streams: #~, #-

Entry Name

Entry Type

Comments

RVA

ULONG

Field

RID: Field

Assembly; RID type: 32; Token type: 0x20000000; MD streams: #~, #-

Entry Name

Entry Type

Comments

HashAlgId

ULONG

MajorVersion

USHORT

MinorVersion

USHORT

BuildNumber

USHORT

RevisionNumber

USHORT

Flags

ULONG

Validity mask: 0x0000C031

PublicKey

BLOB

Name

STRING

No path, no extension

Locale

STRING

AssemblyProcessor; RID type: 33; Token type: none; Unused

Entry Name

Entry Type

Comments

Processor

ULONG

Table: AssemblyOS; RID type: 34; Token type: none; Unused

Entry Name

Entry Type

Comments

OSPlatformId

ULONG

OSMajorVersion

ULONG

OSMinorVersion

ULONG

AssemblyRef; RID type: 35; Token type: 0x23000000; MD streams: #~, #- 

Entry Name

Entry Type

Comments

MajorVersion

USHORT

MinorVersion

USHORT

BuildNumber

USHORT

RevisionNumber

USHORT

Flags

ULONG

0x00000000 or 0x00000001

PublicKeyOrToken

BLOB

Name

STRING

No path, no extension

Locale

STRING

HashValue

BLOB

AssemblyRefProcessor; RID type: 36; Token type: none; Unused

Entry Name

Entry Type

Comments

Processor

ULONG

AssemblyRef

RID: AssemblyRef

AssemblyRefOS; RID type: 37; Token type: none; Unused

Entry Name

Entry Type

Comments

OSPlatformId

ULONG

OSMajorVersion

ULONG

OSMinorVersion

ULONG

AssemblyRef

RID: AssemblyRef

File; RID type: 38; Token type: 0x26000000; MD streams: #~, #-

Entry Name

Entry Type

Comments

Flags

ULONG

0x00000000 or 0x00000001

Name

STRING

No path

HashValue

BLOB

ExportedType; RID type: 39; Token type: 0x27000000; MD streams: #~, #-

Entry Name

Entry Type

Comments

Flags

ULONG

Validity mask: 0x00000007

TypeDefId

ULONG

TypeDef token in another module

TypeName

STRING

TypeNamespace

STRING

Implementation

Implementation

File, ExportedType

ManifestResource; RID type: 40; Token type: 0x28000000; MD streams: #~, #-

Entry Name

Entry Type

Comments

Offset

ULONG

Flags

ULONG

0x000001 or 0x000002

Name

STRING

Implementation

Implementation

0, File, AssemblyRef

NestedClass; RID type: 41; Token type: none; MD streams: #~, #-

Entry Name

Entry Type

Comments

NestedClass

RID: TypeDef

EnclosingClass

RID: TypeDef

Coded Token Types 

Type

Tag

TypeDefOrRef (64): 3 referenced tables, tag size 2

TypeDef

0

TypeRef

1

TypeSpec

2

HasConstant (65): 3 referenced tables, tag size 2

Field

0

Param

1

Property

2

HasCustomAttribute (66): 19 referenced tables, tag size 5

Method

0

Field

1

TypeRef

2

TypeDef

3

Param

4

InterfaceImpl

5

MemberRef

6

Module

7

DeclSecurity

8

Property

9

Event

10

StandAloneSig

11

ModuleRef

12

TypeSpec

13

Assembly

14

AssemblyRef

15

File

16

ExportedType

17

ManifestResource

18

HasFieldMarshal (67): 2 referenced tables, tag size 1

Field

0

Param

1

HasDeclSecurity (68): 3 referenced tables, tag size 2

TypeDef

0

Method

1

Assembly

2

MemberRefParent (69): 5 referenced tables, tag size 3

TypeDef

0

TypeRef

1

ModuleRef

2

Method

3

TypeSpec

4

HasSemantics (70): 2 referenced tables, tag size 1

Event

0

Property

1

MethodDefOrRef (71): 2 referenced tables, tag size 1

Method

0

MemberRef

1

MemberForwarded (72): 2 referenced tables, tag size 1

Field

0

Method

1

Implementation (73): 3 referenced tables, tag size 2

File

0

AssemblyRef

1

ExportedType

2

CustomAttributeType (74): 5 referenced tables, tag size 3

TypeRef

0

TypeDef

1

Method

2

MemberRef

3

String

4

ResolutionScope (75): 4 referenced tables, tag size 2

Module

0

ModuleRef

1

AssemblyRef

2

TypeRef

3



Inside Microsoft. NET IL Assembler
Inside Microsoft .NET IL Assembler
ISBN: 0735615470
EAN: 2147483647
Year: 2005
Pages: 147
Authors: SERGE LIDIN

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net