⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 16696.html

📁 VB技巧问答10000例 VB技巧问答10000例
💻 HTML
字号:
<html>
  <head>
    <title>VB 与 DLL 的问题?</title>
  </head>
  <body bgcolor="#FFFFFF" vlink="#808080">
    <center>
      <h1>VB 与 DLL 的问题?</h1>
    </center>
<hr size=7 width=75%>

<hr size=7 width=75%><p>
Posted by 黄牛 on August 05, 1999 at 15:51:55:<p>
我想用 VB 写个 DLL,但是有许多问题:<p>启动 VB 时可看到两种 DLL : ActiveX DLL 和 ActiveX Document DLL<br>不知道这两种有什么不同?<p>所以我就选 ActiveX DLL 试试<p>我新增了一个模组,内容如下:<br>===============================================<br>Option Explicit<p>    Dim Data1 As Integer<p>Public Sub SendData(ByVal int1 As Integer)<br>    Data1 = int1<br>End Sub<p>Public Function GetData() As Integer<br>    GetData = Data1<br>End Function<br>===============================================<p>将它编译成 DLL 之后,复制到 Windows\System 底下<br>然后写一个程式测试这个 DLL 可不可以用,其内容如下:<p>Private Declare Sub SendData Lib "project1" (ByVal int1 As Integer)<br>Private Declare Function GetData Lib "project1" () As Integer<p>Private Sub Command1_Click()<br>    SendData (1)<br>    Text1.Text = GetData()<br>End Sub<p>但是执行之后,按下 Command1 却出现:<p>执行阶段错误 '453':<br>DLL 进入点 SendData 无法在 project1 中找到<p>我换 ActiveX Document DLL 也还是一样<br>请问我哪里作错了,谢谢!
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 16696-->
<!--top: 16756--><li><a href="16756.html">Re: VB 与 DLL 的问题?</a> <b>Arthur</b> <i>12:20:17 8/06/99</i>
(<!--responses: 16756-->1)
<ul><!--insert: 16756-->
<!--top: 16944--><li><a href="16944.html">Re: VB 与 DLL 的问题?</a> <b>黄牛</b> <i>20:54:06 8/09/99</i>
(<!--responses: 16944-->0)
<ul><!--insert: 16944-->
</ul><!--end: 16944-->
</ul><!--end: 16756-->
<!--top: 16699--><li><a href="16699.html">请问...</a> <b>小洪</b> <i>16:44:39 8/05/99</i>
(<!--responses: 16699-->2)
<ul><!--insert: 16699-->
<!--top: 16707--><li><a href="16707.html">我用DLL的目的是</a> <b>黄牛</b> <i>17:26:04 8/05/99</i>
(<!--responses: 16707-->0)
<ul><!--insert: 16707-->
</ul><!--end: 16707-->
<!--top: 16703--><li><a href="16703.html">Re: 请问...</a> <b>黄牛</b> <i>17:08:44 8/05/99</i>
(<!--responses: 16703-->0)
<ul><!--insert: 16703-->
</ul><!--end: 16703-->
</ul><!--end: 16699-->
</ul><!--end: 16696-->
<br><hr size=7 width=75%><p>

</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -