我初学编写dll文件,我在dll中写了一个函数,用测试工程运行没有问题,可是在其他工程中调用时为什么老是说“找不到dll入口点”?是否在编写dll时还要声明函数?该如何声明?

解决方案 »

  1.   

    用 regsvr32.exe 注册它
      

  2.   

    在Project的References中增加引用
      

  3.   

    如果我在dll中只编写一个函数该怎么写?
    例如:
    Public Function Test(ByVal iTest As Integer) as Integer
        Test=iTest+1
    End Function
    那么我在dll中该如何做?
      

  4.   


    Private Sub Form_Load()
        Dim tstMY As New Mytest1
        Dim int1 As Integer
        int1 = tstMY.Test(12)
        MsgBox int1
    End Sub假设类名为Mytest1.