Sorry there is no good document on System.Diagnostics.SymbolStore. But
again, they are just managed wrapper around unmanaged interfaces defined in
DebugRef.doc.
The importer parameter is a IMetaDataImport pointer, as you can see from
DebugRef.doc on the unmanaged interface. There is no managed way to get
IMetaDataImport pointer. But runtime's meta data API can give you one.
Please refer to Tool Developers Guide\metadata unmanaged API.doc. And
samples\metainfo is an example how to use metadata APIs. samples\debugger is
an example how to use unmanaged debugging APIs, including the symbol
manipulating APIs.
Hope this hopes.
> Sorry there is no good document on System.Diagnostics.SymbolStore. But
> again, they are just managed wrapper around unmanaged interfaces defined in
> DebugRef.doc.
Do you know of sample code anywhere besides the unmanaged examples in
the tool developers reference?
> The importer parameter is a IMetaDataImport pointer, as you can see from
> DebugRef.doc on the unmanaged interface. There is no managed way to get
[quoted text clipped - 3 lines]
> an example how to use unmanaged debugging APIs, including the symbol
> manipulating APIs.
Thanks for the explanation, though I'm still quite confused. Why is
the IMetaDataImport a pointer and the managed GetReader interface
takes an int (instead of an IntPtr)? Did Microsoft leave a crucial
piece of the managed symbol wrapper out entirely? Did they not write a
small test prorgram to prove the API worked at all? I hope they
correct this in .NET Framework v1.2 (they look the same in the beta so
far).
I will check out the metadata unamanged API doc, thanks for the
pointer!
> Hope this hopes.
One can always hope ;> I'll let you know if I get any further.
Everything in .NET was so easy, even reflection, up until this point.
I don't know why these APIs appear to be the red-headed step-child of
the framework.
Thanks again!
Conrad Zhang - 15 Feb 2004 05:38 GMT
The int parameter is a bug. It should be IntPtr.
But it should be fine if your application only runs in x86. It is only a
problem in x86-64 and IA64.
> Thanks for the explanation, though I'm still quite confused. Why is
> the IMetaDataImport a pointer and the managed GetReader interface
[quoted text clipped - 8 lines]
>
> Thanks again!