这也就是为什么有上一篇博客http://www.2cto.com/kf/201203/122574.html的原因。既然可执行文件不包含元数据,那么pdb总包含的吧。良心的Visual Studio提供了我们msdia100.dll这个COM库,使得我们可以做到从pdb读取符号内容的事情。当然上一篇博客是针对VisualStudio本地C++编译出来的pdb开发的,不能适合所有种类的pdb。
有了这个pdb之后,我们把pdb用C++调用msdia100.dll先生成一份xml,然后就可以用伟大的.net linq to xml来完成接下来的事情了。现在我们手上有了两份xml,一份是xml注释,另一份是pdb符号表。利用Vczh Library++ 3.0的[Tools\Release\SideProjects\GacUISrc\Xml2Doc\Xml2Doc.csproj]项目里面的代码,就可以将这两份xml合并成第三份xml了: < xml version="1.0" encoding="utf-8" >
This is the interface for graphics renderers.
Calculate the minimum size using the binded graphics element and its state.
Notify that the state in the binded graphics element is changed. This function is usually called by the element itself.
Render the graphics element using a specified bounds.
Bounds to decide the size and position of the binded graphics element.
Set a
The graphics render target. It can be NULL.
Release all resources that used by this renderer.
Initialize the grpahics renderer by binding a
The graphics element to bind.
Access the graphics
现在一个类型和函数的xml注释也好,他的基类啊函数的参数类型返回类型也好,全部都出现了。下面可以做的事情就很多了。譬如说自己写一个xml到html文档的转换程序啦,或者用伟大的.net linq to xml把这个xml一转成为其他xml格式,然后使用现有的工具生成文档啦,所有的事情都可以做了。
我接下来会根据GacUI的情况不断增加这个小工具的功能,最终让他可以产生一份好的GacUI的文档,不仅包含XML注释的内容,还可以包含外部插入的tutorial啊,带高亮的code sample等等。
摘自