各位老大: 
  我在ActiveX控件中按如下方式引用了一个动态链接库:
Public Declare Function CreateLogWindow Lib "opteBioGuardLogon.dll" (ByVal sUser As String, ByRef nFlag As Long, ByVal nType As Long, ByVal sinfo As String) As Long
最后打雹成OCX 控件,在网页上加载,运行,提示:opteBioGuardLogon.dll 找不到
特别说明:这个dll 文件已经打包到 CAB文件中了。尔后又做了一个类似的VB的winform ,在开发环境中运行,提示如上,但是将此VBForm 编译成Project1.exe 文件后,再运行,一切正常,郁闷啊,已经折腾两天了,不知为何,请各位老大帮助。

解决方案 »

  1.   

    打包时将 opteBioGuardLogon.dll 指定至系统目录 \system。
      

  2.   

    谢谢 of123
    还是不行啊,这个dll 是第三方软件公司提供的,比较难过的是,它既不注册,也不能通过VB中的引用装载,只能通过Public Declare Function CreateLogWindow Lib "opteBioGuardLogon.dll" (ByVal sUser As String, ByRef nFlag As Long, ByVal nType As Long, ByVal sinfo As String) As Long 引用。
      

  3.   

    when running the code from within Visual Basic or IE the current path is the installation directory of Visual Basic or IE itself, respectively.  If you compile and run your project then the current path becomes the path where the project was saved.
      

  4.   

    楼上正解,dll的相对路径出了问题
    你要把dll放在和ocx相同的目录下