winmd library

A WinMD parser based on the ECMA-335 standard.

This library enables low-level introspection of .winmd files, which describe Windows APIs in a language-independent format. Originally designed for the Windows Runtime (WinRT), the format is now also used for metadata associated with:

The primary use case for this library is to build Dart projections of native Windows APIs, such as the win32 package.

See also:

Classes

ArrayMarshallingDescriptor
A marshalling descriptor for a field or parameter marshaled as a native array.
ArrayReferenceType
Represents a reference to an array type.
ArrayType
Represents an array type.
Assembly
Represents a row in the Assembly metadata table.
AssemblyOS
Represents a row in the AssemblyOS metadata table.
AssemblyProcessor
Represents a row in the AssemblyProcessor metadata table.
AssemblyRef
Represents a row in the AssemblyRef metadata table.
AssemblyRefOS
Represents a row in the AssemblyRefOS metadata table.
AssemblyRefProcessor
Represents a row in the AssemblyRefProcessor metadata table.
AttributeArg
Represents a single argument in a custom attribute instantiation.
AttributeEnumType
Represents an enum type in custom attributes.
AttributeEnumValue
Represents an enum value in custom attributes.
Blob
Represents a raw data block (blob) that can be read sequentially.
BlobHeap
Provides indexed access to the #Blob heap in a metadata file.
BoolType
Represents a boolean type.
BoolValue
Represents a boolean value.
CharType
Represents a character type.
CharValue
Represents a character value.
ClassLayout
Represents a row in the ClassLayout metadata table.
CodedIndex
Base class for all coded indices used in metadata tables.
CompressedInteger
Represents a compressed unsigned integer as defined in ECMA-335 §II.23.2.
Constant
Represents a row in the Constant metadata table.
ConstPointerType
Represents a const pointer type.
ConstReferenceType
Represents a const (readonly) reference type to another type.
CustomAttribute
Represents a row in the CustomAttribute metadata table.
CustomAttributeType
Represents a coded index into either a MethodDef or a MemberRef.
CustomAttributeTypeMemberRef
A CustomAttributeType representing a MemberRef.
CustomAttributeTypeMethodDef
A CustomAttributeType representing a MethodDef.
DeclSecurity
Represents a row in the DeclSecurity metadata table.
Event
Represents a row in the Event metadata table.
EventMap
Represents a row in the EventMap metadata table.
ExportedType
Represents a row in the ExportedType metadata table.
Field
Represents a row in the Field metadata table.
FieldLayout
Represents a row in the FieldLayout metadata table.
FieldMarshal
Represents a row in the FieldMarshal metadata table.
FieldRVA
Represents a row in the FieldRVA metadata table.
FieldSig
Represents the definition of a field within metadata.
File
Represents a row in the File metadata table.
FixedArg
Represents a fixed (positional) argument passed to a custom attribute constructor.
FixedArrayType
Represents a fixed-size array type.
Float32Type
Represents a 4-byte floating point type.
Float32Value
Represents a 4-byte floating point value.
Float64Type
Represents an 8-byte floating point type.
Float64Value
Represents a platform-specific signed integer value.
GenericParam
Represents a row in the GenericParam metadata table.
GenericParamConstraint
Represents a row in the GenericParamConstraint metadata table.
GenericParameterType
Represents a generic parameter type.
Guid
Represents a globally unique identifier (GUID), a 128-bit value used to uniquely identify entities such as COM interfaces, class objects, and entry-point vectors (EPVs).
GuidHeap
Provides indexed access to the #GUID heap in a metadata file.
HasConstant
Represents a coded index for entities that can have constant values.
HasConstantField
A HasConstant representing a Field.
HasConstantParam
A HasConstant representing a Param.
HasConstantProperty
A HasConstant representing a Property.
HasCustomAttribute
Represents a coded index for entities that can have custom attributes.
HasCustomAttributeAssembly
A HasCustomAttribute representing an Assembly.
HasCustomAttributeAssemblyRef
A HasCustomAttribute representing an AssemblyRef.
HasCustomAttributeEvent
A HasCustomAttribute representing an Event.
HasCustomAttributeExportedType
A HasCustomAttribute representing an ExportedType.
HasCustomAttributeField
A HasCustomAttribute representing a Field.
HasCustomAttributeFile
A HasCustomAttribute representing a File.
HasCustomAttributeGenericParam
A HasCustomAttribute representing a GenericParam.
HasCustomAttributeGenericParamConstraint
A HasCustomAttribute representing a GenericParamConstraint.
HasCustomAttributeInterfaceImpl
A HasCustomAttribute representing an InterfaceImpl.
HasCustomAttributeManifestResource
A HasCustomAttribute representing a ManifestResource.
HasCustomAttributeMemberRef
A HasCustomAttribute representing a MemberRef.
HasCustomAttributeMethodDef
A HasCustomAttribute representing a MethodDef.
HasCustomAttributeMethodSpec
A HasCustomAttribute representing a MethodSpec.
HasCustomAttributeModule
A HasCustomAttribute representing a Module.
HasCustomAttributeModuleRef
A HasCustomAttribute representing a ModuleRef.
HasCustomAttributeParam
A HasCustomAttribute representing a Param.
HasCustomAttributeProperty
A HasCustomAttribute representing a Property.
HasCustomAttributeStandaloneSig
A HasCustomAttribute representing a StandAloneSig.
HasCustomAttributeTypeDef
A HasCustomAttribute representing a TypeDef.
HasCustomAttributeTypeRef
A HasCustomAttribute representing a TypeRef.
HasCustomAttributeTypeSpec
A HasCustomAttribute representing a TypeSpec.
HasDeclSecurity
Represents a coded index for entities that can have declarative security attributes.
HasDeclSecurityAssembly
A HasDeclSecurity representing an Assembly.
HasDeclSecurityMethodDef
A HasDeclSecurity representing a MethodDef.
HasDeclSecurityTypeDef
A HasDeclSecurity representing a TypeDef.
HasFieldMarshal
Represents a coded index for a Field or a Param.
HasFieldMarshalField
A HasFieldMarshal representing a Field.
HasFieldMarshalParam
A HasFieldMarshal representing a Param.
HasSemantics
Represents a coded index for an Event or a Property.
HasSemanticsEvent
A HasSemantics representing an Event.
HasSemanticsProperty
A HasSemantics representing a Property.
Implementation
Represents a coded index for a File, AssemblyRef, or ExportedType.
ImplementationAssemblyRef
A Implementation representing an AssemblyRef.
ImplementationExportedType
A Implementation representing an ExportedType.
ImplementationFile
A Implementation representing a File.
ImplMap
Represents a row in the ImplMap metadata table.
Int16Type
Represents a signed 2-byte integer type.
Int16Value
Represents a signed 2-byte integer value.
Int32Type
Represents a signed 4-byte integer type.
Int32Value
Represents a signed 4-byte integer value.
Int64Type
Represents a signed 8-byte integer type.
Int64Value
Represents a signed 8-byte integer value.
Int8Type
Represents a signed 1-byte integer type.
Int8Value
Represents a signed 1-byte integer value.
InterfaceImpl
Represents a row in the InterfaceImpl metadata table.
IntPtrType
Represents a platform-specific signed integer type.
LocalVarSig
Represents the signature for a method's local variables within metadata.
ManifestResource
Represents a row in the ManifestResource metadata table.
MarshallingDescriptor
Describes how a parameter or field is marshaled between managed and unmanaged code, as specified in ECMA-335 §II.23.4.
MemberForwarded
Represents a coded index for members that can be forwarded.
MemberForwardedField
A MemberForwarded representing a Field.
MemberForwardedMethodDef
A MemberForwarded representing a MethodDef.
MemberRef
Represents a row in the MemberRef metadata table.
MemberRefParent
Represents a coded index for a TypeDef, TypeRef, ModuleRef, MethodDef, or TypeSpec.
MemberRefParentMethodDef
A MemberRefParent representing a MethodDef.
MemberRefParentModuleRef
A MemberRefParent representing a ModuleRef.
MemberRefParentTypeDef
A MemberRefParent representing a TypeDef.
MemberRefParentTypeRef
A MemberRefParent representing a TypeRef.
MemberRefParentTypeSpec
A MemberRefParent representing a TypeSpec.
MemberRefSignature
Represents a signature for a field or method within metadata.
MetadataHeap
Represents a contiguous region of memory used to store structured binary data, such as strings, blobs, or GUIDs in a metadata file.
MetadataIndex
An index over one or more MetadataReader instances, allowing efficient lookup and traversal of metadata types.
MetadataLookup
Provides fast, structured access to constantIndex, functionIndex, and typeIndex within a MetadataIndex, enabling efficient lookup by namespace and name or by name alone.
MetadataReader
Provides functionality to read a valid .winmd or ECMA-335 metadata file, including metadata tables, heaps, and system-level assembly references.
MetadataType
Represents a data type of in the ECMA-335 metadata model.
MetadataValue
Represents a typed constant value in the ECMA-335 metadata model.
MethodDef
Represents a row in the MethodDef metadata table.
MethodDefOrRef
Represents a coded index for a MethodDef or a MemberRef.
MethodDefOrRefMemberRef
A MethodDefOrRef representing a MemberRef.
MethodDefOrRefMethodDef
A MethodDefOrRef representing a MethodDef.
MethodImpl
Represents a row in the MethodImpl metadata table.
MethodRefSig
Represents the the call site signature for a method.
MethodSemantics
Represents a row in the MethodSemantics metadata table.
MethodSignature
Represents the signature of a method within metadata.
MethodSpec
Represents a row in the MethodSpec metadata table.
Module
Represents a row in the Module metadata table.
ModuleRef
Represents a row in the ModuleRef metadata table.
MutablePointerType
Represents a mutable (non-const) pointer type.
NamedArg
Represents a named argument in a custom attribute, targeting a field or property.
NamedClassType
Represents a user-defined class type (i.e., a reference type).
NamedType
Represents a user-defined named type within metadata, such as a class, struct, or enum.
NamedValueType
Represents a user-defined value type (i.e., a struct or enum).
NestedClass
Represents a row in the NestedClass metadata table.
NullReferenceType
Represents a null reference type in constants.
ObjectType
Represents a System.Object type.
Param
Represents a row in the Param metadata table.
Property
Represents a row in the Property metadata table.
PropertyMap
Represents a row in the PropertyMap metadata table.
PropertySig
Represents the signature of a property (essentially, the signature of its getter method) within metadata.
ResolutionScope
Represents a coded index for a Module, ModuleRef, AssemblyRef, or TypeRef.
ResolutionScopeAssemblyRef
A ResolutionScope representing an AssemblyRef.
ResolutionScopeModule
A ResolutionScope representing a Module.
ResolutionScopeModuleRef
A ResolutionScope representing a ModuleRef.
ResolutionScopeTypeRef
A ResolutionScope representing a TypeRef.
Row
An abstract base class representing a row in a metadata table.
SimpleMarshallingDescriptor
A descriptor for a field or parameter marshaled as a scalar native type.
StandAloneMethodSig
Represents the signature of a standalone method within metadata.
StandAloneSig
Represents a row in the StandAloneSig metadata table.
StandAloneSignature
Represents a signature for a standalone method or local variable within metadata.
StringHeap
Provides indexed access to the #Strings heap in a metadata file.
StringType
Represents a System.String type.
TableColumn
Describes a single column in a metadata table.
TableData
Represents a single metadata table, including layout and column data.
TableStream
Provides access to a fixed set of metadata tables within a metadata stream.
TypeDef
Represents a row in the TypeDef metadata table.
TypeDefOrRef
Represents a coded index for a TypeDef, TypeRef, or TypeSpec.
TypeDefOrRefTypeDef
A TypeDefOrRef representing a TypeDef.
TypeDefOrRefTypeRef
A TypeDefOrRef representing a TypeRef.
TypeDefOrRefTypeSpec
A TypeDefOrRef representing a TypeSpec.
TypeName
Represents a fully qualified type name within a metadata context, optionally including generic type parameters.
TypeOrMethodDef
Represents a coded index for a TypeDef or a MethodDef.
TypeOrMethodDefMethodDef
A TypeOrMethodDef representing a MethodDef.
TypeOrMethodDefTypeDef
A TypeOrMethodDef representing a TypeDef.
TypeRef
Represents a row in the TypeRef metadata table.
TypeSpec
Represents a row in the TypeSpec metadata table.
Uint16Type
Represents an unsigned 2-byte integer type.
Uint16Value
Represents an unsigned 2-byte integer value.
Uint32Type
Represents an unsigned 4-byte integer type.
Uint32Value
Represents an unsigned 4-byte integer value.
Uint64Type
Represents an unsigned 8-byte integer type.
Uint64Value
Represents an unsigned 8-byte integer value.
Uint8Type
Represents an unsigned 1-byte integer type.
Uint8Value
Represents an unsigned 1-byte integer value.
UintPtrType
Represents a platform-specific unsigned integer type.
UserStringHeap
Provides indexed access to the #US heap in a metadata file.
Utf16StringValue
Represents a UTF-16 string value.
Utf8StringValue
Represents a UTF-8 string value.
VoidType
Represents a void type.

