-
I have a dll and I would like to declare a function in it to be used in my VB app. I have a problem because I won't know the path to the dll unless i can do a search on the user's system to see where the components are installed.
Actually, I need to access the dll on a cd-rom and i need to be able to determine what drive letter that is.
This is a web based activeX control that i'm working on.
is there a way to check the registry? I know that you can't have any "end sub" or "end function" before a declare statement.
Any thoughts?
Thanks.
-
after you find the DLL, I believe you can use the ChDir to change the current directory to that where the DLL resides. Your calls will then look like any other standard Win32 API calls (because you don't have to specify the path)
-
-
I think I need to be more specific.
When you want to use a dll you use:
declare function myfunc Lib "pathtodll" Alias dllfunc()
For my problem, I need to give a path to a dll by dynamically searching for the path to the user's cd rom.
Now I know how to get a hold of the driveletter to the CDROM (and you gave a good answer for that). However, I need to find out how to input that information into the declare statement.