hum..
Dim res As Integer = installHook(hTarget)

Integer ? should it be string ?