Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:

Hello all,

i have a C++ dll (not a COM one) which is build in Visual C++ 6.0. I currently access this dll in Visual Basic 6.0 and VB.net both by giving hard-coded path.

eg: Private Declare Function UAOC Lib "E:\Source Codes\Dynamic Link Libraries\Debug\test.dll" (ByVal S As Double, ByVal x As Double, ByVal r As Double, ByVal q As Double, ByVal v As Double, ByVal T As Double, ByVal B As Double) As Double

Now, the defined path is "E:\Source Codes\Dynamic Link Libraries\Debug\test.dll", what i want is to find a way that even if i change my drive/folder my calling application should be able to execute the distinct functions without an error.  

Please kindly note that i want it in VB.net.  

your help is appreciated !!

 

Posted

1 solution

You should be able to just give the dll name and then it will grab it from the current path ( that is, where your exe is )

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900