« 印度F4_第二集_阿霞_中文字幕 | 回到主頁面 | Komica 是個搞笑的成句大集合 »

May 04, 2007

How to debug COM DLL registeration


將此網頁加入【百度收藏】... 加入此網頁到【del.icio.us 書籤】 technorati

DebugSetting1

I know many people feel confuse if your COM DLL failed during registeration (using RegSvr32 to register it). I spent a little time, and find out how to debug it. It can help you to find out what is the root cause. OK! let get start.

How can we do if register COM dll failed?

Firstable, you can use "dumpbin /dependents YOURDLL.DLL" to find out if you lost some dependency DLL.

Ok! ~~ let go to debug DLL registeration.

  1. Right click you DLL project --> Open "Properties".
  2. Go to "Configuration Properties" --> "Debugging" .
  3. In "Command", fill it "C:\WINDOWS\system32\regsvr32.exe"
  4. In "Command Arguments", fill it "$(TargetPath)"
  5. Just press F5 to run it.

Please note, you should setting break point as follows:

  • DllMain
  • DllRegisterServer
  • DllUnregisterServer (if unregister failed).

That's it~~~



VS2005 (俗稱的VC8)相關問題

由 Evan 發表於 May 04, 2007 將此網頁加入【百度收藏】... 加入此網頁到【del.icio.us 書籤】 technorati
引用
本文的引用網址:


以下是前來引用的連結 'How to debug COM DLL registeration' 來自 Blog E
迴響
發表迴響









記住我的資訊?




(請輸入以下的驗證碼)