LONGXIN 发表于 2010-12-4 01:26:20

2009 中,引用VBA6.DLL,CAD崩溃

2009 中,引用VBA6.DLL,CAD崩溃
Public Declare Function EbExecuteLine Lib "vba6.dll " (ByVal pStringToExec As Long, ByVal Unknownn1 As Long, ByVal Unknownn2 As Long, ByVal fCheckOnly As Long) As Long
Public Function ExecuteLine(sCode As String, Optional fCheckOnly As Boolean) As Boolean
      ExecuteLine = EbExecuteLine(StrPtr(sCode), 0&, 0&, Abs(fCheckOnly)) = 0
End Function
怎么解决?

chmenf087 发表于 2010-12-4 14:54:18

不知道楼主的API是哪儿的,MSDN上都找不到

LONGXIN 发表于 2010-12-5 23:42:25

不是VB,是VBA中的

chmenf087 发表于 2010-12-6 19:06:25

帮你查了查,这个接口的runtime-error是VB的on error 无法捕捉的,具体砸的就不清楚了,可能是api执行的vba语句和某个正在执行的VBA程序冲突或者,API强制读CAD某部分内存吧
页: [1]
查看完整版本: 2009 中,引用VBA6.DLL,CAD崩溃