标题:[求助]关于dll的声明
只看楼主
googlers
Rank: 1
等 级:新手上路
帖 子:92
专家分:0
注 册:2006-5-8
得分:0 
以下是引用清澂居士在2007-1-10 14:53:50的发言:

可以在运行时用App.Path得到绝对路径,然后用LoadLibrary

Private Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule As Long) As Long
Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long
Private Declare Function GetProcAddress Lib "kernel32"(ByVal hModule As Long, ByVal lpProcName As String) As Long
Private Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal hWnd As Long,ByVal Msg As Any, ByVal wParam As Any, ByVal lParam As Any) As Long

Private Sub Form_Load()
On Error Resume Next
Dim lb As Long,pa As Long
lb =LoadLibrary("user32")
pa =GetProcAddress(lb,"SetWindowTextA")
CallWindowProc pa,Me.hWnd,"Hello !",ByVal 0&,ByVal 0&
FreeLibrary lb
End Sub

太高深了 看不懂 难道没有简单的解决办法?

2007-01-10 15:16
清澂居士
Rank: 6Rank: 6
等 级:贵宾
威 望:28
帖 子:1237
专家分:7
注 册:2006-12-19
得分:0 

那就把DLL放在EXE程序的路徑中```或者繫統的路徑裏```


佛曰:\"前世的500次回眸才换来今生的一次擦肩而过\".我宁愿用来世的一次擦肩而过来换得今生的500次回眸.
2007-01-10 15:32



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-115271-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.243469 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved