 |
VB6
Win95
具体是这样的:我是第一次编写ACTIVEX DLL程序,(在学习)在DLL中我只在类模块中写了一个函数CARD,具体如下:
Public Sub card_config(ByVal address As Integer, ByVal intermit As Integer)
Open "c:\test\test.ini" For Output As #1
Write #1, address, intermit, 12, 13
Close #1
End Sub
编译成DLL后,在另外一个程序中调用,格式如下:
在模块中声明:
Public Declare Function card_config Lib "c:\test\card.dll" (ByVal address As Integer, ByVal intermit As Integer)
在一个按钮中写如下:
c = card_config(12,12)
运行后出现错误:编Activex DLL后,调用时出现错误:“实时错误453,找不到DLL入口点”望指教。如有可能:请详细告之DLL的编程格式。(hjm)
|
| |
|
 |
Declare语句只能调用标准DLL,而不能用于调用ActiveX DLL,这是你程序出错的原因。VB无法生成标准DLL,只能生成ActiveX DLL。调用ActiveX DLL,一般通过CreateObject语句或在Project|Reference中引用。详细的建立ActiveX DLL和调用ActiveX DLL的步骤,可以参考微软的Knowledge Base的文章:“Q170946 HOWTO: Create and Use a Minimal ActiveX Component in VB”。更详细的介绍可以参考我写的《Visual Basic编程晋级:ActiveX控件》(http://china.zealsoft.com/articles/vbactivex/)一书的“第十六章 其他ActiveX部件 ”。
此问题由李海回答。
附加关键字:编程, 源程序, programming, source code, Visual Basic, VB, 错误信息, error, error message, link, compile, runtime。
|
| |
|
| |
|
| |
|
|