惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
SegmentFault 最新的问题
G
Google Developers Blog
H
Help Net Security
月光博客
月光博客
阮一峰的网络日志
阮一峰的网络日志
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Proofpoint News Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
B
Blog RSS Feed
爱范儿
爱范儿
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 三生石上(FineUI控件)
大猫的无限游戏
大猫的无限游戏
人人都是产品经理
人人都是产品经理
GbyAI
GbyAI
D
Docker
Hugging Face - Blog
Hugging Face - Blog
I
InfoQ
博客园 - 司徒正美
Last Week in AI
Last Week in AI
Microsoft Security Blog
Microsoft Security Blog
美团技术团队
Stack Overflow Blog
Stack Overflow Blog
M
MIT News - Artificial intelligence

博客园 - stone

release 版本dll的调试 dead lock in thread pool Excel C# Automation 如何让iframe 自动适应窗口的高度 自定义Silverlight toolkit 里面的 Column Chart 的data point 二叉树算法题 How to do live debug the Managed code in Windows Phone 7 单链表操作相关算法 BUG: "Old format or invalid type library" error when automating Excel on 64 bit server 2008 - stone enable Assembly Load Trace 不合法的XML字符必须被替换为相应的实体 - stone - 博客园 VS中Sos调试扩展简介 (转帖) Sql server 2005 connection string - stone Get depth of BTree Quick sort C# code(2) Quick sort C# code use the network trace, from msdn. - stone 字节流编码获取原来这么复杂,但也很简单 通过DataTable获得表的主键 让IE支持自己的协议
如何修改 VS 自动生成的 COM interop dll
stone · 2009-07-31 · via 博客园 - stone

Visual studio 里添加对COM 组件的引用 会自动生成一个 interop dll. 事实上VS 对有些COM interface 的支持并不好, 需要我们修改相应的代码的时候 该怎么办? 这时候要用到 .net framework sdk 里面的小工具。

1. 反编译 interop dll 从而得到 IL 代码
    ildasm Interop.your.dll /out:your.il

2. 用编辑工具 修改 IL 代码

3. 用IL 编译器生成新的DLL
     ilasm your.il /dll /output=Interop.your.dll

使用这种方法 可以解决很多C# 使用 COM interop的难题。