为什么我在VB.net中调用vc++做的dll时,dllMain不执行呢? 20

调用声明:PrivateDeclareFunctionInstallHookLib"hook.dll"Alias"_InstallHook@0"()AsBooleanPr... 调用声明:
Private Declare Function InstallHook Lib "hook.dll" Alias "_InstallHook@0" () As Boolean
Private Declare Function UninstallHook Lib "hook.dll" Alias "_UninstallHook@0" () As Boolean
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 Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule As Long) As Long

dllMain:
bool WINAPI DllMain(HINSTANCE hinst, unsigned long reason, void* lpReserved)

dllmain换成过DllEntryPoint也不行
我执行里面的函数了,也没调用啊
展开
 我来答
willy123698741
2011-01-24 · TA获得超过259个赞
知道小有建树答主
回答量:206
采纳率:0%
帮助的人:215万
展开全部
当你用LoadLibrary加载你的DLL,或第一次调用你的DLL中的函数时,DLLMAIN才会被执行,不是一开始就执行DLLMAIN的
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式