求助GetModuleHandle和GetProcAddress的用法
1、GetModuleHandle怎么用?已知这个函数声明如下:
Declare Function GetModuleHandle Lib "kernel32" Alias "GetModuleHandleA" (ByVal lpModuleName As String) As Long
下面程序为什么得不到hwnd1呢?请大家指点
并且在程序中我已经添加了引用"RemoteHook.dll"。
Dim hwnd1&
hwnd1 = GetModuleHandle("RemoteHook.dll")
2、GetProcAddress怎么用?
已知这个函数声明如下:
Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Long, ByVal lpProcName As String) As Long
如下应用正确吗?
dim addr1&
addr1 = GetProcAddress(hwnd1, "D:\Main\RemoteHook\RemoteHook.dll")
[此贴子已经被作者于2006-11-27 13:27:31编辑过]