metadataclrildasm

What does 'CallCnvntn' in metainfo mean?


I have the following metainfo of my *.exe file:

But I don't figure out what 'CallCnvntn' means. I have found no information on the Internet.

By the way, may you explain what flags [AutoLayout], [AnsiClass] and [BeforeFieldInit] are used for?


Solution

  • The Microsoft programmer that worked on ildasm abbreviated "Calling convention" to make it fit.

    The best place to find the exact meaning of the metadata attributes in the CLI spec. At breakneck speed: [AutoLayout] is equivalent to the LayoutKind.Auto enum value in .NET. Classes have LayoutKind.Auto by default, structs have LayoutKind.Sequential by default. [AnsiClass] is equivalent to the CharSet.Ansi enum value. These two type attributes can be changed with the [StructLayout] attribute in C# code, normally only done if you write a type to be used in pinvoke declarations. [BeforeFieldInit] determines when a static constructor of a type has to run. Present by default, it allows the CLR to delay the call until the code uses a static field in the class.