all groups > dotnet clr > october 2004 >
You're in the

dotnet clr

group:

Calling GetClassLayout from Profiler


Calling GetClassLayout from Profiler Dmitriy Zaslavskiy
10/22/2004 12:48:09 PM
dotnet clr:
Hi I am trying to call IMetaDataImport::GetClassLayout from a profiler and
it returns 0x80131130
What am I doing wrong?

In general is there another way to find out the offset a field within a
class?

RE: Calling GetClassLayout from Profiler jkeljo NO[at]SPAM online.microsoft.com (
10/28/2004 7:07:50 PM
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
| Date: Fri, 22 Oct 2004 12:48:09 -0400
| Lines: 8
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| Message-ID: <uO0fQCGuEHA.4040@tk2msftngp13.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.clr
| 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
|
| Hi I am trying to call IMetaDataImport::GetClassLayout from a profiler
and
| it returns 0x80131130
| What am I doing wrong?
|
| In general is there another way to find out the offset a field within a
| class?
|
|
|


AddThis Social Bookmark Button