While working in the VB IDE and using only the .DLL name in your declerations the .DLL file itself must reside either in the system directory or the installed location of VB6.EXE typically C:\Program Files\Microsoft Visual Studio\VB98. This only applies to debugging after you compile the that .DLL can be placed in the same directory as your executable.
Just remember if you don't want to copy to those locations when debugging in the VB IDE then hardcode the API path to point to the .DLL but when your ready to compile make sure you change it to the .DLL name only and it will work for your current executable path.
Main Topics
Browse All Topics





by: egl1044Posted on 2009-06-05 at 18:50:25ID: 24561181
You just specify the dll name with no path when you declare the declerations.
1) Windows will look into the current directory.
2) Windows will also check the system directory.
Public Declare Function ReadPort Lib "starioport.dll" () As ?
I see the API is a function and you haven't given a return type for that API so you will also need to make sure your applying the correct return type for that API.