cubix30
12-28-2007, 01:27 PM
Does anyone know how to access a function in a dll (not an ActiveX dll) when the path is variable? Usually, I know where the dll I want to access resides, so use code of the form:
Private Declare Function <VBfunction> Lib "<nameofdll.dll>" Alias "<DllFunctionname>" () As Long
The problem with this is that the <nameofdll.dll> part must be a constant, when I want it to be variable as I will not know where the dll is until after the program has started. :(
Any ideas?
(BTW, I have used so called 'late-binding' with ActiveX dlls where the path is variable, and it works great. However, I'm not really sure how to use late-binding in this case).
Private Declare Function <VBfunction> Lib "<nameofdll.dll>" Alias "<DllFunctionname>" () As Long
The problem with this is that the <nameofdll.dll> part must be a constant, when I want it to be variable as I will not know where the dll is until after the program has started. :(
Any ideas?
(BTW, I have used so called 'late-binding' with ActiveX dlls where the path is variable, and it works great. However, I'm not really sure how to use late-binding in this case).