在没有编译成exe文件前,最好使用绝对路径

解决方案 »

  1.   

    在Declare Function open_to_read Lib "gooder.dll" () As Integer
    resultfile = open_to_read()中指明路径如:
    Declare Function open_to_read Lib "c:\gooder.dll" () As Integer
    resultfile = open_to_read()
      

  2.   

    使用绝对路径我也试过了,结果还是一样。
    结合下面的帮助,看来就是The file isn't DLL-executable. 这个问题了。
    该DLL的源程序已经找不到了,以前做的系统里还能运行使用该DLL文件,
    如何才能再次利用它呢??
    实时错误‘48’:在MSDN里的信息如下
    Error in loading DLL (Error 48)
    A dynamic link library (DLL) is a library specified in the Lib clause of a Declare statement. This error has the following causes and solutions: 
    The file isn't DLL-executable. 
    If the file is a source-text file, it must be compiled and linked to DLL executable form.
    The file isn't a Microsoft Windows DLL. 
    Obtain the Microsoft Windows DLL equivalent of the file.
    The file is an early Microsoft Windows DLL that is incompatible with Microsoft Windows protect mode. 
    Obtain an updated version of the DLL.
    The DLL references another DLL that isn't present. 
    Obtain the referenced DLL and make it available to the other DLL.
    The DLL or one of the referenced DLLs isn't in a directory specified by your path. 
    Move the DLL to a referenced directory or place its current directory on the path.
      

  3.   

    VB3中编译的dll在VB6中无法使用。
    重新编译一次吧。
      

  4.   

    该DLL的源程序已经找不到了,能直接把它转换过来吗?