That error is (from corerror.h, in the Include directory of the .NET SDK):
#define CLDB_E_RECORD_NOTFOUND EMAKEHR(0x1130) // Record
wasn't found on lookup.
You're probably getting it because only a very few classes have ClassLayout
information in the metadata--just those with ExplicitLayout. For the rest,
the CLR determines the layout at runtime.
In the v1.x profiling API, there is no way of determining the class layout
of a class that was laid out at runtime by the CLR. The v2 Beta 1 profiling
API has a GetClassLayout function on the profiling API itself that does
tell you this information.
HTH,
Jonathan
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Dmitriy Zaslavskiy" <dimkaz25@yahoo.com>
| Subject: Calling GetClassLayout from Profiler
[quoted text clipped - 9 lines]
| NNTP-Posting-Host: ool-44c51bbd.dyn.optonline.net 68.197.27.189
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13
phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.clr:12115
| X-Tomcat-NG: microsoft.public.dotnet.framework.clr
[quoted text clipped - 5 lines]
| In general is there another way to find out the offset a field within a
| class?