Click here to Skip to main content
15,889,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am referring to a dll in the form's declaration part using declare statement. the dll is in my project path. as i am not motioning path, it is considering the application path and is working fine. my problem is if i use common dialog box to set the path for some other purpose and then try to use dll, application is saying unable to find dll. what might be the problem and solution please. thanking you
Posted
Updated 12-Dec-10 21:17pm
v2
Comments
Abdul Quader Mamun 13-Dec-10 3:17am    
Spelling check.

try api to load Library in runtime to use it - - -
option explicit

Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long

Private Sub Form_Load()
Loadlibrary( app.path & "\msconf.dll")
End Sub


Now you can use it in run time. Here msconf.dll is an example. You can use any dll file in the place of msconf.dll.

Enjoy...
 
Share this answer
 
Try api to load Library in runtime to use it - - -
option explicit

Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long

Private Sub Form_Load()
Loadlibrary( app.path & "\msconf.dll")
End Sub


Now you can use it in run time. Here msconf.dll is an example. You can use any dll file in the place of msconf.dll.

Enjoy...
 
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