So I’m trying to import a function from a library I’m developing. I have “libraryD.dll” built for debugging and “library.dll” for release. Unfortunately, that means that I have to do this:
#If Debug
Declare Function someFunction Lib "library.dll" Alias "someFunc" () As Integer
#Else
Declare Function someFunction Lib "libraryD.dll" Alias "someFunc" () As Integer
#EndIf
Now this would be fine but for ALL 40 functions this would make things very ugly to look at (and a tad bit unfriendly).I would like to do something more like this:
#If Debug
#Const dllName = "libraryD.dll"
#Else
#Const dllName = "library.dll"
#EndIf
Declare Function someFunction Lib dllName Alias "someFunc" () As Integer
Is there ANY way to do this in VB? 🙁
TIA!
You simply do one thing…
This will certainly solve your problem…
Happy coding… 🙂