Enums

CallConv
Represents the platform calling convention.
CharSet
Represents the encoding for marshalling P/Invoke function strings.
CodeType
Represents the code type of contained code.
FieldAccess
Represents the field accessibility information.
ManifestResourceVisibility
Represents the visibility of a manifest resource.
MemberAccess
Represents the member accessibility information.
MetadataTable
Represents a metadata table.
SecurityAction
Specifies the security actions that can be performed using declarative security.
SpecialConstraint
Represents the special constraint on a generic parameter.
StringFormat
Defines the interpretation rules for string types.
TypeCategory
Represents the semantic classification of a TypeDef.
TypeLayout
Describes the layout of the fields within the type.
TypeSemantics
Represents the semantics of a type.
TypeVisibility
Represents the visibility of a type to other types.
Variance
Represents the variance for a generic parameter.
VTableLayout
Represents the virtual table layout.

Mixins

HasCustomAttributes
Provides support for querying custom attributes attached to a metadata Row.

Extension Types

AssemblyFlags
Provides information about an Assembly reference.
AssemblyHashAlgorithm
Provides information about an Assembly hash algorithm.
CallingConvention
Represents the calling convention used in method signatures, as defined by ECMA-335.
Culture
Represents a valid culture identifier as defined in ECMA-335 §II.23.1.3.
ElementType
Specifies a common language runtime Type, a type modifier, or information about a type in a metadata type signature.
EventAttributes
Provides information about an event.
FieldAttributes
Provides information about a field.
FileAttributes
Provides information about a file.
GenericParamAttributes
Provides information about a generic type parameter of a generic type or method.
ManifestResourceAttributes
Provides information about a manifest resource.
MethodAttributes
Provides information about a method.
MethodImplAttributes
Provides information about a method implementation.
MethodSemanticsAttributes
Provides information about a method's semantics.
NativeType
Contains values that describe native unmanaged types.
ParamAttributes
Provides information about a parameter.
PInvokeAttributes
Provides information about Platform Invocation (P/Invoke) methods.
PropertyAttributes
Provides information about a property.
TypeAttributes
Provides information about a type.

