阅读:1770回复:3
[求助]如何调试加载到Arcmap的Dll文件?
我自己用vb的生成了一个dll文件,这个文件定制了一个Toolbar,可以加载到Arcmap,但是我不晓得如何调试这个vb程序!请各位高手指点一下阿!
[此贴子已经被作者于2005-8-6 22:05:52编辑过]
|
|
1楼#
发布于:2005-08-06 23:23
Arcmap工具栏空白地方双击调出Customize 对话筐,add file from ...添加*.DLL,ToolBars下面就有了定制的Toolbar选中就OK了
|
|
2楼#
发布于:2005-08-07 09:39
<P>是的,正如happydust所说的,可以把dll定制的toolbar加载到arcmap,但是请问我在用vb写这个dll程序的时候,怎么来调试,知道我的程序有没有错误,或是错在哪里呢?</P>
|
|
3楼#
发布于:2005-08-08 15:31
<P>可以参照使用ESRIDebugHelper模块,内容如下,dxfout.dll为我们编写的dll</P>
<P>Option Explicit</P> <P>Public Sub Main()<BR> On Error GoTo ReregError<BR> Dim pCCM As IComponentCategoryManager<BR> Set pCCM = New ComponentCategoryManager<BR> Dim pCCID As New UID<BR> Dim pCLSID As New UID</P> <P> ' Components for registration follow</P> <P> ' CoClass: DXFOUT.ExportDXF<BR> pCLSID.Value = "{67BA4DCF-1D5B-11D4-AD9F-0080C7E24126}"<BR> pCCID.Value = "{B56A7C42-83D4-11D2-A2E9-080009B6F22B}" ' ESRI Mx Commands<BR> pCCM.SetupObject "C:\Projects\arcmap_dxf\DXFOUT.dll", pCLSID, pCCID, True</P> <P> ' Execute the ' Debug Application<BR> Shell "C:\arcgis\arcexe83\bin\ArcMap.exe"</P> <P><BR> Exit Sub<BR>ReregError:<BR> Debug.Print "An error has occured during component re-registration"<BR> Err.Clear<BR>End Sub<BR></P> |
|
|