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