dowsHook, _
      ByVal eType As EHTHookTypeConstants _
   )
Dim i As Long
Dim lPtr As Long
Dim iRefCount As Long

   ' Remove the hook from the hook list:
   lPtr = ObjPtr(IHook)
   For i = 1 To m_iConsumerCount
      With m_tHookConsumer(i)
         If (.eType = eType) Then
            If (.lPtr = lPtr) Then
               .lPtr = 0
               .eType = -2
            ElseIf (.lPtr &lt;&gt; 0) Then
               iRefCount = iRefCount + 1
            End If
         End If
      End With
   Next i
   
