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 2003

Tip: Looking for answers? Try searching our database.

pdb access through ISysWrapper

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joe B. - 06 Oct 2003 07:06 GMT
Hi,

I would like to access .net debugging data that stored in pdb's using
C#.  I found the ISysWrapper assembly, which provices access to the
System.Diagnostics.SymbolStore implementation, but cannot for the life
of me figure out how to properly invoke "SysBinder.GetReader(int
importer, string filename, string search path)" method correctly.
Here is what I have:

SymBinder binder = new SymBinder();
binder.GetReader(???,"mydll.dll,"c:\\");

The "int importer" parameter is documented as "The metadata import
interface", which I know refers to cor.h's IMetaDataImport interface.
But I cannot find an implementation of the IMetaDataImport interface
to use...  Can anyone help?

Joe Betz
Jennifer Hamilton [MSFT] - 10 Oct 2003 19:39 GMT
There are no managed wrappers for the IMetaDataImport interface.  You need
to use COM interop.  The following code snippet should help:

       // GUIDs Copied from Cor.h
       IMetaDataDispenser mdd =
(IMetaDataDispenser)Activator.CreateInstance(Type.GetTypeFromCLSID(
           new Guid("e5cb7a31-7512-11d2-89ce-0080c792e5d8")));
           
       Guid IID_IMetadataImport = new
Guid("7DAC8207-D3AE-4c75-9B67-92801A497D44");
       IntPtr importer;
       mdd.OpenScope(fn, 0, ref IID_IMetadataImport, out importer);

Jennifer Hamilton
CLR Base Services Development Team
Signature


This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note:  For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.


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.