Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / October 2004

Tip: Looking for answers? Try searching our database.

Calling GetClassLayout from Profiler

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dmitriy Zaslavskiy - 22 Oct 2004 17:48 GMT
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?
"Jonathan Keljo [MS]" - 28 Oct 2004 20:07 GMT
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?

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.