如何在Visual Studio中调试DLL [英] How to Debug a DLL in Visual Studio

查看:539
本文介绍了如何在Visual Studio中调试DLL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们,
我通过在Visual Studio 2005中构建类库来创建Dll.我在Excel的宏中调用该Dll的函数.
当我执行宏时,该DLL的功能就会调用,并给出错误代码429.
当DLL的函数在宏中执行时,我想调试该DLL的代码.
在Visual Studio中调试Dll的代码需要哪些设置或需要进行其他更改?我对此进行了很多研究,但未成功.
非常紧急!

谢谢..

Hi frds,
I create a Dll by building a class library in the Visual Studio 2005.I call a function of that Dll in the Excel''s Macro.
When I Executing Macro then function of that DLL calls and it gave Error Code 429.
I want to Debug the Code of that DLL, when DLL''s Function Excuting in Macro.
What settings are Required to Debug the Code of the Dll in visual studio or additional changes required?.I researched alot about it but did not got any success.
its very urgent!!

Thank you..

推荐答案

错误429是"ActiveX组件无法创建对象"

您的Excel代码无法创建COM组件的实例-您是否确实将类库创建为COM对象?您不能仅通过COM来访问.Net DLL,而无需进行任何操作使其可访问.

在C#中构建COM对象 [ ProgID [ ^ ],可用于创建实例.
Error 429 is ''ActiveX Component Can''t Create Object''

Your Excel code cannot create an instance of the COM component - Did you definitely create the class library as a COM object? You cannot just access a .Net DLL from COM without a bit of plumbing to make it accessible.

Building COM Objects in C#[^]

You should then have a ProgID[^] for your DLL, which you can use to create instances.


The DLL you created, first needs to be installed in the global assembly cache(The dll needs to be shared). It should also be a COM enabled DLL, so you need to create a COM object to access a private .NET DLL.



谢谢



Thanks


这篇关于如何在Visual Studio中调试DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