Replies: 1 comment
-
|
I might have answered my own question. As an intro to any new readers, the CustomAttribute table has three columns: parent, constructor and value. The goal of the CustomAttribute table is to relate an attribute (defined in the MemberRef table) to a type (found in either MethodDef, Field, TypeDef or Param), possibly with a value. The parent column is a HasCustomAttribute coded token. According to ECMA-335, this means that parent can refer to any metadata table except CustomAttribute itself. ECMA-335 specifically mentions:
In the case of win32metadata, all 150k+ attributes point to one of the four tables:
The constructor tells us which kind of attribute to relate to the parent. Here is a reference of the attribute types as found in Windows.Win32.winmd. Note that it may be outdated at the point you are reading this in the future.
Now onto what I think might be the difference between the two ObsoleteAttribute types. CustomAttribute entries where the constructor is the 0x0A000015 attribute always has a value 0x17. In the blob heap, 0x17 contains the value CustomAttribute entries where the constructor is the 0x0A00001F attribute always has a value that is not 0x17. This means it will most likely point to some blob that contains a non-empty string. What I think might be the case is that this string tells us which type or function supersedes the obsolete type or function. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
(using version 63.0.31-preview of Windows.Win32.winmd)
I noticed in the metadata that there are two seemingly identical entries in the MemberRef table for ObsoleteAttribute, one at 0x0A00001F and the other at 0x0A000015. Is there a practical difference between them?
Beta Was this translation helpful? Give feedback.
All reactions