|
-
February 17th, 2022, 11:19 AM
#1
return dll if its exists
Hello, i'm trying to detect a "test.dll"(the name is just example) if it exists, and then to do my things in the code.The problem is, that whatever i do, "getmodulehandle" it always returns value null. I saw that, if the "test.dll" is detected, returns Windows Handle. I was searching on google for a solution but I couldn't find it. How to comparing the value if the example dll is found or if it's not? I'm sure there is something wrong in my example, but i cant understand what exactly. Can someone give me advice, how can i solve this? I'm pasting example code.
Private Declare Function GetModuleHandle Lib "kernel32" Alias "GetModuleHandleA" (ByVal lpModuleName As String) As Long
Sub main()
If GetModuleHandle("test.dll") = true Then
Exit Sub
Else
Do other things
End if
End sub
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|