File not found when loading dll from vb6

前端 未结 5 1915
无人共我
无人共我 2020-12-19 08:06

I am declaring and calling a dll function using the following syntax in VB6:

\'Declare the function
Private Declare Sub MYFUNC Lib \"mylib.dll\" ()

\'Call t         


        
5条回答
  •  渐次进展
    2020-12-19 08:39

    The .dll must be in the current "working" directory (or registered), otherwise at run-time the application can't find it.

    Do:

    MsgBox "The current directory is " & CurDir

    And then compare that with what you were expecting. The .dll would need to be in that directory.

提交回复
热议问题