使用通用对话框后在dll中出现问题 [英] problem in loding dll after use of common dialog box

查看:78
本文介绍了使用通用对话框后在dll中出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用声明语句引用形式声明部分中的dll. dll在我的项目路径中.因为我不在移动路径,所以它正在考虑应用程序路径,并且工作正常.我的问题是,如果我使用通用对话框为其他目的设置路径,然后尝试使用dll,则应用程序说无法找到dll.请问可能是什么问题和解决方案.谢谢您

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

推荐答案

尝试api在运行时加载库以使用它---
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



现在,您可以在运行时使用它.这里的msconf.dll是一个示例.您可以使用任何dll文件代替msconf.dll.

享受...



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


尝试api在运行时加载库以使用它---
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



现在,您可以在运行时使用它.这里的msconf.dll是一个示例.您可以使用任何dll文件代替msconf.dll.

享受...



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


这篇关于使用通用对话框后在dll中出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