Extensions

AttributeArgExtension on AttributeArg
Extension methods to simplify extraction of primitive values from AttributeArgs.
ConstantExtension on Constant
Extension methods for strongly-typed access to the underlying value of a Constant.
GuidExtension on Guid
Extension on Guid to support conversion to binary format.
MethodDefExtension on MethodDef
Extension methods for locating parameters within a MethodDef.
TypeDefExtension on TypeDef
Extension methods for querying members of a TypeDef by name.

Constants

ELEMENT_TYPE_ARRAY → const ElementType
A multi-dimensional array type modifier.
ELEMENT_TYPE_BOOLEAN → const ElementType
A boolean type.
ELEMENT_TYPE_BYREF → const ElementType
A reference type modifier.
ELEMENT_TYPE_CHAR → const ElementType
A character type.
ELEMENT_TYPE_CLASS → const ElementType
A class type modifier.
ELEMENT_TYPE_CMOD_OPT → const ElementType
A C language optional modifier.
ELEMENT_TYPE_CMOD_REQD → const ElementType
A C language required modifier.
ELEMENT_TYPE_ENUM → const ElementType
Used in custom attributes to specify an enum.
ELEMENT_TYPE_FIELD → const ElementType
Used in custom attributes to indicate a field.
ELEMENT_TYPE_FNPTR → const ElementType
A pointer to a function.
ELEMENT_TYPE_GENERICINST → const ElementType
A type modifier for generic types.
ELEMENT_TYPE_I → const ElementType
Size of a native integer.
ELEMENT_TYPE_I1 → const ElementType
A signed 1-byte integer.
ELEMENT_TYPE_I2 → const ElementType
A signed 2-byte integer.
ELEMENT_TYPE_I4 → const ElementType
A signed 4-byte integer.
ELEMENT_TYPE_I8 → const ElementType
A signed 8-byte integer.
ELEMENT_TYPE_MAX → const ElementType
An invalid type.
ELEMENT_TYPE_MVAR → const ElementType
A method variable type modifier.
ELEMENT_TYPE_OBJECT → const ElementType
A System.Object type.
ELEMENT_TYPE_PROPERTY → const ElementType
Used in custom attributes to indicate a property.
ELEMENT_TYPE_PTR → const ElementType
A pointer type modifier.
ELEMENT_TYPE_R4 → const ElementType
A 4-byte floating point.
ELEMENT_TYPE_R8 → const ElementType
An 8-byte floating point.
ELEMENT_TYPE_SENTINEL → const ElementType
A type modifier that is a sentinel for a list of a variable number of parameters.
ELEMENT_TYPE_STRING → const ElementType
A System.String type.
ELEMENT_TYPE_SZARRAY → const ElementType
A single-dimensional, zero lower-bound array type modifier.
ELEMENT_TYPE_TYPEDBYREF → const ElementType
A typed reference.
ELEMENT_TYPE_U → const ElementType
Size of an unsigned native integer.
ELEMENT_TYPE_U1 → const ElementType
An unsigned 1-byte integer.
ELEMENT_TYPE_U2 → const ElementType
An unsigned 2-byte integer.
ELEMENT_TYPE_U4 → const ElementType
An unsigned 4-byte integer.
ELEMENT_TYPE_U8 → const ElementType
An unsigned 8-byte integer.
ELEMENT_TYPE_VALUETYPE → const ElementType
A value type modifier.
ELEMENT_TYPE_VAR → const ElementType
A class variable type modifier.
ELEMENT_TYPE_VOID → const ElementType
A void type.
NATIVE_TYPE_ARRAY → const NativeType
A reference to an array with members of an unspecified type.
NATIVE_TYPE_BOOLEAN → const NativeType
A 4-byte Boolean value, where TRUE is non-zero and FALSE is zero.
NATIVE_TYPE_FUNC → const NativeType
A function pointer.
NATIVE_TYPE_I1 → const NativeType
A signed 8-bit integer value.
NATIVE_TYPE_I2 → const NativeType
A signed 16-bit integer value.
NATIVE_TYPE_I4 → const NativeType
A signed 32-bit integer value.
NATIVE_TYPE_I8 → const NativeType
A signed 64-bit integer value.
NATIVE_TYPE_INT → const NativeType
A native 16-bit signed integer value.
NATIVE_TYPE_LPSTR → const NativeType
An LPSTR string value.
NATIVE_TYPE_LPWSTR → const NativeType
An LPWSTR string value.
NATIVE_TYPE_MAX → const NativeType
An invalid value.
NATIVE_TYPE_R4 → const NativeType
A 4-byte floating-point numeric value.
NATIVE_TYPE_R8 → const NativeType
An 8-byte floating-point numeric value.
NATIVE_TYPE_U1 → const NativeType
An unsigned 8-bit integer value.
NATIVE_TYPE_U2 → const NativeType
An unsigned 16-bit integer value.
NATIVE_TYPE_U4 → const NativeType
An unsigned 32-bit integer value.
NATIVE_TYPE_U8 → const NativeType
An unsigned 64-bit integer value.
NATIVE_TYPE_UINT → const NativeType
A native 16-bit unsigned integer value.

Properties

winmdLogger → Logger
The Logger used for all log messages from this package.
final

Exceptions / Errors

WinmdException
An exception generated by the winmd package.