Quote Originally Posted by wqweto View Post
Insetad of keeping track with isInit can you call PatchFunc in MainComparator like this
Code:
Public Function MainComparator( _
                ByVal lpAddressOfFunction As Long, _
                ByVal lpItem1 As Long, _
                ByVal lpItem2 As Long) As Long
    PatchFunc AddressOf MainComparator
    MainComparator = MainComparator(lpAddressOfFunction, lpItem1, lpItem2)
End Function
... for some wicked self-modifying code :-))

cheers,
</wqw>
Nice advice. It needs to test it on the compiled file.